replaCy
replaCy copied to clipboard
spaCy match and replace, maintaining conjugation
So often I want to match `word1` `word2` or `phrase_1 phrase_2 phrase_2` and suggest replacing them with `replacement`. Because the spaCy matcher is token-based, this requires multiple match rules... that...
Currently replaCy assumes token matches and text suggestions are single tokens: - `PATTERN_REF` copies only the first matched token: https://github.com/Qordobacode/replaCy/blob/bd7df64e2e5b875aaa9fecff31b1d898650219b4/replacy/__init__.py#L166 suggested fix: change the above line, enforce `INFLECTION` only if...
would look like ```json "description": "{PATTERN_REF[0]} is insensitive, use {SUGGESTION_REF[0]}" ```
When positive/negative matches are included, we should be able to infer POS information for the spaCy match. This is cool by itself, but there is at least one other thing...