Closed sam-writer closed 4 years ago
The answer is YES... We should add to docs!
EDIT - this is wrong, but I am leaving because for now, this discussion is good documentation
The answer is YES... We should add to docs!
NO, why? You can have a multi token suggestion, lemmas pos and orth completely not related, verbs not supported by pyinlect. Why?
The answer is YES... We should add to docs!
NO, why? You can have a multi token suggestion, lemmas pos and orth completely not related, verbs not supported by pyinlect. Why?
I'm sorry, I don't understand.
Ok, so let's start from definitions ;)
What do you mean by inferring
? I assumed it means: automatically assign
.
In the original question, I mean: can one have a spacy_matches.json
entry that does not specify TEMPLATE_ID
?
And on Slack, it seemed like the answer was sometimes YES
Yes, TEMPLATE_ID
and FROM_TEMPLATE_ID
are optional keys.
Yes,
TEMPLATE_ID
andFROM_TEMPLATE_ID
are optional keys.
But in the particular example I picked, they are not optional?
Not optional. If we want to omit TEMPLATE_ID
we should change LEMMA
to LOWER
in patterns.
This means we catch only extract
and replace it without inflection by exact
(and this replacement is correct, although we are missing extracts revenge
etc.)
So use TEMPLATE_ID
+ LEMMA
only if you wish to inflect suggestions.
Not optional. If we want to omit
TEMPLATE_ID
we should changeLEMMA
toLOWER
in patterns. This means we catch onlyextract
and replace it without inflection byexact
(and this replacement is correct, although we are missingextracts revenge
etc.)So use
TEMPLATE_ID
+LEMMA
only if you wish to inflect suggestions.
Ok great, this is what I was trying to get at. It is not a priori obvious, but that is an easy to describe rule... it could even be in a JSON-schema file (which is an addition I want to make - the option to validate a spacy_matches.json
file).
I'm sure when you said
lemmas pos and orth completely not related, verbs not supported by pyinlect.
it answered this, but I still don't get it, so I will ask another way: when there is a single-token LEMMA pattern, and a single-token suggestion, why can't we infer the template?
examples:
BUT if we really want to speed up labeling matches, we could display such guesses as a default (dashboard view). A user introducing the rule could correct it if it's wrong. I agree that would help. :rocket:
For example, in
it seems like
TEMPLATE_ID
andFROM_TEMPLATE_ID
could be inferred.