Skip to main content

No project description provided

Project description

quick_processor

Overview

quick_processor is a Python-based text preprocessing tool designed to simplify and standardize text cleaning tasks for Natural Language Processing (NLP) applications. It leverages a variety of libraries, including NLTK, BeautifulSoup, and contractions, to provide a comprehensive suite of text cleaning functions.

Features

  • Lowercase Conversion: Converts all characters in a sentence to lowercase.
  • Email Removal: Removes email addresses from the text.
  • Diacritic Removal: Strips diacritics from characters.
  • HTML Cleaning: Removes HTML tags from the text.
  • Repeated Character Replacement: Replaces repeated punctuation marks with a single occurrence.
  • Emoji Translation: Translates emojis into their textual representation.
  • Contraction Expansion: Expands common contractions (e.g., "can't" to "cannot").
  • URL Removal: Strips URLs from the text.
  • Possessive Removal: Removes possessive forms from words.
  • Extra Space Removal: Eliminates extra spaces.
  • Spelling Correction: Corrects spelling errors.
  • Tokenization: Splits text into tokens.
  • Stopword Removal: Removes common stopwords.
  • Lemmatization: Reduces words to their base or root form.
  • Emoticon Removal: Removes emoticons from the text.
  • Non-Alphabetic Character Removal: Strips non-alphabetic characters from the text.

Installation

To install the necessary dependencies, use the following command:

pip install nltk contractions beautifulsoup4 emoji spellchecker

Usage

Here's an example of how to use quick_processor for text preprocessing:

from preprocessor import Preprocessor

# Initialize the preprocessor
preprocessor = Preprocessor()

# Sample sentence
sentence = "This is a sample sentence with an email@example.com and a link http://example.com 😊"

# Clean the sentence using default steps
cleaned_sentence = preprocessor.clean(sentence)

print(cleaned_sentence)

Unit Tests

The project includes a suite of unit tests to ensure the functionality of each preprocessing step. To run the tests, execute the following command:

python preprocessor.py

File Structure

  • preprocessor.py: Contains the Preprocessor class and the test function for running unit tests.
  • README.md: Project documentation (this file).

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.


With quick_processor, you can streamline your text preprocessing tasks, making your NLP pipeline more efficient and effective.

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

quick_processor-0.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

quick_processor-0.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file quick_processor-0.2.tar.gz.

File metadata

  • Download URL: quick_processor-0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for quick_processor-0.2.tar.gz
Algorithm Hash digest
SHA256 9e2751cc50b4af44a174241837b83b78dcd05b4aeeab64eaba996b253c2c9bbe
MD5 9e6cf989ad4d8ff6123934585925a7fc
BLAKE2b-256 a114141ceb7962ca5e73d7f6400a3d38b6988caa4a79f2b520fdcdd666f157d3

See more details on using hashes here.

File details

Details for the file quick_processor-0.2-py3-none-any.whl.

File metadata

  • Download URL: quick_processor-0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for quick_processor-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd0f6e0bde569f3c1cd343fca9bbcfb160914a8357e016cae694f49abd12cc6
MD5 b12603aa13ac1c9f7d0c8300e44e8dce
BLAKE2b-256 0a7bd4484c12381f967068d76d858bb6183da2496a2316c4d7460b85da93a780

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