Twitter sentiment analyzer written in Python
Twitter sentiment analyzer written in Python
Python ver. 2.7
Author: Vedant Vohra
Date: 18-02-2017
Encoding: Unicode-extended
pre-requisites:
TwitterSearch: (https://github.com/ckoepp/TwitterSearch)
pip install TwitterSearch
usage:
>>> tweet_sentiments.py <hashtag>
wordlists:
positive wordlist goes in -> [positive.txt]
negative wordlist goes in -> [negative.txt]
tweets:
scanned tweets -> [test_tweets.txt]
sample tweets -> [obama_tweets.txt]
APIs:
Twitter API:
ver - 2.0
keys:
consumer_key = 'JJf1zaFm62QWDI9Kh55v8MMV7'
consumer_secret = '376WqS1KISggbRuiKHTPIZknFImiqjCNmJi8W2Myj7OfSpLS0B'
access_token = '2172451140-4D6obJISbYBvQM0mxa9kaEYY1xMh3flIJVQ3Jmn'
access_token_secret = 'FbJKBWwO48z5KWBztipDrvlc4l3glXTZKKd5l8hSn6D5M'