Sentiment Analysis On Indonesian Tweets about the 2024 Election
DOI:
10.33395/sinkron.v9i1.14481Keywords:
deep learning, gru, lstm,machine learning, naive bayes, sentiment analysis, svmAbstract
This study investigates public sentiment on Indonesian Twitter regarding the 2024 General Election, employing machine learning and deep learning techniques, including Naïve Bayes, Support Vector Machines (SVM), Long Short-Term Memory (LSTM), and Gated Recurrent Unit (GRU). The dataset was collected using a Tweet Harvest method with the keyword "Pemilu" and underwent preprocessing steps such as case folding, removal of symbols and URLs, stopword elimination, and tokenization to ensure data quality. Performance evaluation metrics, including accuracy, precision, recall, and F1-score, were applied to assess the models' effectiveness. Naïve Bayes achieved the highest accuracy of 64%, followed by SVM at 63%, LSTM at 60%, and GRU at 57%. The findings indicate that traditional models like Naïve Bayes and SVM perform effectively on smaller datasets with structured features, while deep learning models excel in capturing complex sequential dependencies. However, deep learning methods exhibited overfitting tendencies, indicating the need for better regularization and optimization techniques. Furthermore, it emphasizes the potential of integrating traditional algorithms with advanced methods to enhance sentiment classification accuracy and generalizability across diverse datasets.
Downloads
References
Aakash, Gupta, S., & Noliya, A. (2024). URL-Based Sentiment Analysis of Product Reviews Using LSTM and GRU. Procedia Computer Science, 235(2023), 1814–1823. https://doi.org/10.1016/j.procs.2024.04.172
Abid, F., Li, C., & Alam, M. (2020). Multi-source social media data sentiment analysis using bidirectional recurrent convolutional neural networks. Computer Communications, 157(December 2019), 102–115. https://doi.org/10.1016/j.comcom.2020.04.002
Akbar, M. Z., Ikhsan, M., & Zufria, I. (2024). Sentiment Analysis of the Indriver Online Ojek Application using the Naïve Bayes Classifier Method. Sinkron, 8(3), 2037–2048. https://doi.org/10.33395/sinkron.v8i3.13934
AL-Smadi, M., Hammad, M. M., Al-Zboon, S. A., AL-Tawalbeh, S., & Cambria, E. (2023). Gated recurrent unit with multilingual universal sentence encoder for Arabic aspect-based sentiment analysis. Knowledge-Based Systems, 261. https://doi.org/10.1016/j.knosys.2021.107540
Alessia Mammone, M. T. and N. C. (2009). SVM: Support Vector Machines. The Top Ten Algorithms in Data Mining, December, 37–59. https://doi.org/10.1201/9781420089653-10
Alruily, M. (2023). Sentiment analysis for predicting stress among workers and classification utilizing CNN: Unveiling the mechanism. Alexandria Engineering Journal, 81(July), 360–370. https://doi.org/10.1016/j.aej.2023.09.040
Awotunde, J. B., Misra, S., Katta, V., & Adebayo, O. C. (2023). An Ensemble-Based Hotel Reviews System Using Naive Bayes Classifier. CMES - Computer Modeling in Engineering and Sciences, 137(1), 131–154. https://doi.org/10.32604/cmes.2023.026812
Berlyand, L., Jabin, P. E., & Safsten, C. A. (2021). Stability for the training of deep neural networks and other classifiers. Mathematical Models and Methods in Applied Sciences, 31(11), 2345–2390. https://doi.org/10.1142/S0218202521500500
Blanquero, R., Carrizosa, E., Ramírez-Cobo, P., & Sillero-Denamiel, M. R. (2021). Variable selection for Naïve Bayes classification. Computers and Operations Research, 135, 105456. https://doi.org/10.1016/j.cor.2021.105456
Camacho-Collados, J., & Pilehvar, M. T. (2017). On the Role of Text Preprocessing in Neural Network Architectures: An Evaluation Study on Text Categorization and Sentiment Analysis. ArXiv, abs/1707.0. https://doi.org/10.18653/v1/W18-5406
Chai, C. P. (2023). Comparison of text preprocessing methods. Natural Language Engineering, 29(3), 509–553. https://doi.org/DOI: 10.1017/S1351324922000213
Damayanti, L., & Lhaksmana, K. M. (2024). Sentiment Analysis of the 2024 Indonesia Presidential Election on Twitter. Sinkron, 8(2), 938–946. https://doi.org/10.33395/sinkron.v8i2.13379
DiPietro, R., & Hager, G. D. (2019). Deep learning: RNNs and LSTM. In Handbook of Medical Image Computing and Computer Assisted Intervention. Elsevier Inc. https://doi.org/10.1016/B978-0-12-816176-0.00026-0
Fitri, V. A., Andreswari, R., & Hasibuan, M. A. (2019). Sentiment analysis of social media Twitter with case of Anti-LGBT campaign in Indonesia using Naïve Bayes, decision tree, and random forest algorithm. Procedia Computer Science, 161, 765–772. https://doi.org/10.1016/j.procs.2019.11.181
Greff, K., Srivastava, R. K., Koutnik, J., Steunebrink, B. R., & Schmidhuber, J. (2017). LSTM: A Search Space Odyssey. IEEE Transactions on Neural Networks and Learning Systems, 28(10), 2222–2232. https://doi.org/10.1109/TNNLS.2016.2582924
Hickman, L., Thapa, S., Tay, L., Cao, M., & Srinivasan, P. (2022). Text Preprocessing for Text Mining in Organizational Research: Review and Recommendations. Organizational Research Methods, 25(1), 114–146. https://doi.org/10.1177/1094428120971683
Hulu, A. M. F., & Lhaksmana, K. M. (2019). Analisis Sentimen Politik pada Twitter Menggunakan Metode Support Vector Machine (Studi Kasus : Pilpres 2019). E-Proceeding of Engineering, 6(2), 2017–2020.
Iddrisu, A. M., Mensah, S., Boafo, F., Yeluripati, G. R., & Kudjo, P. (2023). A sentiment analysis framework to classify instances of sarcastic sentiments within the aviation sector. International Journal of Information Management Data Insights, 3(2). https://doi.org/10.1016/j.jjimei.2023.100180
Idris, M., Rifai, A., & Tania, K. D. (2025). Sentiment Analysis of Tokopedia App Reviews using Machine Learning and Word Embeddings. 9(1), 210–219.
Jabbar, A., Iqbal, S., Tamimy, M. I., Rehman, A., Bahaj, S. A., & Saba, T. (2023). An Analytical Analysis of Text Stemming Methodologies in Information Retrieval and Natural Language Processing Systems. IEEE Access, 11, 133681–133702. https://doi.org/10.1109/ACCESS.2023.3332710
Kar, P., & Debbarma, S. (2023). Sentimental analysis & Hate speech detection on English and German text collected from social media platforms using optimal feature extraction and hybrid diagonal gated recurrent neural network. Engineering Applications of Artificial Intelligence, 126(January). https://doi.org/10.1016/j.engappai.2023.107143
Kaur, J., & Saini, J. R. (2015). A Natural Language Processing Approach for Identification of Stop Words in Punjabi Language. International Journal of Data Mining And Emerging Technologies, 5(2), 114. https://doi.org/10.5958/2249-3220.2015.00015.4
Ladani, D. J., & Desai, N. P. (2020). Stopword Identification and Removal Techniques on TC and IR applications: A Survey. 2020 6th International Conference on Advanced Computing and Communication Systems, ICACCS 2020, 466–472. https://doi.org/10.1109/ICACCS48705.2020.9074166
Landi, F., Baraldi, L., Cornia, M., & Cucchiara, R. (2021). Working Memory Connections for LSTM. Neural Networks, 144, 334–341. https://doi.org/10.1016/j.neunet.2021.08.030
Li, S., Li, W., Cook, C., Zhu, C., & Gao, Y. (2018). Independently Recurrent Neural Network (IndRNN): Building A Longer and Deeper RNN. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 5457–5466. https://doi.org/10.1109/CVPR.2018.00572
Liu, N., & Shen, B. (2020). Aspect-based sentiment analysis with gated alternate neural network. Knowledge-Based Systems, 188. https://doi.org/10.1016/j.knosys.2019.105010
Melton, C. A., Olusanya, O. A., Ammar, N., & Shaban-Nejad, A. (2021). Public sentiment analysis and topic modeling regarding COVID-19 vaccines on the Reddit social media platform: A call to action for strengthening vaccine confidence. Journal of Infection and Public Health, 14(10), 1505–1512. https://doi.org/10.1016/j.jiph.2021.08.010
Moguerza, J. M., & Muñoz, A. (2006). Support vector machines with applications. Statistical Science, 21(3), 322–336. https://doi.org/10.1214/088342306000000493
MR ADEPU RAJESH, & DR TRYAMBAK HIWARKAR. (2023). Exploring Preprocessing Techniques for Natural LanguageText: A Comprehensive Study Using Python Code. International Journal of Engineering Technology and Management Sciences, 7(5), 390–399. https://doi.org/10.46647/ijetms.2023.v07i05.047
Muhajir, M., Rosadi, D., Mada, U. G., & Regency, S. (2024). Sentiment Analysis and Topic Modelling of Bjorka Using Support Vector Machine and Latent Dirichlet Allocation. 5(1), 57–66.
Murfi, H., Theresia Gowandi, S., Ardaneswari, G., & Nurrohmah, S. (2024). BERT-based combination of convolutional and recurrent neural network for indonesian sentiment analysis. Applied Soft Computing, 151(June 2023). https://doi.org/10.1016/j.asoc.2023.111112
Pandey, A., & Vishwakarma, D. K. (2023). Progress, Achievements, and Challenges in Multimodal Sentiment Analysis Using Deep Learning: A Survey. Applied Soft Computing, 152(December 2023), 111206. https://doi.org/10.1016/j.asoc.2023.111206
Pavlov, D., Balasubramanyan, R., Dom, B., Kapur, S., & Parikh, J. (2004). Document preprocessing for Naive Bayes classification and clustering with mixture of multinomials. KDD-2004 - Proceedings of the Tenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 829–834. https://doi.org/10.1145/1014052.1016922
Polyzos, Efstathios & Wang, F. (2022). Polyzos, Efstathios & Wang, Fang. Energy Economics, 114.
Rana, R. (2016). Gated Recurrent Unit (GRU) for Emotion Classification from Noisy Speech. 1–9. http://arxiv.org/abs/1612.07778
Ruuska, S., Hämäläinen, W., Kajava, S., Mughal, M., Matilainen, P., & Mononen, J. (2018). Evaluation of the confusion matrix method in the validation of an automated system for measuring feeding behaviour of cattle. Behavioural Processes, 148, 56–62. https://doi.org/10.1016/j.beproc.2018.01.004
Saberi, B., & Saad, S. (2017). Sentiment analysis or opinion mining: A review. International Journal on Advanced Science, Engineering and Information Technology, 7(5), 1660–1666. https://doi.org/10.18517/ijaseit.7.5.2137
Samsir, Irmayani, D., Edi, F., Harahap, J. M., Jupriaman, Rangkuti, R. K., Ulya, B., & Watrianthos, R. (2021). Naives Bayes Algorithm for Twitter Sentiment Analysis. Journal of Physics: Conference Series, 1933(1). https://doi.org/10.1088/1742-6596/1933/1/012019
Talaat, A. S. (2023). Sentiment analysis classification system using hybrid BERT models. Journal of Big Data, 10(1). https://doi.org/10.1186/s40537-023-00781-w
Yin, W., Kann, K., Yu, M., & Schütze, H. (2017). Comparative Study of CNN and RNN for Natural Language Processing. http://arxiv.org/abs/1702.01923
Yu, Y., Si, X., Hu, C., & Zhang, J. (2019). A Review of Recurrent Neural Networks: LSTM Cells and Network Architectures. Neural Computation, 31(7), 1235–1270. https://doi.org/10.1162/neco_a_01199
Downloads
How to Cite
Issue
Section
License
Copyright (c) 2025 Alfan Ramadhan Sembiring, Chandra Kusuma Dewa

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.