Home
Easily clean text with spaCy!
Key Features¶
spacy-cleaner utilises spaCy
Language
models to replace, remove, and
mutate spaCy
tokens. Cleaning actions available are:
- Remove/replace stopwords.
- Remove/replace punctuation.
- Remove/replace numbers.
- Remove/replace emails.
- Remove/replace URLs.
- Perform lemmatisation.
See our docs for more information
Installation¶
or install with Poetry
π Example¶
spacy-cleaner can clean text written in any language spaCy
has a model
for:
Class Pipeline
allows for configurable cleaning of text using spaCy
. The
Pipeline
is initialised with a model and functions that transform spaCy
tokens:
cleaner = Cleaner(
model,
processing.remove_stopword_token,
processing.replace_punctuation_token,
processing.mutate_lemma_token,
)
Next the pipeline
can be called with the method clean
to clean a list of
texts:
About the method clean
...
The method clean
is a wrapper around the spaCy
Language
class method
pipe
. Check the docs for more information:
Giving the output:
π Releases¶
You can see the list of available releases on the GitHub Releases page.
We follow Semantic Versions specification.
We use Release Drafter
. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when youβre ready. With the categories option, you can categorize pull requests in release notes using labels.
List of labels and corresponding titles¶
Label | Title in Releases |
---|---|
enhancement , feature |
π Features |
bug , refactoring , bugfix , fix |
π§ Fixes & Refactoring |
build , ci , testing |
π¦ Build System & CI/CD |
breaking |
π₯ Breaking Changes |
documentation |
π Documentation |
dependencies |
β¬οΈ Dependencies updates |
You can update it in release-drafter.yml
.
GitHub creates the bug
, enhancement
, and documentation
labels for you. Dependabot creates the dependencies
label. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.
π‘ License¶
This project is licensed under the terms of the MIT
license. See LICENSE for more details.
π Citation¶
@misc{spacy-cleaner,
author = {spacy-cleaner},
title = {Easily clean text with spaCy!},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/Ce11an/spacy-cleaner}}
}
π Credits¶
This project was generated with python-package-template
This project was built using IntelliJ IDEA