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. Preprints2023, 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
Wusu, A. S.; Olabanjo, O. A.; Padonu, R. M.; Mazzara, M. Twitter Sentiment Analysis of Lagos State 2023 Gubernatorial Election using BERT. Preprints2023, 2023030335. https://doi.org/10.20944/preprints202303.0335.v1
APA Style
Wusu, A. S., Olabanjo, O. A., Padonu, R. M., & Mazzara, M. (2023). Twitter Sentiment Analysis of Lagos State 2023 Gubernatorial Election using BERT. Preprints. https://doi.org/10.20944/preprints202303.0335.v1
Chicago/Turabian Style
Wusu, A. S., Rebecca Maulome Padonu and Manuel Mazzara. 2023 "Twitter Sentiment Analysis of Lagos State 2023 Gubernatorial Election using BERT" Preprints. 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.
Copyright:
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.