Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cleantweet-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

cleantweet-0.1.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

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

Hashes for cleantweet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b659fa1bd1be9459379ad3667fad901e2275aa8e87a4b97be1f125fbb4a4cf6f
MD5 7b0d16b5b572b2e9948f373308a3eda9
BLAKE2b-256 548376baa76e207dd414b2de8d819fe1613143ce255117bbfb24c22ab678724f

See more details on using hashes here.

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

Hashes for cleantweet-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f955a3b58ff39a82c5bd7271848432a44e641ca4e20ee109c0930b9438d173a8
MD5 c0fffb30a81df825b6a86e6bc809080b
BLAKE2b-256 182c3f5225bd2ac702aa4796bfd1d8580df079d391ed5870c5be3051013c96f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page