UNDERSTANDING PUBLIC OPINION ON POLITICAL CANDIDATES THROUGH TWITTER SENTIMENT ANALYSIS: A COMPARATIVE STUDY OF FEATURE EXTRACTION

Amelia Devi Putri Ariyanto, Fari Katul Fikriah

Abstract


Presidential elections are crucial in a country's political dynamics and are increasingly discussed on social media platforms like Twitter. However, sentiment analysis of public opinion on these platforms faces significant challenges, such as large data volumes, diverse formats, and the complexity of informal language. The key challenge is choosing the most appropriate feature extraction technique and classification algorithm to address the unique characteristics of Indonesian-language tweets in the context of presidential elections. This study aims to compare the effectiveness of two feature extraction approaches—semantic based on BERT (Bidirectional Encoder Representations from Transformers) and statistical based on TF-IDF (Term Frequency-Inverse Document Frequency)—in sentiment analysis of Indonesian-language tweets related to the presidential election, using four classification algorithms: Support Vector Machine (SVM), Naive Bayes, K-Nearest Neighbors, and Decision Tree. The experimental results demonstrate that the combination of TF-IDF with SVM provides the best performance, with an accuracy of 85.1% and a macro f1-score of 0.81, outperforming the BERT approach used statically. These findings indicate that statistical approaches such as TF-IDF remain relevant and practical for short social media texts and emphasize the importance of choosing a method that suits the characteristics of the data and the context of the analysis.


Full Text:

PDF

References


A. N. Ma’aly, D. Pramesti, A. D. Fathurahman, and H. Fakhrurroja, “Exploring Sentiment Analysis for the Indonesian Presidential Election Through Online Reviews Using Multi-Label Classification with a Deep Learning Algorithm,” Information (Switzerland), vol. 15, no. 11, pp. 1–33, 2024, doi: 10.3390/info15110705.

A. D. P. Ariyanto, D. Purwitasari, B. Amaliah, C. Fatichah, M. G. Taqiuddin, and Haikal, “Annotated Data for Semantic Role Labeling of Crisis Events in Indonesian Tweets,” Data Brief, p. 111688, 2025, doi: https://doi.org/10.1016/j.dib.2025.111688.

F. W. Edlim et al., “Urgency Detection of Events Through Twitter Post: A Research Overview,” ICECOS 2024 - 4th International Conference on Electrical Engineering and Computer Science, Proceeding, pp. 406–411, 2024, doi: 10.1109/ICECOS63900.2024.10791202.

A. D. P. Ariyanto, F. K. Fikriah, and A. F. Setyawan, “Impact of Statistical and Semantic Features Extraction for Emotion Detection on Indonesian Short Text Sentences,” COMMIT (COMMUNICATION AND INFORMATION TECHNOLOGY) JOURNAL, vol. 19, no. 1, pp. 1–13, 2025.

A. D. P. Ariyanto, D. Purwitasari, and C. Fatichah, “A Systematic Review on Semantic Role Labeling for Information Extraction in Low-Resource Data,” IEEE Access, vol. 12, no. April, pp. 57917–57946, 2024, doi: 10.1109/ACCESS.2024.3392370.

A. D. P. Ariyanto, C. Fatichah, and D. Purwitasari, “Semantic Role Labeling for Information Extraction on Indonesian Texts: A Literature Review,” in 2023 International Seminar on Intelligent Technology and Its Applications (ISITIA), IEEE, Jul. 2023, pp. 119–124. doi: 10.1109/ISITIA59021.2023.10221008.

R. Cahyanti, D. N. Maftuhah, A. B. Santoso, and I. Budi, “Twitter Sentiment Analysis Towards Candidates of the 2024 Indonesian Presidential Election,” JURNAL RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 10, no. 4, pp. 516–524, 2024, [Online]. Available: http://jurnal.iaii.or.id

F. Firmansyah et al., “Comparing Sentiment Analysis of Indonesian Presidential Election 2019 with Support Vector Machine and K-Nearest Neighbor Algorithm,” 6th International Conference on Computing, Engineering, and Design, ICCED 2020, pp. 3–8, 2020, doi: 10.1109/ICCED51276.2020.9415767.

