Skip to content

Repository files navigation

CleanTweet

cleantweet is a python library 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())

show_special_characters()

This method shows the special characters contained in the cleantweet object in a list. From here you can view the amount of special characters, loop through the list to display them. etc

e.g

data = CleanTweet("text.txt")
data.show_special_characters()

You can view the documentation and more samples on https://pypi.org/project/cleantweet/

About

CleanTweet is a python library created for cleaning textual data fetched from an API.

Topics

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages