a python library to clean textual data fetched from API's
Project description
CleanTweet version 2.0.0
CleanTweet is a python library created for cleaning textual data fetched from API. In the second version of the cleantweet library, there are 6 new classes that have been introduced. They include the DiagramTweet
PredictionTweet, SaveTweet, SentimentTweet, StatsTweet, and SyntheticTweet. Each of these classes have different methods specific
to each class and most of them inherit the clean() method from the CleanTweet class which was the only class present in the version
0.1.1.
You can find more detailed documentation about the various classes, their implementation and their various methods (close to 50) in
cleantweet's permanent home: https://cleantweet.org/
Installation
pip install cleantweet
Get Started
How to clean your Twitter Object:
Example 1: If the text file containing the Twitter/X JSON Data is in the same directory as project files.
!pip install cleantweet
import cleantweet as clt
Instantiate the CleanTwitter Object
data = clt.CleanTweet('sample_text.txt')
Call the clean method
data = data.clean())
Print the data object
print(data)
Various Implementations for the new classes
Draw a Wordcloud from your textual data
import cleantweet as clt
diagram = clt.DiagramTweet('sample_text.txt')
diagram.word_cloud()
Amount of Plural Proper Nouns in your text
import cleantweet as clt
text = clt.StatsTweet('sample_text.txt')
text = text.amount_of_proper_nouns(plural=True)
print(text)
Sentiment Analysis
import cleantweet as clt
sentiments = clt.SentimentTweet('sample_text.txt')
sentiments = sentiments.vader()
print(sentiments)
Synthetic Data
import cleantweet as clt
synths = clt.SyntheticTweet('sample_text.txt')
synths = synths.rule_based()
print(synths)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cleantweet-2.0.0.tar.gz.
File metadata
- Download URL: cleantweet-2.0.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7567df200e713d3b8608cbe3d9e0521b147ef51e3c0e9d624933638e843d4a02
|
|
| MD5 |
69958439f481c0c9a8194bd92dbd6e8f
|
|
| BLAKE2b-256 |
b9b799baea841a72ad4a57b2326529413d8717697bb5d2a60c06c42b4743fed0
|
File details
Details for the file cleantweet-2.0.0-py3-none-any.whl.
File metadata
- Download URL: cleantweet-2.0.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d8d5636e4c874288ecfb4f1fe2b334430595707ac92606d8d4b2d01a912be19
|
|
| MD5 |
a1d1e77711f6458722b1fdc3e48d6eb9
|
|
| BLAKE2b-256 |
299a5394252599849904a1ac768a87952455262db0d3bffc98931f20d01909db
|