Skip to main content

Text Cleaning of English Language Python Package

Text Cleaning is a common preprocessing technique for almost all NLP task. Mainly I have designed the package for Text Classification Task. Also You can use it for other NLP task also. You are welcome to contribute the package.

Install the package

pip install eng-text-cleaner

There has number of methods to clean the text such as removing emoji, punctuation, html_tags, urls, characters not words or digits or underscore, digits, stopwords, spell correction, lemmatize the words. One Method named clean text will apply all the methods to clean the text at a glance. Let's explore the simple package.

from eng_text_cleaner import preprocessing 

Start by removing punctuation

text = "Neither too small nor too large, and nice resolution at a good price."
# create textcleaner instance
textcleaner = preprocessing.TextCleaner()
# remove punctuation
textcleaner.remove_punctuation(text)

Output:

Neither too small nor too large and nice resolution at a good price

For Clean the text totally

# fully clean the text
textcleaner.clean_text(text)

Output:

neither small large nice resolution good price

Author:

  • Md Abdullah Al Hasib

Metadata

Release files for eng-text-cleaner 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eng-text-cleaner 0.0.5
File Size Uploaded
eng_text_cleaner-0.0.5.tar.gz 4.1 kB Details

Release files / eng_text_cleaner-0.0.5.tar.gz

Download URL eng_text_cleaner-0.0.5.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e9a66e2f87b0fd5c47f7012375a8d7f124e83357e7eda7047bb6633cf23898f2
BLAKE2b-256 checksum
How to use checksums
2201008d487986f6c038e59ebd81eef8f99e77820855a28b79f781639104754c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page