Instance in an Instant
Project description
Text-Scrubbing-Package
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:
- Basic Cleaning for Data Analyis
- 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:
- remove_glyphs - Removes non-ascii characters, non-printable charaters, accents, and non-latin characters
- remove_spaces - Remove Extra Spaces, including tabs and line breaks
- remove_html_tags - Remove HTML tags
- remove_hyperlinks - Remove hyperlinks
- remove_punctuation - Remove Puntuation
- tokenizing - Tokenization
- stopwords_removal - Remove Stopwords
- lemmat - Perform Lemmatization
- replace_emojis - Replace emojis
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7970fb87354b38493bbe333e7bee8b594089398791e1dde0d62bca1a65da47d0
|
|
| MD5 |
f32544240ea5e2a103964520591650fc
|
|
| BLAKE2b-256 |
5755f1fdb214f8da671b6043f12019a36034eee2fffeb9fe00c7f86a768e33ee
|