- Python 2.7 or higher
- clone the repo https://github.com/SCK22/Twitter-Sentiment (use the master branch)
- Install packages run pip install -r requirements.txt
- Twitter API authentication Keys, generated from twitter API and put them in a access_tokens.json file in the following format.
{
"api_key" : "XXXXXX",
"api_secret" : "XXXXXX,
"access_token" : "XXXXXX,
"access_token_secret" : "XXXXXX"
}
Analyzing the sentiment of tweets for a particular key word. This analysis is based on the tweet text only.
how to run (example):
python main.py <WORD> <NUM_TWEETS>
python main.py #F1 1000