Skip to main content

# tweetprep

A simple python library for preprocessing tweets to make them training ready. Use it to preprocess the tweets before feeding them to Machine Learning or Deep Learning models.

The code is Python 2 and 3 compatible.

# Installation

Fast install:

pip install tweetprep

For a manual install get this package:

$wget https://github.com/garain/tweetprep/archive/master.zip
$unzip master.zip
$rm master.zip
$cd tweetprep-master

Install the package:

python setup.py install

# Example

from tweetprep import preprocess
#from tweetprep import lang_translator

tweet = "#COVID-19 is the worst pandemic @2020!! :,("
# get translated tweet
lang="es"
print(preprocess.lang_translator.translate(tweet,dest=lang).text)

# Get processed version of tweet
print(preprocess.clean(tweet))

Here is the output:

# COVID-19 es la peor pandemia @ 2020!! :,(
covid19 is the worst pandemic crying smiley

Please cite these publications if this library comes to any use:

  • Ray, Biswarup, Avishek Garain, and Ram Sarkar. “An ensemble-based hotel recommender system using sentiment analysis and aspect categorization of hotel reviews.” Applied Soft Computing 98 (2021): 106935.

  • Garain, Avishek, and Sainik Kumar Mahata. “Sentiment Analysis at SEPLN (TASS)-2019: Sentiment Analysis at Tweet Level Using Deep Learning.” (2019).

  • Garain, Avishek, and Arpan Basu. “The titans at SemEval-2019 task 5: Detection of hate speech against immigrants and women in twitter.” Proceedings of the 13th International Workshop on Semantic Evaluation. 2019.

  • Garain, Avishek. “Humor Analysis based on Human Annotation (HAHA)-2019: Humor Analysis at Tweet Level using Deep Learning.” (2019).

  • Garain, Avishek, and Arpan Basu. “The titans at SemEval-2019 task 6: Offensive language identification, categorization and target identification.” Proceedings of the 13th International Workshop on Semantic Evaluation. 2019.

Metadata

Release files for tweetprep 2.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tweetprep 2.0.6
File Size Uploaded Provenance Actions
tweetprep-2.0.6.tar.gz 5.0 kB Without provenance Details for tweetprep-2.0.6.tar.gz

Release files / tweetprep-2.0.6.tar.gz

Download URL tweetprep-2.0.6.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ca77e580617e30de323850b9e5add76d882ad456549c0787087dc13e065d4a4f
BLAKE2b-256 checksum
How to use checksums
49eb48caf8125f0217043cca3e45c5dc94b5a8ed3cd35b8956b62aaf36541021
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for tweetprep 2.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page