Inspiration

With the rapid development of modern technology, social media and group chats have become one of the most popular ways by which people share information and learn what is happening all over the world. However, as technology facilitates the exchange of information, it also speeds up the spread of negative sentiments such as fear, anger, and sadness A great example to consider would be all the news we have seen related to Wuhan Coronavirus. Our parents sent us various posts such as how eating bats is going kill a person, how vitamin-C is the elixir to Coronavirus. All these posts with intense sentiments may eventually lead to social panic. Therefore, we want to develop some kind of plugin for the browser or communication apps so that for all the links to posts that are shared in the group, the plugin can pre-analyze the post a little bit and give people some warning if the post has a strong negative tone. In this case, when people see such warning before they read the post, they are acknowledged that the information in the post is probably “fake”, or the author deliberately want the readers to feel the negative sentiments.

What it does

Fear Flagger is a browser plugin specifically for Messenger. It detects all the URLs in the group chat. Then run a sentimental analysis on the text in the post. If the post contains strong negative tone, then Fear Flagger will analyze the main negative sentiments appeared in the post and generate a warning for the readers in the group chat. If the reader still chooses to click the link and read the post, then we ask the reader to provide feedback to us so that we use this information to determine whether the posts from this website are mostly sentimentally-intense. This data helps us build a blacklist such that if Fear Flagger finds see any other posts from this domain in a group chat, it will warn the readers. At the same time, Fear Flagger will search for articles on similar topics on websites from our whitelist (usually mainstream media and trustworthy source of information) but with different sentiments as suggested readings to the reader. In this case, the reader can choose to consult other information to gain a more comprehensive understanding of the topic.

How I built it

Fear Flagger inspects the HTML source of a group chat page and fetches all URLs in the source file. Then Fear Flagger fetches all texts contained in the webpage corresponding to those URLs and uses the Azure Text Analytics API to perform an overall sentimental analysis on the text. If Azure detects strong negative sentiments in the text, then Fear Flagger performs further analysis on the text using the parallel dots API and see what is the top negative sentiments contained in the article and generate a warning above the textbox in the group chat page. Note that if the source of the article is listed in our blacklist, then we also generate a warning about that. Fear Flagger will fetch the keywords in the title of the post and do a search in our whitelist websites (trusted source of information and mainstream media) to get 10 posts on the same topic. Fear Flagger analyzes the 10 posts the same way as it analyzes the original post and ranks their positivity. Fear Flagger will choose the top three as suggested reading for the readers if they want to gain a more comprehensive understanding of the topic.

Challenges I ran into

We wanted to use emoji as a stamp warning in the same way we react with an emoji to the text others send us, but since we are injecting to the HTML source file of the group chat page, we had a hard time to implement this and chose just to use a warning message instead. When we first pass the URLs around, we actually experience various XSS issues that we actually learned in class. And we actually manage to solve the problem by playing around with tokens and access key the way we learned in class.

Accomplishments that I'm proud of

The proudest thing that we’ve accomplished in this hackathon is to learn from basics and actualize an idea that can benefit a significant part of the society. We face the challenges we expected, such as being a complete beginner exploring the functionalities of Azure, doing various HTML injections, and figure out what is a reasonable way to do text analysis. All of us enjoy being in a team and striving for a common goal together.

What's next for Fear Flagger

We want to improve Fear Flagger such that it also analyze any visual, audio sources, or videos and integrate the sentimental analysis on those sources to further improve the overall sentimental analysis to the post. Also, we want Fear Flagger to be not only a browser plugin but also a functionality for various mobile communication apps and social media apps. In this case, all the information the users saw are “pre-labelled” and users will react to the post content more calmly.

Share this project:

Updates