A replaCy component to fix issue boundary, fix signle or double space at start, extend to next word if facing casing issue.
Project description
replaCy Issue Boundary
A replaCy component to fix issue boundary:
- fix signle or double space at start.
- fix double comma.
- fix comma at start
- fix parenthesis space.
- fix first letter is a lower case.
- extend to next word if facing casing issue.
Warning
Add after joiner to work
Install
poetry add replacy_issue_boundary
or
pip install replacy_issue_boundary
Usage
import en_core_web_sm
from replacy import ReplaceMatcher
from replacy.db import load_json
from replacy_issue_boundary import IssueBoundary
from spacy.util import filter_spans
nlp = en_core_web_sm.load()
replaCy = ReplaceMatcher(nlp, load_json('path to match dict(s)'))
issue_boundary = IssueBoundary()
replaCy.add_pipe(name="span_filter", component=filter_spans, before="joiner")
replaCy.add_pipe(issue_boundary, name="article_agreer", after="joiner")
Developing
The CI/CD in this project is great. GitHub Actions run linting and tests on any PR. If you merge into master, release-drafter drafts a new release based on PR commits and tags (e.g. if the PR is tagged feature
and minor
it will create a minor version bump with the changes labeled as Features).
I can't figure out the automatic versioning bit... leaving it in a broken state for now :/
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
Built Distribution
Hashes for replacy-issue-boundary-0.2.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02bd1f901d82952b39eb1a5d0bc75378384b7417dca8cc2a3239269e9c44e2a5 |
|
MD5 | f63de552fe5c471ca77f7b673ebdbf35 |
|
BLAKE2b-256 | 5a76ce232b617ace835f29159d73c001840ac86c28696c555ee4b58d977f3e76 |
Hashes for replacy_issue_boundary-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1422b0ea0ef47b0220c921e344554d3e864e9cf2b17590e04e03bf003166b9 |
|
MD5 | c12711f305d8a20a00dd0b3396acb78b |
|
BLAKE2b-256 | ec43e6cb134d6e02a8bb74d7473722d74d95c1e7dbe5c92c9a01b2bca332e243 |