Analisis Sentimen Komentar Netizen Terhadap Isu Ijazah Presiden Joko Widodo Menggunakan Naive Bayes Dengan Pelabelan Fuzzy Logic Berbasis Leksikon
Keywords:
Sentiment Analysis, Text Preprocessing, TF-IDF, Naïve Bayes, Fuzzy Logic, Jokowi’s Diploma, Netizens’ Comment, Indonesian LanguageAbstract
The controversy surrounding the legitimacy of President Joko Widodo's diploma has sparked widespread discussion on social media, generating diverse public comments with positive, negative, and neutral sentiments. This study aims to analyze Indonesian-language sentiment on the issue using a sequential approach that combines Fuzzy Logic-based labeling with Naive Bayes classification. The methodology encompasses several stages: comprehensive text preprocessing (case folding, tokenizing, filtering, and stemming), term weighting with TF-IDF (Term Frequency-Inverse Document Frequency), automated sentiment labeling using lexicon-based Fuzzy Logic with a conservative threshold of ±2, and supervised classification using the Naive Bayes algorithm. A total of 10,027 comments were collected from three major social media platforms Twitter (X), YouTube, and TikTok spanning the period from December 2024 to May 2025. The dataset was divided into 80% training data (8,021 comments) and 20% test data (2,006 comments). The Fuzzy Logic labeling process, utilizing 28 positive keywords and 36 negative keywords, identified a sentiment distribution of 72.38% neutral, 22.98% positive, and 4.64% negative comments. The Naive Bayes model achieved an overall accuracy of 80.76%, demonstrating excellent performance in detecting neutral sentiment (precision 0.82, recall 0.98) but exhibited lower performance for minority classes: positive sentiment (precision 0.70, recall 0.41) and negative sentiment (precision 0.80, recall 0.04). The class imbalance significantly influenced model predictions, with 85.48% of predictions classified as neutral.
References
[1] L. Rifky, Z. Nugraha, B. Saputra, D. Pratama, E. Raswir, and Y. Pratama, “Implementasi Data Mining Untuk Penjualan Mobil Menggunakan Metode Naive Bayes,” Jurnal Informatika Dan Rekayasa Komputer(JAKAKOM), vol. 2, no. 2, pp. 225–230, 2022, doi: 10.33998/jakakom.2022.2.2.109.
[2] I. Sari Tomagola, A. Id Hidiana, P. Nurul Sabrina, A. Yani Jl Jenderal Achmad Yani, K. Cimahi Sel, and K. Cimahi, “ANALISIS SENTIMEN TERHADAP PANGAN NASIONAL PADA MEDIA SOSIAL TWITTER MENGGUNAKAN ALGORITMA NAÏVE BAYES,” 2023.
[3] H. Liu and M. Cocea, “Fuzzy rule based systems for interpretable sentiment analysis,” in 2017 Ninth International Conference on Advanced Computational Intelligence (ICACI), 2017, pp. 129–136. doi: 10.1109/ICACI.2017.7974497.
[4] A. Haque and T. Rahman, “Sentiment Analysis by Using Fuzzy Logic,” International Journal of Computer Science, Engineering and Information Technology, vol. 4, no. 1, pp. 33–48, Feb. 2014, doi: 10.5121/ijcseit.2014.4104.
[5] M. Rodríguez-Ibánez, A. Casánez-Ventura, F. Castejón-Mateos, and P. M. Cuenca-Jiménez, “A review on sentiment analysis from social media platforms,” Expert Syst. Appl., vol. 223, no. August 2022, 2023, doi: 10.1016/j.eswa.2023.119862.
[6] A. F. Hidayatullah, R. A. Apong, D. T. C. Lai, and A. Qazi, “Pre-trained language model for code-mixed text in Indonesian, Javanese, and English using transformer,” Soc. Netw. Anal. Min., vol. 15, no. 1, pp. 1–17, 2025, doi: 10.1007/s13278-025-01444-9.
[7] F. Fitriana, E. Utami, and H. Al Fatta, “Analisis Sentimen Opini Terhadap Vaksin Covid - 19 pada Media Sosial Twitter Menggunakan Support Vector Machine dan Naive Bayes,” Jurnal Komtika (Komputasi dan Informatika), vol. 5, no. 1, pp. 19–25, Jul. 2021, doi: 10.31603/komtika.v5i1.5185.
[8] Lady Agustine Fitrana, S. Linawati, N. Herlinawati, R. Sa’adah, and S. Seimahuria, “Analisis Sentimen Pengguna Twitter Terhadap Brand Indosat Menggunakan Metode Naïve Bayes Classifier,” JATI (Jurnal Mahasiswa Teknik Informatika), vol. 8, no. 3, pp. 4291–4297, 2024, doi: 10.36040/jati.v8i3.9866. D. E. Ratnawati, N. Y. Setiawan, P. Studi, S. Informasi, F. I. Komputer, and U. Brawijaya, “Analisis Sentimen Pengguna Sosial Media Twitter / X Terhadap Acara Clash of Champions Menggunakan,” vol. 9, no. 3, pp. 1–10, 2025.
[10] A. Muzaki et al., “ANALISIS SENTIMEN PADA ULASAN PRODUK DI E-COMMERCE DENGAN METODE NAIVE BAYES,” Jurnal Riset dan Aplikasi Mahasiswa Informatika (JRAMI), vol. 05, 2024.
[11] R. Wati, S. Ernawati, and H. Rachmi, “Pembobotan TF-IDF Menggunakan Naïve Bayes pada Sentimen Masyarakat Mengenai Isu Kenaikan BIPIH,” Jurnal Manajemen Informatika (JAMIKA), vol. 13, no. 1, pp. 84–93, Apr. 2023, doi: 10.34010/jamika.v13i1.9424.
[12] T.-C. Chen, “Text Mining Techniques and Natural Language Processing,” in Natural Language Processing for Software Engineering, John Wiley & Sons, Ltd, 2025, ch. 7, pp. 113–125. doi: https://doi.org/10.1002/9781394272464.ch7.
[13] Z. Putri and A. History, “Sentiment analysis using fuzzy naïve bayes classifier on covid-19 ARTICLE INFO ABSTRACT,” Desimal: Jurnal Matematika, vol. 4, no. 2, pp. 193–202, 2021, doi: 10.24042/djm.
[14] C. H. Lin and U. Nuha, “Sentiment analysis of Indonesian datasets based on a hybrid deep-learning strategy,” J. Big Data, vol. 10, no. 1, 2023, doi: 10.1186/s40537-023-00782-9.
[15] M. Alzaid and F. Fkih, “Sentiment Analysis of Students’ Feedback on E-Learning Using a Hybrid Fuzzy Model,” Applied Sciences (Switzerland), vol. 13, no. 23, 2023, doi: 10.3390/app132312956.
[16] Z. Putri and A. History, “Sentiment analysis using fuzzy naïve bayes classifier on covid-19 ARTICLE INFO ABSTRACT,” Desimal: Jurnal Matematika, vol. 4, no. 2, pp. 193–202, 2021, doi: 10.24042/djm.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Wahyu Pratama

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