-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Currently replaCy assumes token matches and text suggestions are single tokens:
-
PATTERN_REFcopies only the first matched token:
https://github.com/Qordobacode/replaCy/blob/bd7df64e2e5b875aaa9fecff31b1d898650219b4/replacy/__init__.py#L166
suggested fix: change the above line, enforceINFLECTIONonly if one token is matched -
TEXTconsists of a single word only:
https://github.com/Qordobacode/replaCy/blob/bd7df64e2e5b875aaa9fecff31b1d898650219b4/replacy/__init__.py#L163
suggested fix: json validation to enforce single tokens asTEXT
ex. instead of{"TEXT": "blah blah"}use{"TEXT": "blah"}, {"TEXT": "blah"} -
FROM_TEMPLATE_ID: assumes single token match, from which we transfer the inflection
https://github.com/Qordobacode/replaCy/blob/bd7df64e2e5b875aaa9fecff31b1d898650219b4/replacy/__init__.py#L178
suggested fix: enforceTEMPLATE_IDmatch being single token
Idea:
Single token match enforcement: fail json validation if patterns include FROM_TEMPLATE_ID or PATTERN_REF pointing to a token with OP?