writer / replaCy

spaCy match and replace, maintaining conjugation
https://pypi.org/project/replacy/
MIT License
34 stars 8 forks source link

Mimic spaCy pipeline API #83

Open sam-writer opened 4 years ago

sam-writer commented 4 years ago

replaCy extensions can be added... but not removed or renamed. We also don't constrain component names to be unique. So to match the spaCy API (and just have reasonable functionality), we need:

see the spaCy docs.

the context manager would look like:

replaCy = ReplaceMatcher(stuff)

with replaCy.disable_pipes("scorer"):
    spans = replaCy("some text")