UltraClean
UltraClean is a fast and efficient Python library for cleaning and preprocessing text data, specifically designed for AI/ML tasks and data processing.
Features
- Remove unwanted characters, links, emails, phone numbers, underscores, unicode characters, emojis, numbers, currencies, punctuation, HTML tags, LaTeX commands, and more.
- Handle multi-dots, extra spaces, and hashtags.
- Batch processing for efficient text cleaning.
- Spam detection and filtering using pre-trained models.
Installation
You can install UltraClean using pip:
pip install ultraclean
Usage
Text Cleaning
from ultraclean.clean import cleanup
text = "Congratulations! You've won a free trip to Hawaii. Click here to claim your prize. This is not a scam."
cleaned_text = cleanup(text)
print(cleaned_text)
Spam Detection
from ultraclean.predict import Spam
spam_detector = Spam()
text = "Congratulations! You've won a free trip to Hawaii. Click here to claim your prize."
is_spam = spam_detector.predict(text)
print(f"Is the text spam? {'Yes' if is_spam else 'No'}")
paragraph = "Congratulations! You've won a free trip to Hawaii. Click here to claim your prize. This is not a scam."
cleaned_paragraph = spam_detector.filter(paragraph)
print(cleaned_paragraph)
License
This project is licensed under the MIT License with attribution requirement.
Author
Ranit Bhowmick - bhowmickranitking@duck.com
Metadata
Release files for ultraclean 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ultraclean-0.2.2.tar.gz | 6.0 kB | Without provenance | Details for ultraclean-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ultraclean-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for ultraclean-0.2.2-py3-none-any.whl |
Total release size: 11.8 kB
Release files / ultraclean-0.2.2.tar.gz
| Download URL | ultraclean-0.2.2.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1835b943569aa8f730676d427ce9a62817fafd2656aed77c057d24a023b4665
|
|
BLAKE2b-256 checksum How to use checksums |
1df669331e1224049788172374174686638be715517dead4e60167db9ab8833f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Release files / ultraclean-0.2.2-py3-none-any.whl
| Download URL | ultraclean-0.2.2-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10a407318e0042b6608477d7fed7b71693b88e89502969533e8506866a7d5826
|
|
BLAKE2b-256 checksum How to use checksums |
2f6a4685265e621ff2b351c22ffcaa8ba1ae9159d452a9f1ca461707cb37ad20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Security for ultraclean 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.