/Twitter-Sentiment-Analysis

Analyzing reaction to tweets using TextBlob

Primary LanguagePython

Twitter-Sentiment-Analysis

Analyzing reaction to tweets using TextBlob

  • How Sentiment Analysis Works
  1. Use twitter API to search for tweets with a specific mention
  2. The search text is then broken down into chunks of words and sentences(Tokenization).
  3. After tokenization, textblob will calculate how often a tweet shows up based based on number of retweets and likes (Bag of Words model). From this, the measure of popularity can be determined.
  4. Finally, the measure of reaction of a tweet is printed.
  • Makes sense right!

Setup

Install Tweepy

git clone https://github.com/tweepy/tweepy.git

cd tweepy

python setup.py install

Install TextBlob

git clone https://github.com/sloria/TextBlob

cd TextBlob

python setup.py install 

Create your twitter app here

screen shot 2019-02-24 at 12 58 21 pm

And You're all set

feb-24-2019 12-14-03