Skip to main content

Clean the text for NLP project

Project description

nlp_text_cleaner

About

This is a project developed to create a utility module for text cleaning/pre processing required in NLP projects

Installation

pip install nlp-text-cleaner

Usage

    import nlp_text_cleaner as cleaner
    cleaned_text = cleaner.apply_stemming("I played Cricket")

There are following methods present for text cleaning.
split_into_sentences : A method to split text into sentences
split_into_words : A method to split text into words
lower_case_text : A method to convert text to lower case
remove_punctuation : A method to remove punctuations in a text
remove_unicode : A method to remove unicode characters in a text
remove_leading_trailing_whitespaces : A method to remove white spaces at the begining or end of text
remove_duplicate_whitespaces : A method to remove consecutive white spaces
detect_language : A method to detect language of text
correct_grammar : A method to correct spelling mistakes in a text
remove_stopwrods : A method to remove stopwords from text
apply_stemming : A method to apply stemming on text
apply_lammatization : A method to apply lemmatization on text
remove_hashtags : A method to remove hashtags in a text
remove_hyperlinks : A method to remove hyperlinks in a text
clean_html_code : A method to remove html entities like ' ,& ,< etc/
replace_contraction : A method to sreplace contractions like n't,'ll etc
get_pos_tags : A method to get POS tags of text

You can use above methods as per requirement of a use case.However,there are some default methods also and you can use them directly:
clean_single_sentence : A default method to clean single sentence
clean_paragraph_to_sentences : A default method to get cleaned sentences from a paragraph
clean_paragraph : A default method to clean complete paragraph

Contributing

Please create a Pull request for any change.

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

nlp_text_cleaner-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

nlp_text_cleaner-1.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file nlp_text_cleaner-1.0.1.tar.gz.

File metadata

  • Download URL: nlp_text_cleaner-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for nlp_text_cleaner-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2d212713b9197fe638bba9e5fac5e2a1567264cf8bfc1193fee658a32be45026
MD5 8ad7e203fbd6b5c88e996f05652cd324
BLAKE2b-256 c95565d1c31b1d42255d2fa588464e295a9d636e559fe4f8ab09d6f00539e7fd

See more details on using hashes here.

File details

Details for the file nlp_text_cleaner-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nlp_text_cleaner-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a930ae182a9690a5ab799ac91a9b0b5663ce3ad66e5e133fef1dffbc0e9e3a4
MD5 1a7381c8fbf136ae66e08f0cd565b1d8
BLAKE2b-256 d561d8d8a9bddb9255d52c8873355937a09317e67b7511c2236d240746300634

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