- This package cleans the text data such as removal of HTML tags, URLs, NLTK Stopwords, numbers, punctuations.
Features
- Remove URLs
- Remove HTML Tags
- Remove NLTK Stopwords
- Remove Numbers
- Remove Punctuations
- Remove Additional Spaces
- Changes to Lower Case
Installation
-
In the code notebook like IPYNB use the below command\
!pip install py-text-data-clean -
If installing from Anaconda Prompt of CMD Terminal, use the below command\
pip install py-text-data-clean -
Note:
Check if the package version is upgraded. If the version is not upgraded, please upgrade it.
# To check the version, run the below code
!pip show py-text-data-clean
# To upgrade the package, run the below code
!pip install py-text-data-clean -U
Usage
Input:
- List of text data - Example: ["Is the time 12 Noon now, isn't it?", "It is a python link: https://pypi.org/"]
Output:
- ['time noon', 'python link']
Code to clean text with a single function:
# Import the library
from pytextdataclean import textclean as tc
input_text_list = ["Is the time 12 Noon now, isn't it?", "It is a python link: https://pypi.org/"]
result = tc.text_clean(data=input_text_list)
print(result)
Code to use each available features:
# Pass the list of text
# Example list:
input_text_list = ["Is the time 12 Noon now, isn't it?", "It is a python link: https://pypi.org/"]
# Import the library
from pytextdataclean import textclean as tc
# To remove html tags
tc.remove_html_tags(data=input_text_list)
# To remove NLTK stop words
tc.remove_nltk_stopwords(data=input_text_list)
# To remove URLs
tc.remove_url(data=input_text_list)
# To remove punctuations
tc.remove_punctuation(data=input_text_list)
# To remove numerical digits
tc.remove_digits(data=input_text_list)
# To remove foreign languages
tc.remove_foreign_languages(data=input_text_list)
# To remove spaces
tc.remove_spaces(data=input_text_list)
Metadata
Release files for py-text-data-clean 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py_text_data_clean-0.0.5.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_text_data_clean-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / py_text_data_clean-0.0.5.tar.gz
| Download URL | py_text_data_clean-0.0.5.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffc2a3d120c207159f7a244e543bf396e69a2012040f101b67068b1737aecb8e
|
|
BLAKE2b-256 checksum How to use checksums |
d28414fe74d624b7b41e2ce3c1a057a55123043ca890dec5e6970ff8f96aed67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / py_text_data_clean-0.0.5-py3-none-any.whl
| Download URL | py_text_data_clean-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15cdc62e2df019d204524bedbe12d26a041a0e4bc72296aa26be613f2939c58a
|
|
BLAKE2b-256 checksum How to use checksums |
5cf87653547ef6d8c1aa36e821f51646429ab62887ad26245a30b4073f8a067b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|