A Web-based Sentiment Analyzer for Tweets Using Machine Learning Techniques

Modupe Agagu, Samuel Damilare Gbadebo · 2024

In today's digital age, people often communicate and engage online during elections. Twitter is a popular social media platform that enables people to interact, share views and ideas, and give comments. It is a valuable source of data for sentiment analysis, as it provides a real-time snapshot of public opinion on a wide range of topics, including elections. This study is centered on electoral events. The primary focus was on Twitter data, specifically examining tweets related to Nigeria's recently concluded 2023 presidential election. Leveraging a pre-trained machine learning model from the Hugging Face library (Sentiment_Analyzer) and the Naïve Bayes algorithm, this dataset was diligently trained. With the exponential growth of online content, there is an increasing demand for efficient and accurate sentiment analysis tools. This paper provides a web-based sentiment analysis system that utilizes two machine learning algorithms, Naive Bayes and the Hugging Face transformers model, to classify the sentiment of text data.A comparative analysis of the Naive Bayes and Hugging Face transformer model and their performance evaluation in terms of accuracy, and results were conducted. The results demonstrate that the Hugging Face transformers model (Sentiment_Analyzer) outperforms the Naive Bayes algorithm, achieving higher classification accuracy and better overall performance.

Read the paper · More papers on PaperTik