Sentiment analysis using unsupervised learning for local government elections in South Africa
DOI:
https://doi.org/10.29379/jedem.v17i1.945Keywords:
GPT, Local elections, Sentiment analysis, Suspicious patterns, User classification, Unsupervised learningAbstract
This study examines public sentiment during the 2021 South African local government election campaign by analysing Twitter posts. The research uses advanced techniques such as fine-tuned RoBERTa model, VADER, and TextBlob to assess the sentiments of tweets about four political parties, addressing the difficulties of understanding political sentiment on social media. The research also distinguishes tweets from real human users and those from chatbots, employing the K-Means method to detect suspicious activity. To gain deeper insights into the analysis, OpenAI GPT is employed for dataset labelling and managing class imbalance. The results show that sentiment varied significantly over time, with the fine-tuned RoBERTa model providing the most accurate analysis. The results further indicated that most tweets came from real human users, with a small number from bots, which tended to be negative. The findings offer useful insights for shaping political campaigns based on public sentiment trends.
Downloads
Metrics
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Penelope Matloga, Vukosi Marivate, Kayode Olaleye

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

JeDEM is a peer-reviewed, open-access journal (ISSN: 2075-9517). All journal content, except where otherwise noted, is licensed under the CC BY-NC 4.0 DEED Attribution-NonCommercial 4.0 International








