Sentiment Analysis of Tweets Regarding the 2022 Presidential Election in Brazil
Abstract
With technological progress and the rise of social media, the routine use of social media platforms has consolidated, encompassing various activities, including political debates and expression of opinions. Given this scenario, people’s opinions on social media play an important role in providing a real-time overview of society’s perceptions and feelings, especially in the field of politics. With this in mind, this study analyzes the performance of Artificial Intelligence algorithms in sentiment analysis tasks in relation to the 2022 elections in Brazil. The methodology consisted of collecting tweets about the 2022 election from the old social network Twitter (currently X). The dataset was divided into two subsets, namely training labeled via ChatGPT-3.5 and testing manually labeled. Multilayer Perceptron (MLP), Support Vector Machine (SVM), K-Nearest Neighbors Algorithm (KNN), Random Forest (RF) and BERTimbau Large learning models were evaluated. As result, among the 5 models, BERTimbau Large obtained the best result with 68% accuracy.References
Andrade, V. S. (2018). Reconhecimento de texturas utilizando padrão binário local e classificador knn.
Augusto, D. C. and da Silva, M. (2014). Apontamentos sobre política partidária e eleitores no município de guarapuava/pr: Considerações a partir de uma geografia eleitoral qualitativa. REVISTA PERCURSO, 6(2):55–76.
Belchior, A. M. (2016). Confiança nas instituições políticas. Fundação Francisco Manuel dos Santos, Lisboa.
Córdova Sáenz, C. A. and Becker, K. (2021). Assessing the use of attention weights to interpret bert-based stance classification. In IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology, pages 194–201, online.
de Ávila, P. V. M. L., de Brito, D. M., Santos, D. M., and Ferreira, E. d. A. M. (2022). Processamento de linguagem natural (pln) para automatização da checagem de conformidade: uma investigação do pré-processamento de um código regulatório urbanístico brasileiro. ENCONTRO NACIONAL DE TECNOLOGIA DO AMBIENTE CONSTRUÍDO, 19:1–12.
de Jesus Procópio, J. V., Lopes, L., and Feitosa, W. R. (2023). Geoanalytics aplicado ao conceito de cidades inteligentes. Revista de Inovação e Tecnologia-RIT, 13(1):109–117.
Gonçalves, G. F., Rocha, A. A. d. A., and Paes, A. (2022). Analisando as emoções dos tweets relacionadas à covid-19 no rio de janeiro. In Anais do VI Workshop de Computação Urbana, pages 210–223, Fortaleza. SBC.
Joyce, B. and Deng, J. (2017). Sentiment analysis of tweets for the 2016 us presidential election. In 2017 ieee mit undergraduate research technology conference (urtc), pages 1–4, Cambridge, MA, USA. IEEE.
Lago, I. C. et al. (2005). O significado do voto em eleções municipais: análise dos processos de decisão de voto em eleições para prefeito em itajaí/sc.
Ma, E. (2019). Nlp augmentation. [link].
Motta, K. S. d. (2018). Eleições no Brasil do Oitocentos: entre a inclusão e a exclusão da patuleia na cidadela política (1822-1881). PhD thesis, Tese (Doutorado em História). Universidade Federal do Espírito Santo.
Pavlidis, P., Wapinski, I., and Noble, W. S. (2004). Support vector machine classification on the web. Bioinformatics, 20(4):586–587.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830.
Perez, R. T., Barbosa, L. G. C., de Oliveira, M. T., and da Silva Vaccari, G. (2022). Comentários sobre a díade ‘voto ideológico’/‘voto econômico’nas eleições presidenciais de 2022 no brasil. Revista InterAção, 13(2).
Popescu, M.-C., Balas, V. E., Perescu-Popescu, L., and Mastorakis, N. (2009). Multi-layer perceptron and neural networks. WSEAS Transactions on Circuits and Systems, 8(7):579–588.
Ranzani, L. H. and Caram, N. R. (2019). A migração da comunicação política para o ambiente digital: Twitter de jair bolsonaro no segundo turno das eleições presidenciais de 2018. Revista Multiplicidade, 9(9).
Reis, J., Gonçalves, P., Araújo, M., Pereira, A. C., and Benevenuto, F. (2015). Uma abordagem multilíngue para análise de sentimentos. In Anais do IV Brazilian Workshop on Social Network Analysis and Mining, Recife. SBC.
Rennó, L. (2022). Bolsonarismo e as eleições de 2022. Estudos Avançados, 36:147–163.
Ruediger, M. A. and Grassi, A. (2018). Redes sociais nas eleições 2018.
Silva, L. A. N. d. (2022). Ciência de dados como método de transformação de dados em informação.
Silva, S. M. B. (2023). Análise de sentimentos expressos no twitter em relação aos candidatos da eleição presidencial de 2022.
Souza, F., Nogueira, R., and Lotufo, R. (2020). Bertimbau: Pretrained bert models for brazilian portuguese. In Cerri, R. and Prati, R. C., editors, Intelligent Systems, pages 403–417, Cham. Springer International Publishing.
TSE, T. (2022). Resultados 2022.
Augusto, D. C. and da Silva, M. (2014). Apontamentos sobre política partidária e eleitores no município de guarapuava/pr: Considerações a partir de uma geografia eleitoral qualitativa. REVISTA PERCURSO, 6(2):55–76.
Belchior, A. M. (2016). Confiança nas instituições políticas. Fundação Francisco Manuel dos Santos, Lisboa.
Córdova Sáenz, C. A. and Becker, K. (2021). Assessing the use of attention weights to interpret bert-based stance classification. In IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology, pages 194–201, online.
de Ávila, P. V. M. L., de Brito, D. M., Santos, D. M., and Ferreira, E. d. A. M. (2022). Processamento de linguagem natural (pln) para automatização da checagem de conformidade: uma investigação do pré-processamento de um código regulatório urbanístico brasileiro. ENCONTRO NACIONAL DE TECNOLOGIA DO AMBIENTE CONSTRUÍDO, 19:1–12.
de Jesus Procópio, J. V., Lopes, L., and Feitosa, W. R. (2023). Geoanalytics aplicado ao conceito de cidades inteligentes. Revista de Inovação e Tecnologia-RIT, 13(1):109–117.
Gonçalves, G. F., Rocha, A. A. d. A., and Paes, A. (2022). Analisando as emoções dos tweets relacionadas à covid-19 no rio de janeiro. In Anais do VI Workshop de Computação Urbana, pages 210–223, Fortaleza. SBC.
Joyce, B. and Deng, J. (2017). Sentiment analysis of tweets for the 2016 us presidential election. In 2017 ieee mit undergraduate research technology conference (urtc), pages 1–4, Cambridge, MA, USA. IEEE.
Lago, I. C. et al. (2005). O significado do voto em eleções municipais: análise dos processos de decisão de voto em eleições para prefeito em itajaí/sc.
Ma, E. (2019). Nlp augmentation. [link].
Motta, K. S. d. (2018). Eleições no Brasil do Oitocentos: entre a inclusão e a exclusão da patuleia na cidadela política (1822-1881). PhD thesis, Tese (Doutorado em História). Universidade Federal do Espírito Santo.
Pavlidis, P., Wapinski, I., and Noble, W. S. (2004). Support vector machine classification on the web. Bioinformatics, 20(4):586–587.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830.
Perez, R. T., Barbosa, L. G. C., de Oliveira, M. T., and da Silva Vaccari, G. (2022). Comentários sobre a díade ‘voto ideológico’/‘voto econômico’nas eleições presidenciais de 2022 no brasil. Revista InterAção, 13(2).
Popescu, M.-C., Balas, V. E., Perescu-Popescu, L., and Mastorakis, N. (2009). Multi-layer perceptron and neural networks. WSEAS Transactions on Circuits and Systems, 8(7):579–588.
Ranzani, L. H. and Caram, N. R. (2019). A migração da comunicação política para o ambiente digital: Twitter de jair bolsonaro no segundo turno das eleições presidenciais de 2018. Revista Multiplicidade, 9(9).
Reis, J., Gonçalves, P., Araújo, M., Pereira, A. C., and Benevenuto, F. (2015). Uma abordagem multilíngue para análise de sentimentos. In Anais do IV Brazilian Workshop on Social Network Analysis and Mining, Recife. SBC.
Rennó, L. (2022). Bolsonarismo e as eleições de 2022. Estudos Avançados, 36:147–163.
Ruediger, M. A. and Grassi, A. (2018). Redes sociais nas eleições 2018.
Silva, L. A. N. d. (2022). Ciência de dados como método de transformação de dados em informação.
Silva, S. M. B. (2023). Análise de sentimentos expressos no twitter em relação aos candidatos da eleição presidencial de 2022.
Souza, F., Nogueira, R., and Lotufo, R. (2020). Bertimbau: Pretrained bert models for brazilian portuguese. In Cerri, R. and Prati, R. C., editors, Intelligent Systems, pages 403–417, Cham. Springer International Publishing.
TSE, T. (2022). Resultados 2022.
Published
2024-09-11
How to Cite
SILVA, Davi de Meneses; OLIVEIRA, Adonias Caetano de; ALMEIDA JUNIOR, Paulo Cesar de.
Sentiment Analysis of Tweets Regarding the 2022 Presidential Election in Brazil. In: REGIONAL SCHOOL ON COMPUTING OF CEARÁ, MARANHÃO, AND PIAUÍ (ERCEMAPI), 12. , 2024, Parnaíba/PI.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2024
.
p. 21-30.
DOI: https://doi.org/10.5753/ercemapi.2024.243291.
