a python library to clean tweets fetched from the Twitter API.
Project description
CleanTweet version 0.1.1
CleanTweet helps in Natural Language Processing tasks especially in the area of preprocessing and cleaning your data
fetched from the Twitter API Backend.
Installation
pip install cleantweet
Get Started
How to clean your Twitter Object:
Example 1: If the text file containing the Twitter JSON Data is in the same directory as project files.
!pip install cleantweet
from cleantweet import CleanTweet
import nltk
nltk.download('punkt')
Instantiate the CleanTwitter Object
data = CleanTweet('sample_text.txt')
Call the clean method
print(data.clean())
Example 2: When the above is not the case.
!pip install cleantweet
from cleantweet import CleanTweet
import nltk
nltk.download('punkt')
import the os module
import os
Instantiate the CleanTwitter Object
data = CleanTweet(os.path.join('./nameoffolder', 'sampling.txt'))
Call the clean method
print(data.clean())
In this first version, the method clean() would only preprocess and clean the Twitter Object's default parameters which
are the id and text.
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
Built Distribution
File details
Details for the file cleantweet-0.1.1.tar.gz
.
File metadata
- Download URL: cleantweet-0.1.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b659fa1bd1be9459379ad3667fad901e2275aa8e87a4b97be1f125fbb4a4cf6f |
|
MD5 | 7b0d16b5b572b2e9948f373308a3eda9 |
|
BLAKE2b-256 | 548376baa76e207dd414b2de8d819fe1613143ce255117bbfb24c22ab678724f |
File details
Details for the file cleantweet-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: cleantweet-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f955a3b58ff39a82c5bd7271848432a44e641ca4e20ee109c0930b9438d173a8 |
|
MD5 | c0fffb30a81df825b6a86e6bc809080b |
|
BLAKE2b-256 | 182c3f5225bd2ac702aa4796bfd1d8580df079d391ed5870c5be3051013c96f0 |