Skip to content

anubhav9199/Twitter-Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Sentiment Analyzer

The following program is designed to parse desired number of tweets which contains text mentioned in query.txt file and then perform sentiment analysis on them. It also counts a few entities such as likes, retweets, etc and saveall the information in a Pandas Dataframe.

Usage

  1. When running the script through console please paste your twitter app credentials in the file named 'credential_file.txt'(every credential should be separated by newline and in order: consumer_key, consumer_secret, access_token, access_token_secret) and the search query for tweets in a file named 'query.txt' in single line.

  2. You can use a different file name as well but then you have to pass those file names as arguments while running script as:

python get_tweets.py --credential_file <your credentials file name> --query <your query file name> --num <number of tweets you want your script to parse>

*NOTE : Everytime before running the script, please move the old .json file somewhere other than current working directory, so that any desireable data could be preserved from your last search.

Links

Tweepy : Anaconda, Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages