The model takes a certain number of tweets and a keyword both specified by user then checks for the sentiment in those tweets.
Libraries used: TextBlob (for polarity of a tweet), tweepy (getting the tweets from twitter api),
matplotlib (plotting the graph of positive,negative,neutral tweets), re (regular expression)
For each tweet, polarity is calculated and tweet is classified into one of these:
- positive
- negative
- weak_positive
- strong_positive
- weak_negative
- strong_negative
- neutral
Finally we calculate the percentage of each polarity and print them on graph.