Integration of BERT and SVM in Sentiment Analysis of Twitter/X Regarding Constitutional Court Decision No. 60/PUU-XXII/2024
DOI:
https://doi.org/10.52436/1.jutif.2025.6.2.4068Keywords:
Machine Learning , Natural Language Processing (NLP), Public Opinion, Social Media, Text ClassificationAbstract
This research analyzes public sentiment towards the Indonesian Constitutional Court's decision No. 60/PUU- XXII/2024 by utilizing natural language processing techniques using the BERT (Bidirectional Encoder Representations from Transformers) model and the Support Vector Machine model (SVM). The research methodology includes four stages: data preprocessing, data labeling using BERT, embedding extraction, and SVM model training. The data is taken from the Twitter platform, where various public opinions are reflected in three sentiment categories: positive, neutral, and negative. The preprocessing process results in the removal of approximately 23% of duplicate data, and sentiment labeling shows a dominance of the positive category. Evaluation results from the SVM model training demonstrated varying performance: negative sentiment achieved a Precision of 0.57, Recall of 0.36, and F1-score of 0.44; neutral sentiment had a Precision of 0.81, Recall of 0.62, and F1-score of 0.70; while positive sentiment recorded a Precision of 0.98, Recall of 1.00, and F1-score of 0.99. The model's overall accuracy reached 0.97. These findings indicate that the integration of BERT and SVM is effective for sentiment classification, but improvements are needed in the negative and neutral categories to achieve more balanced performance.
Downloads
References
Perludem, “Putusan MK Nomor 60/PUU-XXII/2024 Tentang Ambang Batas Pencalonan Kepala Daerah di Pilkada,” Perkumpulan untuk Pemilu dan Demokrasi. Accessed: Oct. 03, 2024. [Online]. Available: https://perludem.org/2024/08/28/putusan-mk-nomor-60-puu-xxii- 2024/
R. Redo, Data Tweet 20-Agustus-2024 s/d 27-Agustus-2024 (key:Putusan MK-No.60/PUU- XXII/2024). 2024. doi: 10.13140/RG.2.2.32656.42242.
M. Agarina, S. Sutedi, A. S. Karim, and E. R. Sari, “Strategi Marketing Promosi Penerimaan Mahasiswa Baru Menggunakan K-Means Clustering,” TEKNIKA 18 (2), 673 –682-673 –, vol. 682. 2024.
D. Wijaya and S. Sutedi, “Analisis Sentimen Opini Masyarakat Terhadap Penerapan Pelayanan Digital Di Desa Margo Mulyo Menggunakan Algoritma K-Nearest Neighbor,” JURNAL ILMU KOMPUTER, SISTEM INFORMASI, TEKNIK INFORMATIKA, vol. 3, no. 1.
pp. 13–26, 2024.
M. E. M. Abo, “A multi-criteria approach for arabic dialect sentiment analysis for online reviews: Exploiting optimal machine learning algorithm selection,” Sustainability (Switzerland), vol. 13, no. 18. 2021. doi: 10.3390/su131810018.
H. Adamu, “Framing twitter public sentiment on Nigerian government COVID-19 palliatives distribution using machine learning,” Sustainability (Switzerland), vol. 13, no. 6. 2021. doi: 10.3390/su13063497.
H. Kurniawan, J. Triloka, and Y. Ardhan, “Analysis of the Artificial Neural Network Approach in the Extreme Learning Machine Method for Mining Sales Forecasting Development,” International Journal of Advanced Computer Science and Applications, vol. 14, no. 1. 2023.
H. Nisar and Wasilah, “Pemanfaatan K Means Clustering dalam Pengelompokan Judul Skripsi,” Jurnal Penelitian Ilmu Dan Teknologi Komputer, vol. 14, no. 1. pp. 19–26, 2022.
D. M. Abdullah, “Machine Learning Applications based on SVM Classification: A Review,”
Qubahan Academic Journal, vol. 1, no. 2. pp. 81–90, 2021. doi: 10.48161/qaj.v1n2a50.
J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding.” 2019. [Online]. Available: https://arxiv.org/abs/1810.04805
N. Chintalapudi, “Sentimental analysis of COVID-19 tweets using deep learning models,”
Infectious Disease Reports, vol. 13, no. 2. 2021. doi: 10.3390/IDR13020032.
Y. Cui, “Pre-Training with Whole Word Masking for Chinese BERT,” IEEE/ACM Transactions on Audio Speech and Language Processing, vol. 29. pp. 3504–3514, 2021. doi: 10.1109/TASLP.2021.3124365.
S. Bengesi, “A Machine Learning-Sentiment Analysis on Monkeypox Outbreak: An Extensive Dataset to Show the Polarity of Public Opinion From Twitter Tweets,” IEEE Access, vol. 11.
pp. 11811–11826, 2023. doi: 10.1109/ACCESS.2023.3242290.
Z. Zhang, “A Study on Early Warnings of Financial Crisis of Chinese Listed Companies Based on DEA–SVM Model,” Mathematics, vol. 10, no. 12. 2022. doi: 10.3390/math10122142.
S. Y. Irianto, S. Karnila, and D. Yuliawati, “Study of Manhattan and Region Growing Methods for Brain Tumor Detection,” Journal of Advances in Information Technology, vol. 15, no. 2. 2024.
G. Bourahouat, “Improvement of Moroccan Dialect Sentiment Analysis Using Arabic BERT- Based Models,” Journal of Computer Science, vol. 20, no. 2. pp. 157–167, 2024. doi: 10.3844/jcssp.2024.157.167.
Fransiscus, “Sentiment Analysis of COVID-19 Public Activity Restriction (PPKM) Impact using BERT Method,” International Journal of Engineering Trends and Technology, vol. 70, no. 12. pp. 281–288, 2022. doi: 10.14445/22315381/IJETT-V70I12P226.
M. Mozafari, “Hate speech detection and racial bias mitigation in social media based on BERT model,” PLoS ONE, vol. 15, no. 8. 2020. doi: 10.1371/journal.pone.0237861.
T. Wang, “COVID-19 Sensing: Negative Sentiment Analysis on Social Media in China via BERT Model,” IEEE Access, vol. 8. pp. 138162–138169, 2020. doi: 10.1109/ACCESS.2020.3012595.
L. Zhao, “A BERT based Sentiment Analysis and Key Entity Detection Approach for Online Financial Texts,” Proceedings of the 2021 IEEE 24th International Conference on Computer Supported Cooperative Work in Design, CSCWD 2021. pp. 1233–1238, 2021. doi: 10.1109/CSCWD49262.2021.9437616.
M. Singh, “Sentiment analysis on the impact of coronavirus in social life using the BERT model,” Social Network Analysis and Mining, vol. 11, no. 1. 2021. doi: 10.1007/s13278-021- 00737-z.
R. K. Kaliyar, “FakeBERT: Fake news detection in social media with a BERT-based deep learning approach,” Multimedia Tools and Applications, vol. 80, no. 8. pp. 11765–11788, 2021. doi: 10.1007/s11042-020-10183-2.
L. K. Ramasamy, “Performance analysis of sentiments in Twitter dataset using SVM models,” International Journal of Electrical and Computer Engineering, vol. 11, no. 3. pp. 2275–2284, 2021. doi: 10.11591/ijece.v11i3.pp2275-2284.
K. X. Han, “Application of support vector machine (SVM) in the sentiment analysis of twitter dataset,” Applied Sciences (Switzerland), vol. 10, no. 3. 2020. doi: 10.3390/app10031125.
K. Aurangzeb, “Aspect Based Multi-Labeling Using SVM Based Ensembler,” IEEE Access, vol. 9. pp. 26026–26040, 2021. doi: 10.1109/ACCESS.2021.3055768.
“config.json · indobenchmark/indobert-base-p1 at main.” Accessed: Nov. 30, 2024. [Online].
Available: https://huggingface.co/indobenchmark/indobert-base-p1/blob/main/config.json
M. R. Redo and A. Perdana, “ANALISIS KETIDAKSEIMBANGAN KELAS DALAM
PENGEMBANGAN MODEL KLASIFIKASI,” Proceedings of the National Conference on Electrical Engineering …. 2023.
R. Obiedat, “Sentiment Analysis of Customers’ Reviews Using a Hybrid Evolutionary SVM- Based Approach in an Imbalanced Data Distribution,” IEEE Access, vol. 10. pp. 22260– 22273, 2022. doi: 10.1109/ACCESS.2022.3149482.
Additional Files
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Artia Irianti, Halimah, Sutedi, Melda Agariana

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