cleanser
Utilities for cleaning text for NLP and other workflows.
Installation
pip install cleanser
Usage
from cleanser import Cleanser
text = """Hello World....
πΊπΊ Python is πππ awesome
"""
Cleanser(text).emoji().double_punctuation().whitespaces().text
>>> "Hello World. Python is awesome"
Contributing
Setup
- Install Poetry
- Run
make setup
to prepare workspace
Testing
- Run
make test
to run all tests
Linting and Formatting
- Run
make format
to run black code formatter - Run
make lint
to run pylint - Run
make mypy
to run mypy