Skip to main content

PyCleanText

PyCleanText is a simple Python package designed to clean and preprocess text data. It removes unwanted noise from raw text by handling tasks like:

  • Lowercasing text
  • Removing URLs, punctuation, numbers, and special characters
  • Removing stopwords (common words like "the", "a", "and", etc.)
  • Stripping HTML tags
  • Removing duplicate consecutive words
  • Generating a cleaned text file

Features

  • Comprehensive cleaning: Removes unwanted elements like URLs, special characters, and stopwords.
  • Normalization: Converts text to lowercase and standardizes it for analysis.
  • Duplicate word removal: Cleans up consecutive duplicate words for better clarity.
  • File input and output: Load raw text from a file and save the cleaned text to a new file.

Installation

You can install PyCleanText directly from the Python Package Index (PyPI):

pip install PyCleanText

Usage

from PyCleanText import PyCleanText

file_path = 'input.txt'  
output_file_path = 'cleaned_output.txt' 

PyCleanText(file_path, output_file_path)

OR

PyCleanText(file_path)

Metadata

Release files for PyCleanText 0.1.0

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

Source distribution (sdist)

Source distribution for PyCleanText 0.1.0
File Size Uploaded Provenance Actions
PyCleanText-0.1.0.tar.gz 3.5 kB Without provenance Details for PyCleanText-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 7.5 kB

Release files / PyCleanText-0.1.0.tar.gz

Download URL PyCleanText-0.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9fc9df0c959f0504b577cd0bfb805f4364b982daa85dde1cff14a04d573f0b04
BLAKE2b-256 checksum
How to use checksums
9410079059668d9341ac91951921d06804b777297c145867068376057526100b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Release files / PyCleanText-0.1.0-py3-none-any.whl

Download URL PyCleanText-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6685dbb3755fe4a271c701d2e6a3e266cb6e409b03590de55c57823ccb0ff505
BLAKE2b-256 checksum
How to use checksums
9df0a31d5f42959ba3ad20e05f25ee9c416c84dc76d6284c2295b38be8345596
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Security for PyCleanText 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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