Skip to main content

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


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.7.0.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file replacy-0.7.0.tar.gz.

File metadata

  • Download URL: replacy-0.7.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

Hashes for replacy-0.7.0.tar.gz
Algorithm Hash digest
SHA256 610dd334774c4c643313c14193823e831fce45063518aa43eee3c77b19d36be0
MD5 5cb997bcb1d0f5036f84e9d7866e9a47
BLAKE2b-256 c1a615ed33e5fb33ab5b0dbc25887de2a7bae5b523850d958cbf11d46e205a47

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page