An open-source Python package to clean raw text data. Version 1.1.4 provides simple functions to normalize whitespace, remove URLs, emojis, numbers, punctuation, and more. The package is relatively stable with low release cadence. It is widely used for quick text preprocessing in NLP pipelines.
pip install cleantextNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic example: removes URLs, numbers, punctuation, and extra spaces, leaving text intact.
Use 'cleaned_text = ' '.join(clean(...))' if you need a single string.
Remove 'fix_unicode' from the call. Unicode normalization is now handled automatically.
Review your function calls and adjust parameter names. For example, 'no_urls' is now 'replace_with_url'.
Use the 'replace_with_punct' parameter with a placeholder instead of removing punctuation entirely.
Run 'pip install cleantext' to install the package.
Remove 'fix_unicode' from your function call. Unicode normalization is handled automatically.
Use 'cleaned_text = ' '.join(clean(...))' to get a single string.
No dependency data recorded yet.