Skip to main content

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

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)

Source distribution for ultraclean 0.2.2
File Size Uploaded
ultraclean-0.2.2.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ultraclean 0.2.2
File Interpreter ABI Platform
ultraclean-0.2.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

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