Skip to main content

A simple text cleaning library that converts text to clean word arrays

Project description

Your README.md for TextCleaner is off to a solid start—clear, well-organized, and functional. Below is an improved version with a few refinements to grammar, formatting, clarity, and overall polish. I also incorporated your authorship at the end, as you mentioned “my name Emmanuel.”


TextCleaner

A simple Python library for cleaning text and converting it into arrays of clean, lowercase words.

Installation

Install via pip:

pip install textcleaner

Or install from source:

git clone https://github.com/yourusername/textcleaner.git
cd textcleaner
pip install -e .

Usage

from textcleaner import clean

# Basic usage
result = clean("Hello, WORLD!! This is an example.")
print(result)
# Output: ['hello', 'world', 'this', 'is', 'an', 'example']

# More examples
print(clean("Python is AWESOME!!! Let's code..."))
# Output: ['python', 'is', 'awesome', 'let', 's', 'code']

print(clean("Remove @#$% special characters & numbers 123"))
# Output: ['remove', 'special', 'characters', 'numbers', '123']

Features

  • Converts text to lowercase
  • Removes punctuation and special characters
  • Tokenizes text into words
  • Handles numbers as valid tokens
  • Manages empty strings and edge cases gracefully
  • Returns a clean list of words

API Reference

clean(text)

Cleans input text and returns a list of lowercase words.

Parameters:

  • text (str): The input string to clean

Returns:

  • list: A list of cleaned, lowercase words

Example:

clean("Hello, World!")  
# Returns: ['hello', 'world']

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository

  2. Create a feature branch:

    git checkout -b feature/amazing-feature
    
  3. Commit your changes:

    git commit -m 'Add some amazing feature'
    
  4. Push to your branch:

    git push origin feature/amazing-feature
    
  5. Open a Pull Request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Changelog

Version 1.0.0

  • Initial release
  • Basic text cleaning functionality
  • Word tokenization
  • Punctuation and special character removal

Author: Emmanuel

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textcleaner2305-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textcleaner2305-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file textcleaner2305-1.0.0.tar.gz.

File metadata

  • Download URL: textcleaner2305-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for textcleaner2305-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c60704545ae78c0ccc685bfeba4a252609ce085f3543fe11c1d1969eace764f2
MD5 46cb0734c9294f18a0573eb8f21f758e
BLAKE2b-256 e9b4d48605d9d26b5b1b72a7e060a2ed1e9359493ed0207e1a5d45899f639f31

See more details on using hashes here.

File details

Details for the file textcleaner2305-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for textcleaner2305-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf4ba30026a34c3d87d44012c3fa07888ec1c18dfe6703336a7ff22ebb3fd3f
MD5 cae238376abf2d34a4741691287f7cc8
BLAKE2b-256 cbe5a95407212801d48f8553cdc36292227014199aebf624d30091a85ced6ce7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page