Klasifikasi Sentimen Masyarakat Terhadap Revisi Undang-Undang Tentara Nasional Indonesia Menggunakan Naïve Bayes Classifier
DOI:
https://doi.org/10.47065/bulletincsr.v5i4.615Keywords:
TNI Bill; Public Policy; Public Sentiment; Pre-Processing; Social Media; Naïve Bayes ClassifierAbstract
The revision of the Indonesian National Armed Forces Bill (RUU TNI) has become a hot topic in Indonesian public policy and has sparked controversy among the public due to its sudden emergence and lack of open planning process. This has raised concerns about the potential for military domination and the return of the dual function of the ABRI (Indonesian Armed Forces). The classification of public sentiment towards the RUU TNI is the focus of this study. Comments are categorized into two types of sentiment classes, namely positive and negative. The research stages include data collection, sentiment labeling, data cleaning, text normalization to lowercase letters, sentence or document segmentation into smaller parts, text data normalization, negation handling, stopword removal, and stemming, weighting using the TF-IDF technique, model classification development, and evaluation of the model's performance. The Naïve Bayes Classifier method classified 1,547 comment data points collected from two Instagram social media accounts. The Naïve Bayes Classifier model achieved an accuracy of 83.74%, precision of 81.17%, recall of 87.86%, and an F1-score of 84.38%. This study has limitations, including the limited amount of data collected. These include an imbalance in the amount of data between sentiment categories, data from only one social media platform, and the suboptimal identification of positive and negative sentiments. It is recommended that future research compare this method with other classification methods, expand the dataset, broaden the scope of data collection by involving various social media platforms over a wider time span, thereby providing a more comprehensive picture of public opinion, and test a wider range of algorithm combinations. This study can serve as an initial indicator for rapid policy evaluation, where positive or negative comments from the public on social media can provide important input in assessing the effectiveness of a policy.
Downloads
References
Y. Nur Fathoni, A. Daffa Ahmad, J. Benrivo Sipayung, R. Rau, atur Rushufah, and J. Indrawan, “Analisis Implikasi Pengesahan RUU TNI Dalam Sinergi Sipil-Militer dan Konsolidasi Demokrasi di Indonesia,” Global Komunika, vol. 8, no. 1, pp. 3–15, May 2025.
M. Z. Habibie et al., “Yayasan Lembaga Bantuan Hukum Indonesia (YLBHI) Menolak Upaya Menghidupkan Kembali Dwi Fungsi Melalui Revisi Undang-Undang TNI (Tentara Negara Indonesia),” Quantum Juris: Jurnal Hukum Modern, vol. 07, no. 2, pp. 157–168, Apr. 2025.
M. Tomz, J. L.P, Weeks, and Y.-M. Keren, “Public Opinion and Decisions About Military Force in Democracies,” Int Organ, vol. 74, no. 1, pp. 1–47, Jan. 2020.
T. B. Silitonga, “Tantangan globalisasi, peran negara, dan implikasinya terhadap aktualisasi nilai-nilai ideologi negara,” Jurnal Civics: Media Kajian Kewarganegaraan, vol. 17, no. 1, pp. 15–28, May 2020, doi: 10.21831/jc.v17i1.29271.
F. Fathoni, A. Ibrahim, F. Rizka Mumtaz, M. Azmi Zaky, M. Jodi Pratama, and I. Akbar Kurniawan, “Analisis Sentimen Public Twitter Terhadap Kebijakan Pemerintah Menggunakan Metode SVM (Studi Kasus: RUU TNI),” JATI (Jurnal Mahasiswa Teknik Informatika), vol. 9, no. 4, pp. 6322–6329, May 2025, doi: 10.36040/jati.v9i4.14036.
E. Sjarief, “Sikap Politik Anggota DPR Periode 1999-2004 Dalam Proses Pembentukan Undang-Undang (Studi Analisis Isi Proses Pembentukan Undang-Undang Nomor 20 Tahun 2002 Tentang Ketenagalistrikan),” Jurnal Mitra Manajemen, vol. 5, no. 2, pp. 1–18, Oct. 2020.
W. P. Anggraini and M. S. Utami, “Klasifikasi Sentimen Masyarakat Terhadap Kebijakan Kartu Pekerja Di Indonesia,” Faktor Exacta, vol. 13, no. 4, p. 255, Feb. 2021, doi: 10.30998/faktorexacta.v13i4.7964.
S. Rabbani, D. Safitri, N. Rahmadhani, A. A. F. Sani, and M. K. Anam, “Perbandingan Evaluasi Kernel SVM untuk Klasifikasi Sentimen dalam Analisis Kenaikan Harga BBM,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 3, no. 2, pp. 153–160, Oct. 2023, doi: 10.57152/malcom.v3i2.897.
A. Wibowo, Firman Noor Hasan, Rika Nurhayati, and Arief Wibowo, “Analisis Sentimen Opini Masyarakat Terhadap Keefektifan Pembelajaran Daring Selama Pandemi COVID-19 Menggunakan Naïve Bayes Classifier,” Jurnal Asiimetrik: Jurnal Ilmiah Rekayasa & Inovasi, pp. 239–248, Jul. 2022, doi: 10.35814/asiimetrik.v4i1.3577.
N. P. G. Naraswati, R. Nooraeni, D. C. Rosmilda, D. Desinta, F. Khairi, and R. Damaiyanti, “Analisis Sentimen Publik dari Twitter Tentang Kebijakan Penanganan Covid-19 di Indonesia dengan Naive Bayes Classification,” SISTEMASI, vol. 10, no. 1, p. 222, Jan. 2021, doi: 10.32520/stmsi.v10i1.1179.
N. Nopan and E. Mailoa, “Perbandingan Beberapa Algoritma Machine Learning Dalam Analisis Sentimen Terkait Pemilihan Presiden RI 2024,” Jutisi?: Jurnal Ilmiah Teknik Informatika dan Sistem Informasi, vol. 13, no. 2, p. 1096, Aug. 2024, doi: 10.35889/jutisi.v13i2.1980.
A. Mondaref Jon and I. Vitra Paputungan, “Analisis Sentimen Pada Media Sosial Instagram Klub Persija Jakarta Menggunakan Metode Naive Bayes,” AUTOMATA, vol. 4, no. 1, pp. 1–8, Feb. 2023.
H. Siagian et al., “Strategi Peran TNI-POLRI Guna Mendukung Transformasi Ekonomi Yang Inklusif Dalam Rangka Percepatan Pemulihan Ekonomi Nasional,” vol. 13, no. 1, pp. 81–88, Jan. 2025, doi: 10.37081/ed.v13i1.6473.
Z. Annisa and B. S. S. Ulama, “Analisis Sentimen Data Ulasan Pengguna Aplikasi ‘PeduliLindungi’ pada Google Play Store Menggunakan Metode Naïve Bayes Classifier Model Multinomial,” Jurnal Sains dan Seni ITS, vol. 11, no. 6, May 2023, doi: 10.12962/j23373520.v11i6.94064.
I. Ghozali and W. H. Sugiharto, “Analisis Sentimen Pinjaman Online Di Media Sosial Twitter Menggunakan Metode Naive Bayes,” KLIK: Kajian Ilmiah Informatika dan Komputer, vol. 3, no. 6, pp. 1340–1348, Jun. 2023, doi: 10.30865/klik.v3i6.936.
E. F. Saraswita, D. P. Rini, and A. Abdiansah, “Analisis Sentimen E-Wallet di Twitter Menggunakan Support Vector Machine dan Recursive Feature Elimination,” Jurnal Media Informatika Budidarma, vol. 5, no. 4, p. 1195, Oct. 2021, doi: 10.30865/mib.v5i4.3118.
S. W. Ritonga, . Y., M. Fikry, and E. P. Cynthia, “Klasifikasi Sentimen Masyarakat di Twitter terhadap Ganjar Pranowo dengan Metode Naïve Bayes Classifier,” Building of Informatics, Technology and Science (BITS), vol. 5, no. 1, Jun. 2023, doi: 10.47065/bits.v5i1.3535.
P. Pandunata, C. K. Ananta, and Y. Nurdiansyah, “Analisis Sentimen Opini Publik Terhadap Pekan Olahraga Nasional Pada Instagram Menggunakan Metode Naïve Bayes Classififer,” INFORMAL: Informatics Journal, vol. 7, no. 2, p. 146, Aug. 2022, doi: 10.19184/isj.v7i2.33928.
O. N. Julianti, N. Suarna, and W. Prihartono, “Penerapan Natural Language Processing Pada Analisis Sentimen Judi Online Di Media Sosial Twitter,” JATI (Jurnal Mahasiswa Teknik Informatika), vol. 8, no. 3, pp. 2936–2941, May 2024, doi: 10.36040/jati.v8i3.9613.
A. Atikah Putri, S. Agustian, and R. Abdillah, “Penerapan Metode Logistic Regression Untuk Klasifikasi Sentimen Pada Dataset Twitter Terbatas,” Jurnal Sistem Informasi, vol. 7, no. 1, pp. 95–107, Jan. 2025.
S. Syafrizal, M. Afdal, and R. Novita, “Analisis Sentimen Ulasan Aplikasi PLN Mobile Menggunakan Algoritma Naïve Bayes Classifier dan K-Nearest Neighbor,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 4, no. 1, pp. 10–19, Dec. 2023, doi: 10.57152/malcom.v4i1.983.
M. F. Lazuardi, R. Hiunarto, K. F. Ramadhani, N. Noviandi, R. Widayanti, and M. H. Arfian, “Hoax News Detection Using Passive Aggressive Classifier And TfidfVectorizer,” JURNAL TEKNIK INFORMATIKA, vol. 16, no. 2, pp. 185–193, Dec. 2023, doi: 10.15408/jti.v16i2.34084.
D. Normawati and S. A. Prayogi, “Implementasi Naïve Bayes Classifier Dan Confusion Matrix Pada Analisis Sentimen Berbasis Teks Pada Twitter,” Jurnal Sains Komputer & Informatika (J-SAKTI), vol. 5, no. 2, pp. 697–711, Sep. 2021.
E. M. Sipayung, H. Maharani, and I. Zefanya, “Perancangan Sistem Analisis Sentimen Komentar Pelanggan Menggunakan Metode Naive Bayes Classifier,” Jurnal Sistem Informasi (JSI), vol. 8, no. 1, pp. 2355–4614, Apr. 2020.
H. P. Doloksaribu and Yusran Timur Samuel, “Komparasi Algoritma Data Mining Untuk Analisis Sentimen Aplikasi Pedulilindungi,” Jurnal Teknologi Informasi: Jurnal Keilmuan dan Aplikasi Bidang Teknik Informatika, vol. 16, no. 1, pp. 1–11, Jan. 2022, doi: 10.47111/jti.v16i1.3747.
K. Kevin, M. Enjeli, and A. Wijaya, “Analisis Sentimen Pengunaaan Aplikasi Kinemaster Menggunakan Metode Naive Bayes,” Jurnal Ilmiah Computer Science, vol. 2, no. 2, 2024, doi: 10.58602/jics.v2i2.24.
M. Murni, I. Riadi, and A. Fadlil, “Analisis Sentimen HateSpeech pada Pengguna Layanan Twitter dengan Metode Naïve Bayes Classifier (NBC),” JURIKOM (Jurnal Riset Komputer), vol. 10, no. 2, p. 566, Apr. 2023, doi: 10.30865/jurikom.v10i2.5984.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Klasifikasi Sentimen Masyarakat Terhadap Revisi Undang-Undang Tentara Nasional Indonesia Menggunakan Naïve Bayes Classifier
ARTICLE HISTORY
How to Cite
Issue
Section
Copyright (c) 2025 Abdul Haris Kurnia Sandi Harahap, Elin Haerani, Lola Oktavia, Okfalisa, Fitrah Kurnia

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).













