
AI Blueprints
By :

This chapter demonstrated one method for making sense of feedback, specifically, a method for acquiring tweets and posts and news articles about a topic and identifying the overall sentiment (negative or positive) of the general population's feeling about the topic. We chose "autonomous vehicles" and "self-driving cars" for our search terms in order to get a sense of how people feel about this burgeoning technology, particularly in light of recent news (some good, some bad) at the time of writing.
Our method used the Twitter, Reddit, and News APIs, running as independent threads that continuously acquire new tweets and posts and comments. The text is then sent to the CoreNLP library for sentiment detection. CoreNLP first breaks down the text into individual sentences and then detects the sentiment of each sentence. We next save each sentence with a non-neutral sentiment in an SQLite database, along with the date and source. In order to visualize...