This is a work in progress project that I am starting to be able to let a user look up the general sentiment of tweets surrounding specific keyword(s) or hashtag(s).
- Python 3.8.2+
- Make sure you have the
pipenv
library installed. - Have a Twitter Developer account created, and have an application ready for this project.
- Clone this repo.
- Open a command prompt/terminal in the folder where the repo has been cloned, and run
pipenv install
. - Create a folder called
nltk_data
anywhere. - Create a file in the cloned folder named
.env
, and enter the contents using the following template:
NLTK_DATA={path to ntlk_data folder.}
TWITTER_CONSUMER_KEY={your Twitter application's consumer key}
TWITTER_CONSUMER_SECRET={your Twitter application's consumer key}
TWITTER_ACCESS_TOKEN={your Twitter application's access token}
TWITTER_ACCESS_SECRET={your Twitter application's access secret}
- Edit the main file, on line 40, and change the
keyword
argument to your search keyword, and change thenum
argument to the maximum number of tweets you want to search. - Run
pipenv run python main.py
to start the program.