Analysis of Twitter users' sentiments about the first round 2022 presidential election in Brazil

  • Daiana Kathrin Santana Santos Federal University of São Paulo
  • Lilian Berton Federal University of São Paulo

Abstract


The growth of internet and communication through social networks have made it easier to obtain information about what other individuals are thinking and what their opinion is on a given subject, however, a person manually cannot analyze all the comments on the network on a certain topic, requiring the use of technologies, computers and algorithms to assist in data analysis. Therefore, this work aims to collect, process, and classify the feelings of a sample of texts published on Twitter, in Portuguese, about the presidential elections in Brazil in 2022, using the Knowledge Discovery process in Database to analyze the comments and be able to sort the tweets into positive, neutral and negative opinions. We used two classic text representation (Bag of Words and TFIDF) and six classifiers (Naive Bayes, Decision Tree, Random Forest, K-Nearest Neighbors, MLP, and SVM). Thus, predicting which candidate has a greater acceptance/rejection by Brazilians in the 2022 elections, considering only the candidates with the best positions in polls of voting intentions. According to the results obtained using a balanced dataset in the training of algorithms, the candidate with the highest percentage of positive feelings was Jair Bolsonaro, neutral feelings was Luiz Inácio Lula da Silva and negative feelings was Ciro Gomes.

Keywords: Sentiment Analysis, Presidential election in Brazil, Twitter, Text classification

References

Alencar, C. Xp/ipespe: após intervalo de 52 dias, lula tem 44%, e bolsonaro, 35%. [On-line], [link]. accessed: 26.07.2022.

Caetano, J. A. C., Lima, H. S. L., dos Santos Santos, M. F., and Marques-Neto, H. T. M.-N. (2017). Utilizando análise de sentimentos para definição da homofilia política dos usuários do twitter durante a eleição presidencial americana de 2016. In Congresso da Sociedade Brasileira de Computação-CSBC.

de Camargo Penteado, C. L. and Guerbali, J. G. (2016). As manifestações do impeachment no twitter: uma análise sobre as manifestações de 2015. Ponto-e-Vírgula: Revista de Ciências Sociais, (19).

de Queiroz, G. G. and Almeida, L. (2020). Uma metodologia de análise de sentimentos dos candidatos as eleições presidenciais de 2018 no twitter. Revista de Engenharia e Pesquisa Aplicada, 5(1):21–30.

Ferrari, D. G. and Silva, L. N. d. C. (2017). Introdução a mineração de dados. Saraiva Educação SA.

Garcia, K. and Berton, L. (2021). Topic detection and sentiment analysis in twitter content related to covid-19 from brazil and the usa. Applied soft computing, 101:107057.

Jack Dorsey, E. W. e. B. S. Sobre o twitter. [On-line], [link]. accessed: 27.01.2022.

Koehn, P. and Mihalcea, R. (2009). Proceedings of the 2009 conference on empirical methods in natural language processing. In Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing.

Lorena, A. C., Gama, J., and Faceli, K. (2000). Inteligência artificial: uma abordagem de aprendizado de máquina. Grupo Gen-LTC.

Matsubara, E. T., Martins, C. A., and Monard, M. C. (2003). Pretext: Uma ferramenta para pré-processamento de textos utilizando a abordagem bag-of-words. Techinical Report, 209(4):10–11.

Passos, E. and Goldschmidt, R. (2005). Data mining: um guia prático. Editora Campus, Rio de Janeiro.

Silva, L. R. (2018). Análise de sentimentos aplicada à política.

Silva, N. (2010). Bestchoice: Classificação de sentimento em ferramentas de expressão de opinião. Trabalho de Graduação em Ciência da Computação–Centro de Informática/UFPE, Recife.

Viana, Z. L. (2014). Mineração de textos: análise de sentimentos utilizando tweets referentes às eleições presidenciais 2014.
Published
2023-09-25
SANTOS, Daiana Kathrin Santana; BERTON, Lilian. Analysis of Twitter users' sentiments about the first round 2022 presidential election in Brazil. In: NATIONAL MEETING ON ARTIFICIAL AND COMPUTATIONAL INTELLIGENCE (ENIAC), 20. , 2023, Belo Horizonte/MG. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2023 . p. 880-893. ISSN 2763-9061. DOI: https://doi.org/10.5753/eniac.2023.234511.