ReplaCy = spaCy Matcher + pyInflect. Create rules, correct sentences.
Project description
replaCy
Requirements
spacy >= 2.0
(not installed by default, expected nlp object)
Quick start
from replacy import ReplaceMatcher
import spacy
from replacy.db import get_match_dict
# load custom match_dict, see example in : resources/match_dict.json
match_dict = get_match_dict()
# load nlp spacy model of your choice
nlp = spacy.load("en_core_web_sm")
rmatcher = ReplaceMatcher(nlp, match_dict)
# get inflected suggestions
# look up the first suggestion
span = rmatcher("She extracts revenge.")[0]
>>> span._.suggestions
['exacts']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
replacy-0.1.0.tar.gz
(4.6 kB
view hashes)