This is a simple sentiment analyzing Twitter bot that keeps track of Donald Trump (@realdonaldtrump)'s emotional state. Based on the tweets observed in 10 minute window, the bot will tweet an appropriately severe warning (ranging from all clear to PINNACLE NUCFLASH) to notify followers of potentially important current events. It includes a manually labeled training corpus of his tweets into three categories: positive, neutral, and negative.
Pure fun, and possibly to give enough warning to reach a fallout shelter if needed. You may also want to look at Trump2cash in case you are interested in using sentiment analysis of Trump to buy and sell stocks. Since this is a mini-project to teach myself basic natural language processing, I don't intend to extend the functionality much, but I may expand the training corpus as Trump tweets more.
You can clone the repository immediately assuming you have the following packages installed:
- NLTK (natural language toolkit)
- python-twitter
You will need to include an api.key file that contains your Twitter tokens.
Please feel free to contact me with questions or comments.
