ReplaCy = spaCy Matcher + pyInflect. Create rules, correct sentences.
Project description
replaCy
Requirements
spacy >= 2.0
(not installed by default, expected nlp object)
Installation
pip install replacy
Quick start
from replacy import ReplaceMatcher
import spacy
# load nlp spacy model of your choice
nlp = spacy.load("en_core_web_sm")
rmatcher = ReplaceMatcher(nlp)
# 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.6.0.tar.gz
(5.9 kB
view details)
File details
Details for the file replacy-0.6.0.tar.gz
.
File metadata
- Download URL: replacy-0.6.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 629364d562292edda125e5f9e09db2a0e0e6e0560c895bd0ecdc0669031ff856 |
|
MD5 | 0b0f3fe4cd7ed1e9e07a9eafff45a265 |
|
BLAKE2b-256 | b0e478ccf10780cd2914161b2dcc2b7d60f69da092c77a07aec6a31844127569 |