Asno Azzawagama Firdaus, Anton Yudhana, and Imam Riadi, “Analisis Sentimen Pada Proyeksi Pemilihan Presiden 2024 Menggunakan Metode Support Vector Machine,” Decode: Jurnal Pendidikan Teknologi Informasi, vol. 3, no. 2, pp. 236–245, 2023, doi: 10.51454/decode.v3i2.172.

A. F. Setyawan, A. Devi, P. Ariyanto, F. K. Fikriah, and R. I. Nugraha, “Analisis Sentimen Ulasan iPhone di Amazon Menggunakan Model Deep Learning BERT Berbasis Transformer,” JURNAL ELEKTRONIKA DAN KOMPUTER (ELKOM), vol. 17, no. 2, pp. 447–452, 2024.

A. A. Firdaus, A. Yudhana, I. Riadi, and Mahsun, “Indonesian presidential election sentiment: Dataset of response public before 2024,” Data Brief, vol. 52, p. 109993, 2024, doi: 10.1016/j.dib.2023.109993.

A. T. Ni’mah and A. Z. Arifin, “Perbandingan Metode Term Weighting terhadap Hasil Klasifikasi Teks pada Dataset Terjemahan Kitab Hadis,” Rekayasa, vol. 13, no. 2, pp. 172–180, 2020.

A. D. P. Ariyanto, L. A, A. Z. A, M. Maryamah, R. W. S, and R. I, “Metode Pembobotan Kata Berbasis Cluster Untuk Perangkingan Dokumen Berbahasa Arab,” Techno.Com, vol. 20, no. 2, pp. 259–267, May 2021, doi: 10.33633/tc.v20i2.4357.

A. D. P. Ariyanto, F. K. Fikriah, and A. F. Setyawan, “Emotion Detection Using Contextual Embeddings for Indonesian Product Review Texts on E-commerce Platform,” JURNAL ILMIAH KOMPUTER GRAFIS, vol. 17, no. 1, pp. 179–185, 2024.

N. A. Maulidiyyah, T. Trimono, A. T. Damaliana, and D. A. Prasetya, “Comparison of Decision Tree and Random Forest Methods in the Classification of Diabetes Mellitus,” JIKO (Jurnal Informatika dan Komputer), vol. 7, no. 2, pp. 79–87, 2024, doi: 10.33387/jiko.v7i2.8316.

M. T. Nawawi and A. Suhendar, “IMPLEMENTATION OF MSME CREDIT LOAN DETERMINATION USING MACHINE LEARNING TECHNOLOGY WITH K-NN ALGORITHM,” JIKO (Jurnal Informatika dan Komputer), vol. 7, no. 3, pp. 217–221, 2024, doi: 10.33387/jiko.v7i3.9064.

K. Yuliawan and S. Murib, “Comparison of Decision Tree and Naïve Bayes Algorithms in Predicting Student Graduation At Ypk Junior High School, Nabire Regency,” JIKO (Jurnal Informatika dan Komputer), vol. 7, no. 2, pp. 117–122, 2024, doi: 10.33387/jiko.v7i2.8506.

P. Wicaksono and S. Sriani, “Application of Support Vector Machine Algorithm for Students’ Final Assignment Stress Classification,” JIKO (Jurnal Informatika dan Komputer), vol. 7, no. 2, pp. 138–144, 2024, doi: 10.33387/jiko.v7i2.8618.

F. A. Ramadhan and P. H. Gunawan, “Sentiment Analysis of 2024 Presidential Candidates in Indonesia: Statistical Descriptive and Logistic Regression Approach,” 2023 International Conference on Data Science and Its Applications, ICoDSA 2023, pp. 327–332, 2023, doi: 10.1109/ICoDSA58501.2023.10276417.

F. Koto, A. Rahimi, J. Lau, and T. Baldwin, “IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP,” in Proceedings of the 28th International Conference on Computational Linguistics, 2020, pp. 757–770. doi: 10.18653/v1/2020.coling-main.66.




DOI: https://doi.org/10.33387/jiko.v8i2.9993

Refbacks

  • There are currently no refbacks.