Skip to content
Applications for the 2026/2027 academic year are now open. Visit the UENR admissions portal for details.
Back to Project Works
Undergraduate

SENTIMENT ANALYSIS OF GHANAIANS ON THE 2024 GENERAL ELECTIONS USING NLP MODELS.

1. TUTU ADANE DENNIS () 2. ALBERT OSEI AKOTO () 3. ADUTWUM EMMANUEL DARKWAH () 4. ANOKYE CLINTON KWESI ()2024/2025

Project Abstract

The rapid development of social media networks has increased the number of online discussions, particularly with regard to political events and elections. Twitter has become one of the leading platforms in Ghana where people share their opinions about the governance, leaders, and political parties. The 2024 presidential elections, involving leading personalities like John Dramani Mahama and Dr Mahamudu Bawumia, raised a lot of online discussion, giving one a chance to learn about the people in an automated mode. The paper explores how Ghanaians felt about these two candidates by using highly developed Natural Language Processing (NLP) models and techniques, even before the elections took place. Although NLP covers a wide variety of computational techniques in the analysis of human language, e.g., named entity recognition, topic modelling, text summarisation, part-of-speech tagging, machine translation, and text classification, this research is specifically about sentiment analysis, which is a subfield of NLP concerned with the classification of opinions present in textual data into established sentiment categories (positive, negative, or neutral). The project is based on and evaluates various models of supervised learning, such as logistic regression, support vector machines (SVM), random forest, XGBoost, LightGBM, and the sentiment scoring system based on TextBlob to evaluate the sentiment polarity using the collected Twitter information. Tweets that mention the two contenders are obtained using the Twitter API through the Tweepy library in Python. A pipeline with data cleaning, preprocessing, feature extraction with the help of TF-IDF, model training, evaluation, and visualisation is adopted. The results of the research are expected to present research-based information about the political situation in Ghana and outline the importance of digital platforms in voting.

Main Objective

To design and test an automated sentiment analysis system to determine the sentiments of Ghanaians on Twitter regarding John Mahama and Dr. Mahamudu Bawumia prior to the 2024 elections based on NLP and machine learning algorithms.