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).
pip install pandas- 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.
