It helps you monitor and understand people's emotions and the way they are feeling on Twitter.Sentiment analysis involves classifying opinions in text into categories like "positive" or "negative" or "neutral".
- Register for the Twitter API https://apps.twitter.com/
- Create an app to generate various keys associated with the API.
handles the Twitter API - tweepy library Tweepy supports OAuth authentication. Authentication is handled by the tweepy.OAuthHandler class.An OAuthHandler instance is created by passing a consumer token and secret.On this auth instance, a function set_access_token by passing the access_token and access_token_secret.
It is the process of determining the emotion of the writer, whether it is positive or negative or neutral.sentiment analysis with textblob is Lexicon-based(rule-based) method which defines a list of positive and negative words.
Textblob returns two properties polarity and subjectivity.
- Polarity is float which lies in the range of [-1,1] where 1 means positive statement and -1 means a negative statement.
- subjectivity refers that mostly it is a public opinion and not a factual information.Subjectivity is also a float which lies in the range of [0,1].
- numpy (https://www.numpy.org/)
- pandas (https://pandas.pydata.org/)
- Regular expressions(re) (https://docs.python.org/3/library/re.html)
- matplotlib (https://matplotlib.org/)
- seaborn (https://seaborn.pydata.org/)
- tweepy (https://www.tweepy.org/)
- textblob (https://textblob.readthedocs.io/en/dev/)