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.
Research Area
Machine Learning: Machine Learning (ML) research in Computer Science and Information Technology focuses on the development of algorithms and models that enable computers to learn from data and improve their performance over time without being explicitly programmed. It is a subset of Artificial Intelligence that uses statistical techniques to give machines the ability to learn patterns, make decisions, and predict outcomes based on data.
Supervised learning, a key area of ML research, involves training models on labeled data, where the input-output relationships are predefined. This method is widely used for tasks such as classification (e.g., spam detection) and regression (e.g., predicting house prices). Unsupervised learning, on the other hand, involves finding hidden patterns in data without predefined labels, with clustering and association being typical applications in areas such as customer segmentation and anomaly detection.
Reinforcement learning is another area of ML that focuses on teaching agents to make decisions by interacting with their environment and receiving feedback in the form of rewards or penalties. It is often applied in robotics, game playing, and autonomous systems, where continuous learning and adaptation are required.
Project 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.
Academic Year
2024/2025
Date Uploaded
Feb 12, 2026
Group Members
1. TUTU ADANE DENNIS (UEB3218821)
2. ALBERT OSEI AKOTO (UEB3233623)
3. ADUTWUM EMMANUEL DARKWAH (UEB3223321)
4. ANOKYE CLINTON KWESI (UEB3217221)