With the the rise of social media in the recent decade came a platform through which anyone can share their opinion on any topic. This leaves a formerly untapped resource of information, where surveys and case studies aren't the only ways to gauge how the public views any topic. Seeing this unfilled niche, we decided to create a way to poll recent tweets on a topic, and find the polarity of twitter users based on the query.
What it does
The brains of the operation are programmed in python, where a user passes a topic to our scripts. We poll twitter servers for the topic and scrape the most popular and relevant tweets in the past seven days. For each tweet we assign a polarity score, based on the sentiment and severity of the adjectives, verbs, adverbs, and grammatical structure of the text. These scores are then averaged together to create a Topic Polarity Score, which can be viewed as a positive, negative, and indifferent score.
How we built it
The scripts make use of natural language parsing, utilizing a pre-trained model of the English corpus to find the severity and connotation of each tweet. This is all passed to a front-end programmed in flask, which is exposed to the end user.
Challenges we ran into
One of the largest challenges encountered during the creation of this project was identifying grammatical structure of a text. To solve this issue, a function designed to crawl through through a sentence and translate it into its grammatical subtree was created.
Accomplishments that we're proud of
We found the scripts to be both faster and more accurate than any similar programs on the web, which we think is something to be proud of for a group of first-timers to natural language processing.
What we learned
This was a crash course in NLP for all of us, and mapping out polarity values for different topics was extremely interesting.
What's next for WhatDoesTwitterThink?
In the future we plan to flesh out the user frontend as well as expand the search query from only twitter to other social media as well as search engines.
We secured the domain whatdoestwitterthink.com for this project, but couldn't hook up the website to the local server due to time constraints.