Preprint Article Version 1 Preserved in Portico This version is not peer-reviewed

Twitter Sentiment Analysis of Lagos State 2023 Gubernatorial Election using BERT

Version 1 : Received: 18 March 2023 / Approved: 20 March 2023 / Online: 20 March 2023 (02:52:52 CET)

How to cite: Wusu, A.S.; Olabanjo, O.A.; Padonu, R.M.; Mazzara, M. Twitter Sentiment Analysis of Lagos State 2023 Gubernatorial Election using BERT. Preprints 2023, 2023030335. https://doi.org/10.20944/preprints202303.0335.v1 Wusu, A.S.; Olabanjo, O.A.; Padonu, R.M.; Mazzara, M. Twitter Sentiment Analysis of Lagos State 2023 Gubernatorial Election using BERT. Preprints 2023, 2023030335. https://doi.org/10.20944/preprints202303.0335.v1

Abstract

Election outcomes have been predicted in the past with the help of various state-of-the-art language models. Sentiment analysis helps in establishing the opinions of the public about a particular subject, a popular experiment known as opinion mining. Twitter has grown in popularity and proven to be a key tool in mining people’s sentiments concerning election and other trending subjects of interest. The outcome of the just concluded Presidential election in Nigeria shifts the focus on Lagos State governorship election. In this study, we propose a Bidirectional Encoder Representations from Transformers (BERT) model for the sentiment analysis of governorship election in Lagos State Nigeria using Twitter data. A total of 800,000 personal and public tweets were scraped from twitter concerning the three prominent contesting candidates using carefully selected search queries. The tweets were preprocessed to avoid noise and inconsistencies. The preprocessed tweets were passed into the pretrained and finetuned BERT model. The result was analyzed to establish the sentiments of the public about the candidates. The social networks of the candidates were also analyzed. The parameter-tuning yield different results with different learning rates (LR). Results showed that the learning rate at 1e-7 gave the best performance and that the smaller the learning rate, the higher the accuracy but the larger the epoch size, the higher the accuracy.

Keywords

NLP; NLU; Twitter; Sentiment Analysis; Opinion Mining; Nigeria; Election; Machine Learning; BERT; LSTM; SVM

Subject

Medicine and Pharmacology, Internal Medicine

Comments (0)

We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.

Leave a public comment
Send a private comment to the author(s)
* All users must log in before leaving a comment
Views 0
Downloads 0
Comments 0
Metrics 0


×
Alerts
Notify me about updates to this article or when a peer-reviewed version is published.
We use cookies on our website to ensure you get the best experience.
Read more about our cookies here.