Skip to main content

a python library to clean textual data fetched from API's

Project description

CleanTweet version 2.0.2

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

cleantweet-2.0.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cleantweet-2.0.2-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file cleantweet-2.0.2.tar.gz.

File metadata

  • Download URL: cleantweet-2.0.2.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

Hashes for cleantweet-2.0.2.tar.gz
Algorithm Hash digest
SHA256 7c95d9ae193f8d8622454bf161cdcf206b58c452d586dc50ece9e21453465c6c
MD5 0f4023274aad552d932604a3a914b849
BLAKE2b-256 aa4f97df01855f8dfbcf468401f2e84e34aebea8dff85ba09cefee572f6f8c71

See more details on using hashes here.

File details

Details for the file cleantweet-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: cleantweet-2.0.2-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

Hashes for cleantweet-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 700f9fe8ce17ce3445e9a07207f8c19d44c9f9b7e53171dea5fcc08e4139ef9b
MD5 6516d3e2052cd2b888f3e4b7df61dc1e
BLAKE2b-256 e79f0a4984015471e5e68dc74f3c5334318ddeacbf939ec2d036f582afe9d0eb

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