top of page

Sentiment Analysis Application and Demo

Updated: 20 hours ago

Sentiment Analysis is a natural language processing (NLP) task that involves determining the sentiment or emotional tone behind a body of text. It typically classifies the sentiment into categories such as positive, negative, or neutral based on the words, phrases, and context found within the text. Sentiment analysis is used in many applications, such as customer feedback analysis, social media monitoring, and market sentiment analysis.


In a sentiment analysis model, a text input(in this case, a tweet) is passed through a trained machine learning model, which then evaluates the sentiment of the text. The model can output a score or label indicating how positive or negative the sentiment is.


In this demo, I demonstrate a proof of concept for sentiment analysis using Hugging Face’s sentiment analysis model. For example, the model classifies "I don't like you much" as negative and "I like you" as positive.


I then apply the model to analyze Twitter posts about pineapple on pizza. Users can input search terms in a React JS application, which interacts with an API gateway and a Lambda function to fetch tweets. The sentiment of each tweet is analyzed and stored in DynamoDB. The results are then visualized in Amazon QuickSight, showing the percentage of positive and negative tweets.


The demo reveals that, out of 3,300 tweets about pineapple on pizza, 34% were positive and 66% were negative, indicating a general aversion to pineapple on pizza! Watch the video here





Komentarze


bottom of page