Skip to content

AryamaanPB/twitter_profanity_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Degree of Profanity in a Tweet

Aryamaan Singh

Through this code I have tried to calculate the percentage of profanity used in tweets. This percentage is calculated against a list of pre-defined profane words. This is a great way to not only try to filter out messages (tweets) on your application (Twitter) to be further processed (deleted, banned or blacklisted).

Pre-requisites

pip install pandas

How it works

  • First loads up the tweets that I got from this labelled dataset I got from Kaggle.
  • Loads up a list of pre defined profane tokens.
  • Iterates over the list of tweets and calculates the degree of profanity for each.
  • Saves the result as a csv.
  • Performs rudimentary analysis about the result.

Here is what your sample output should look like: Alt text

About

A way to calculate the degree of profanity in a single tweet against a set of pre-defined profane tokens.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages