Análise de Sentimento de Postagens de Usuários no Twitter Combinando GPT-3 e Aprendizado de Máquina: Um Estudo de Caso Sobre o 2º Turno das Eleições Presidências Brasileiras
Abstract
In recent years, the influence of social media on elections around the world has become increasingly evident, for example, on Twitter. Texts posted on Twitter have attracted significant attention as an important source of information that can guide many decision-making processes. However, it becomes difficult to manually analyze all the comments on a certain subject on the internet. In this context, the aim of this study is to explore the application of the combination of GPT-3 and Machine Learning for the sentiment analysis of user posts on Twitter during the second round of the 2022 Brazilian presidential elections. GPT-3 and Machine Learning were able to accurately classify and identify the sentiments of user posts on Twitter. The proposed method obtained an accuracy of 90.88% using the Multinomial Naive Bayes classification algorithm.References
Barreto, S., Moura, R., Carvalho, J., Paes, A., and Plastino, A. (2023). Sentiment analysis in tweets: an assessment study from classical to modern word representation models. Data Mining and Knowledge Discovery, 37(1):318–380.
Biradar, S. H., Gorabal, J., and Gupta, G. (2022). Machine learning tool for exploring sentiment analysis on twitter data. Materials Today: Proceedings, 56:1927–1934.
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020). Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901.
Floridi, L. and Chiriatti, M. (2020). Gpt-3: Its nature, scope, limits, and consequences. Minds and Machines, 30:681–694.
Jain, T., Mathur, S., Ninnad, A., Nikshep, B., and Chalil, N. (2022). Analyzing of political tweets in hindi language using machine learning and deep learning. In 2022 IEEE International Conference on Data Science and Information System (ICDSIS), pages 1–5. IEEE.
Kheiri, K. and Karimi, H. (2023). Sentimentgpt: Exploiting gpt for advanced sentiment analysis and its departure from current machine learning. arXiv preprint arXiv:2307.10234.
Lammerse, M., Hassan, S. Z., Sabet, S. S., Riegler, M. A., and Halvorsen, P. (2022). Human vs. gpt-3: The challenges of extracting emotions from child responses. In 2022 14th International Conference on Quality of Multimedia Experience (QoMEX), pages 1–4. IEEE.
Lee, J., Warner, E., Shaikhouni, S., Bitzer, M., Kretzler, M., Gipson, D., Pennathur, S., Bellovich, K., Bhat, Z., Gadegbeku, C., et al. (2022). Unsupervised machine learning for identifying important visual features through bag-of-words using histopathology data from chronic kidney disease. Scientific Reports, 12(1):4832.
Mathew, L. and Bindu, V. (2020). A review of natural language processing techniques for sentiment analysis using pre-trained models. In 2020 Fourth International Conference on Computing Methodologies and Communication (ICCMC), pages 340–345. IEEE.
Mishra, P., Patil, S. A., Shehroj, U., Aniyeri, P., and Khan, T. A. (2022). Twitter sentiment analysis using naive bayes algorithm. In 2022 3rd International Informatics and Software Engineering Conference (IISEC), pages 1–5. IEEE.
Pandya, V., Somthankar, A., Shrivastava, S. S., and Patil, M. (2021). Twitter sentiment analysis using machine learning and deep learning techniques. In 2021 2nd International Conference on Communication, Computing and Industry 4.0 (C2I4), pages 1–5. IEEE.
Pawar, C. S. and Makwana, A. (2022). Comparison of bert-base and gpt-3 for marathi text classification. In Futuristic Trends in Networks and Computing Technologies: Select Proceedings of Fourth International Conference on FTNCT 2021, pages 563–574. Springer.
Pradana, A. W. and Hayaty, M. (2019). The effect of stemming and removal of stopwords on the accuracy of sentiment analysis on indonesian-language texts. Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, pages 375–380.
Rodríguez-Ibánez, M., Casánez-Ventura, A., Castejón-Mateos, F., and Cuenca-Jiménez, P.-M. (2023). A review on sentiment analysis from social media platforms. Expert Systems with Applications, page 119862.
Singh, S., Kumar, K., and Kumar, B. (2022). Sentiment analysis of twitter data using tf-idf and machine learning techniques. In 2022 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COM-IT-CON), volume 1, pages 252–255. IEEE.
Sohrabi, M. K. and Hemmatian, F. (2019). An efficient preprocessing method for supervised sentiment analysis by converting sentences to numerical vectors: a twitter case study. Multimedia tools and applications, 78(17):24863–24882.
Wang, C.-C., Day, M.-Y., and Wu, C.-L. (2022). Political hate speech detection and lexicon building: A study in taiwan. IEEE Access, 10:44337–44346.
Biradar, S. H., Gorabal, J., and Gupta, G. (2022). Machine learning tool for exploring sentiment analysis on twitter data. Materials Today: Proceedings, 56:1927–1934.
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020). Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901.
Floridi, L. and Chiriatti, M. (2020). Gpt-3: Its nature, scope, limits, and consequences. Minds and Machines, 30:681–694.
Jain, T., Mathur, S., Ninnad, A., Nikshep, B., and Chalil, N. (2022). Analyzing of political tweets in hindi language using machine learning and deep learning. In 2022 IEEE International Conference on Data Science and Information System (ICDSIS), pages 1–5. IEEE.
Kheiri, K. and Karimi, H. (2023). Sentimentgpt: Exploiting gpt for advanced sentiment analysis and its departure from current machine learning. arXiv preprint arXiv:2307.10234.
Lammerse, M., Hassan, S. Z., Sabet, S. S., Riegler, M. A., and Halvorsen, P. (2022). Human vs. gpt-3: The challenges of extracting emotions from child responses. In 2022 14th International Conference on Quality of Multimedia Experience (QoMEX), pages 1–4. IEEE.
Lee, J., Warner, E., Shaikhouni, S., Bitzer, M., Kretzler, M., Gipson, D., Pennathur, S., Bellovich, K., Bhat, Z., Gadegbeku, C., et al. (2022). Unsupervised machine learning for identifying important visual features through bag-of-words using histopathology data from chronic kidney disease. Scientific Reports, 12(1):4832.
Mathew, L. and Bindu, V. (2020). A review of natural language processing techniques for sentiment analysis using pre-trained models. In 2020 Fourth International Conference on Computing Methodologies and Communication (ICCMC), pages 340–345. IEEE.
Mishra, P., Patil, S. A., Shehroj, U., Aniyeri, P., and Khan, T. A. (2022). Twitter sentiment analysis using naive bayes algorithm. In 2022 3rd International Informatics and Software Engineering Conference (IISEC), pages 1–5. IEEE.
Pandya, V., Somthankar, A., Shrivastava, S. S., and Patil, M. (2021). Twitter sentiment analysis using machine learning and deep learning techniques. In 2021 2nd International Conference on Communication, Computing and Industry 4.0 (C2I4), pages 1–5. IEEE.
Pawar, C. S. and Makwana, A. (2022). Comparison of bert-base and gpt-3 for marathi text classification. In Futuristic Trends in Networks and Computing Technologies: Select Proceedings of Fourth International Conference on FTNCT 2021, pages 563–574. Springer.
Pradana, A. W. and Hayaty, M. (2019). The effect of stemming and removal of stopwords on the accuracy of sentiment analysis on indonesian-language texts. Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, pages 375–380.
Rodríguez-Ibánez, M., Casánez-Ventura, A., Castejón-Mateos, F., and Cuenca-Jiménez, P.-M. (2023). A review on sentiment analysis from social media platforms. Expert Systems with Applications, page 119862.
Singh, S., Kumar, K., and Kumar, B. (2022). Sentiment analysis of twitter data using tf-idf and machine learning techniques. In 2022 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COM-IT-CON), volume 1, pages 252–255. IEEE.
Sohrabi, M. K. and Hemmatian, F. (2019). An efficient preprocessing method for supervised sentiment analysis by converting sentences to numerical vectors: a twitter case study. Multimedia tools and applications, 78(17):24863–24882.
Wang, C.-C., Day, M.-Y., and Wu, C.-L. (2022). Political hate speech detection and lexicon building: A study in taiwan. IEEE Access, 10:44337–44346.
Published
2023-10-16
How to Cite
PEREIRA, Ronilson; ALVES, André; VIDAL, Douglas; MOURA, Flávio; CABRAL, Laura; PAULINO, Rita; SERRUFO, Marcos; FIGUEIREDO, Karla.
Análise de Sentimento de Postagens de Usuários no Twitter Combinando GPT-3 e Aprendizado de Máquina: Um Estudo de Caso Sobre o 2º Turno das Eleições Presidências Brasileiras. In: WORKSHOP ON ASPECTS OF HUMAN-COMPUTER INTERACTION FOR THE SOCIAL WEB (WAIHCWS), 14. , 2023, Maceió/AL.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2023
.
p. 20-27.
ISSN 2596-0296.
DOI: https://doi.org/10.5753/waihcws.2023.233507.
