Skip to main content

Instance in an Instant

Project description

Text-Scrubbing-Package

Build Status Coverage Status Language GitHub license contributors codesize pullrequests closedpullrequests

Introduction

TextScrub is a text-cleaning package which prevents you from spending long hours cleaning web scrapped data, either to prepare for a presentation or for NLP projects. The user can run single line of code to clean the textual data.

Resources Used

  • Editor used: VS code
  • Python version: 3.9.4
  • Packages used: unicodedata, sys, os, regex, string, numpy, pandas, sklearn, levenshtein, spacy, nltk, emoji

Project Organization

This package has the following structure.

TextScrubPkg/
  |- examples
    |-example.ipynb
  |- textscrub/
    |- __init__.py
    |- clean.py
    |- nlp.py
    |- normalize_text.py
  |- docs/
    |- index.md
    |- textimage.png
  |- tests/
    |- __init__.py
    |- test_clean.py
    |- test_nlp.py
    |- testing_dataset.csv
    |- testing_normalize.py
  |- setup.py
  |- requirements.txt
  |- LICENSE
  |- README.md

Users

  • Analysts: Requiring quick data-cleaning functionalities, and who are not technically adept
  • Data Scientists: Programmers wanting to clean web-scrapped data. Focus on experimenting with model-building instead of scrubbing

Function Description

This package provides two main task specific fucntions:

  1. Basic Cleaning for Data Analyis
  2. Advanced Cleaning for NLP related tasks

For cleaning the data call the textscrub.normalize_text.normalize_text(your text) function. The function parameters defined are as follows:

  1. remove_glyphs - Removes non-ascii characters, non-printable charaters, accents, and non-latin characters
  2. remove_spaces - Remove Extra Spaces, including tabs and line breaks
  3. remove_html_tags - Remove HTML tags
  4. remove_hyperlinks - Remove hyperlinks
  5. remove_punctuation - Remove Puntuation
  6. tokenizing - Tokenization
  7. stopwords_removal - Remove Stopwords
  8. lemmat - Perform Lemmatization
  9. replace_emojis - Replace emojis
  10. remove_emojis - Remove emojis

By default these parameters are true. If you do not require them, then you can set is as False.

Apart from this we can normalize a string column as well. To do this, call textscrub.clean.homogenize_column(col_name) from the textscrub package.

How to Use

To test the functionalities of the package, refer to the Python notebook

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

textscrub-1.0.0.tar.gz (3.4 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: textscrub-1.0.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for textscrub-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7970fb87354b38493bbe333e7bee8b594089398791e1dde0d62bca1a65da47d0
MD5 f32544240ea5e2a103964520591650fc
BLAKE2b-256 5755f1fdb214f8da671b6043f12019a36034eee2fffeb9fe00c7f86a768e33ee

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