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

Uploaded Source

File details

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

File metadata

  • Download URL: replacy-0.5.0.tar.gz
  • Upload date:
  • Size: 5.2 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.5.0.tar.gz
Algorithm Hash digest
SHA256 b5ae81df4b9a49b883fe1e7b60fa1d01f196e1a344b8223190a2262755f6b84a
MD5 3a1ffa132e2cfe17bf8c3578a58192fc
BLAKE2b-256 72c027dd1545a5e7adc1522b8d8708410453025901968d3d5c6c9ea8b6a10f9e

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