Analisis Sentimen Publik Terhadap Revisi UU TNI 2025 Menggunakan Algoritma Naïve Bayes

Authors

  • Rizky Barus Universitas Islam Negeri Sumatera Utara
  • Rakhmat Kurniawan Universitas Islam Negeri Sumatera Utara

DOI:

https://doi.org/10.70340/jirsi.v5i2.380

Keywords:

Sentiment Analysis, Social Media, Naïve Bayes, TF-IDF, TNI Law

Abstract

The development of public opinion regarding the revision of the 2025 Indonesian National Armed Forces Law (UU TNI) on social media has generated various responses that are difficult to analyze manually due to the large and unstructured amount of data. This condition requires a computational approach that is able to systematically identify public sentiment trends. This study aims to analyze public sentiment towards the revision of the 2025 TNI Law using the TF-IDF-based Naïve Bayes algorithm and evaluate the performance of the classification model used. The research data was obtained through crawling techniques from YouTube user comments related to the revision of the 2025 TNI Law. The data processing stages include cleaning, case folding, tokenizing, normalization, stopword removal, and stemming before TF-IDF weighting and the classification process using Naïve Bayes. The results of the study of 1826 data show that public sentiment is dominated by the neutral category at 79.8%, while positive sentiment is 13.1% and negative sentiment is 7.0%. The model evaluation yielded an accuracy of 77.11%, but the model showed a bias toward the majority class, resulting in suboptimal classification of positive and negative sentiments. Based on these results, the Naïve Bayes method is quite effective as an initial approach in sentiment analysis, but it still has limitations in handling imbalanced datasets and the complex characteristics of social media language. Therefore, the development of more adaptive methods is needed to improve the quality of sentiment classification results.

Downloads

Download data is not yet available.

References

Amran, Asbullah T, Danil P, and Ramli Haba, “Analisis Hukum Terhadap Perubahan Norma Undang-Undang No.34 Tahun 2004 Tentang Tentara Nasional Indonesia,” Sawerigading Law Journal, vol. 1, no. 1, pp. 10–18, Apr. 2022, doi: 10.62084/SLJ.V1I1.124.

M. Zainul Arifin, Sumarwoto, and B. Sura Priambada, “Pelibatan Tentara Nasional Indonesia (TNI) Dalam Penanganan Tindak Pidana Terorisme,” Jurnal Justicia Fakultas Hukum Universitas Darul ’Ulum Jombang, vol. 11, no. 1, 2022.

Y. Dwi Pratiwi, D. E. Saputra, Tallo Kevin Daniel Octavianus, and E. T. Dewanti, “Politik Hukum Penetapan Wilayah Pengelolaan Perikanan dan Penangkapan Ikan Terukur Dalam Pembangunan Sumber Daya Perikanan Berkelanjutan,” Bina Hukum Lingkungan, vol. 6, no. 3, pp. 362–385, 2022, doi: 10.24970/bhl.v6i3.283.

Y. mulyana A. Aziz et al., Kebijakan Publik di Era Narasi Digital Lalas Sulastri, Susanti Susanti, Sofjan Aripin . Jambi: Penerbit Buku Sonpedia, 2026.

E. T. Susdarwono and A. Wiranta, Pemikiran di sekitar Revisi Undang-Undang TNI. Jawa Barat: Goresan Pena, 2024.

C. Padila, “Dinamika Media Sosial dalam Mempengaruhi Opini Publik pada Era Disrupsi Digital,” Jurnal Komunikasi dan Media (JKOMED), vol. 1, no. 1, pp. 1–8, Oct. 2025, Accessed: May 04, 2026. [Online]. Available: https://jurnal.samudrailmu.com/index.php/jkomed/article/view/24

A. P. WIbowo and N. Hidayat, “Eksplorasi Linguistik Komputasional dalam Analisis Bahasa Alami untuk Mengungkap Evolusi Dialek Digital di Era Media Sosial Global,” Journal of New Trends in Sciences, vol. 1, no. 3, pp. 45–52, Oct. 2023, doi: 10.59031/JNTS.V1I3.778.

R. Aziz, T. M. Fahrudin, and W. S. J. Saputra, “Analisis Sentimen Kepuasan Pengguna OYO DiPlaystore Dengan Multinoial Naïve Bayes dan Chi-square,” Jurnal Fasilkom, vol. 14, no. 1, pp. 166–175, Apr. 2024, doi: 10.37859/JF.V14I1.6943.

D. Purnamasari et al., Pengantar Metode Analisis Sentimen. Gunadarma Penerbit, 2023.

A. Asrumi, D. Suharijadi, A. D. Setiara, and D. P. Wulanda, Analisis Sentimen dan Penggalian Opini . Jawa Timur: Eureka Media Aksara, 2023.

N. Wiliani, Nuke. L. Chusna, and P. B. Ramadhan, Analisis Sentimen terhadap Pro Kontra Aksi Unjuk Rasa Mahasiswa dengan Naïve Bayes dan Information Gain . Penerbit NEM, 2024.

M. Z. Haq, C. S. Octiva, A. Ayuliana, U. W. Nuryanto, and D. Suryadi, “Algoritma Naïve Bayes untuk Mengidentifikasi Hoaks di Media Sosial,” Jurnal Minfo Polgan, vol. 13, no. 1, pp. 1079–1084, Jul. 2024, doi: 10.33395/JMP.V13I1.13937.

L. A. Fudholi, N. Rahaningsih, and R. D. Dana, “Sentimen Analisis Perilaku Penggemar Coldplay di Media Sosial Twitter Menggunakan Metode Naïve Bayes,” Jurnal Mahasiswa Teknik Informatika, vol. 8, no. 3, 2024.

F. P. Syah, T. Hasanuddin, and nia Kurniati, “Implementasi Naïve Bayes Untuk Analisis Sentimen Pada data Twitter Tentang Isu Politik di Indonesia,” LINIER: Literatur Informatika dan Komputer, vol. 2, no. 3, pp. 302–316, Oct. 2025, doi: 10.33096/LINIER.V2I3.3142.

N. C. Majid and A. D. Indriyanti, “Analisis Sentimen Terhadap RUU TNI Di Platform X (Twitter) Menggunakan Metode Ensemble Berbasis Naïve Bayes Dan Support Vector Machine,” Journal of Informatics and Computer Science (JINACS), vol. 7, no. 02, 2025, Accessed: May 05, 2026. [Online]. Available: https://ejournal.unesa.ac.id/index.php/jinacs/article/view/73269

Downloads

Published

2026-05-31

Issue

Section

Articles