Sentiment Analysis on the Indonesian Military Draft Bill in YouTube Comments Using a LSTM Model
Article Sidebar
Abstract:
Background: The legislative proposal for the revision of the Indonesian Military Draft Bill (RUU TNI) has incited significant public controversy, largely articulated in digital arenas like YouTube. This revision fuels widespread apprehension about the potential revival of the military's dual-function role (Dwifungsi ABRI) and its potential detriment to civilian supremacy.
Aims: This study aims to quantify and analyze public sentiment towards the RUU TNI, as expressed in Indonesian YouTube comments, using a Deep Learning approach combining FastText embedding and Long Short-Term Memory (LSTM) classification.
Methods: A dataset of 520 Indonesian comments was collected and manually labeled into three classes: positive, neutral, and negative. The methodology included comprehensive text preprocessing, feature extraction via FastText word embeddings (300 dimensions), and sentiment classification using the LSTM architecture. The model was rigorously evaluated using a confusion matrix across standard metrics, including accuracy, precision, recall, and F1-score.
Result: The dataset exhibited significant class imbalance, dominated by negative sentiment (42.31%). The optimal LSTM configuration, tested with Stratified K-Fold Cross Validation, yielded an accuracy of 42.39%, a precision of 43%, a recall of 47%, and an F1-score of 60%. Topic modeling via LDA revealed dominant themes criticizing the bill's quality, state corruption, and legislative integrity. The low accuracy, barely surpassing the baseline, suggests that the model struggled with the limited and imbalanced data.
Conclusion: Public sentiment regarding the RUU TNI is strongly negative and critical, reflecting deep concerns about democracy and state institutions. While the FastText-LSTM pipeline was established, its classification performance was severely constrained by the small, highly imbalanced dataset and the complex nature of political discourse. Future research must utilize advanced Transformer models (e.g., IndoBERT) and larger, balanced datasets to achieve meaningful classification performance on this critical socio-political domain.
Keywords: Sentiment Analysis, RUU TNI, Long Short-Term Memory (LSTM), FastText Embedding, Public Opinion Monitoring
Downloads
Copyright (c) 2026 Adib Raihan Ashidiq , Fradika Anggara Putra , Agil Febri Pradana, Nuriwan Saputra

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
Agus, N., & Er, S. (2021). Implementasi Latent Dirichlet Allocation (LDA) untuk klasterisasi cerita berbahasa Bali. Jurnal Teknologi Informasi dan Ilmu Komputer, 8(1), 127–134. https://doi.org/10.25126/jtiik.0813556
Blei, D. M., Ng, A. Y., & Jordan, M. I. (2003). Latent Dirichlet allocation. Journal of Machine Learning Research, 3, 993–1022. https://dl.acm.org/doi/10.5555/944919.944937
Bojanowski, P., Grave, E., Joulin, A., & Mikolov, T. (2017). Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5, 135–146. https://doi.org/10.1162/tacl_a_00051
Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: Synthetic minority over-sampling technique. Journal of Artificial Intelligence Research, 16, 321–357. https://doi.org/10.1613/jair.953
Girelli Consolaro, N., Shinde, S. S., Naseh, D., & Tarchi, D. (2023). Analysis and performance evaluation of transfer learning algorithms for 6G wireless networks. Electronics, 12(15), 3327. https://doi.org/10.3390/electronics12153327
Hakim, G., Fatyanosa, T. N., & Widodo, A. W. (2024). Analisis sentimen masyarakat terhadap kereta cepat Whoosh pada platform X menggunakan IndoBERT. Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 8(10), 1–10. http://repository.ub.ac.id/id/eprint/235285
Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780. https://doi.org/10.1162/neco.1997.9.8.1735
Isnayni, B. N., Saputra, N., & Hastono, T. (2024). Sentiment analysis of coffee shop reviews using Random Forest classifier method. JTH: Journal of Technology and Health, 1(4), 233–244. https://doi.org/10.61677/jth.v2i2.152
Karmila, S., & Ardianti, V. I. (2022). Metode Latent Dirichlet Allocation untuk menentukan topik teks suatu berita. Jurnal Informatika dan Komputasi: Media Bahasan, Analisa dan Aplikasi, 16(1), 36–44. https://doi.org/10.56956/jiki.v16i01.100
Laksana, M. D. B., Karyawati, A. E., Putri, L. A. A. R., Santiyasa, I. W., Er, N. A. S., & Kadnyanan, I. G. A. G. A. (2022). Text summarization terhadap berita bahasa Indonesia menggunakan dual encoding. JELIKU (Jurnal Elektronik Ilmu Komputer Udayana), 11(2), 339–348. https://doi.org/10.24843/jlk.2022.v11.i02.p13
Nasution, N. A., Nababan, E. B., & Mawengkang, H. (2024). Comparing LSTM algorithm with word embedding: FastText and Word2Vec in Bahasa Batak–English translation. In 2024 12th International Conference on Information and Communication Technology (ICoICT) (pp. 306–313). IEEE. https://doi.org/10.1109/ICoICT61617.2024.10698481
Nidhi, Singh, O., Prince, & Garg, M. (2024). A lightweight LSTM framework for contextual sentiment classification. International Journal of Research – GRANTHAALAYAH, 12(6), 147–159. https://doi.org/10.29121/granthaalayah.v12.i6.2024.6095
Putri, S. B., Anisa, Y. N., & Saputra, N. (2022). Analisis sentimen film Kuliah Kerja Nyata (KKN) di Desa Penari menggunakan metode Naive Bayes. JuSiTik: Jurnal Sistem dan Teknologi Informasi Komunikasi, 5(2), 22–26. https://doi.org/10.32524/jusitik.v5i2.704
Saputra, N. (2018). Analisis sentimen dengan preprocessing kata. Jurnal Dinamika Informatika, 7(1), 45–57. file:///C:/Users/USER/Downloads/nurirwan,+4.+Nurirwan+Saputra+(ANALISIS+SENTIMEN+DENGAN+PREPROCESSING+KATA).pdf
Saputra, N. (2019). Analisis sentimen dengan menggunakan metode klasifikasi Lazy K-Star. Seri Prosiding Seminar Nasional Dinamika Informatika, 1(1). https://scholar.google.com/citations?view_op=view_citation&hl=en&user=48NFQPAAAAAJ&cstart=20&pagesize=80&citation_for_view=48NFQPAAAAAJ:qjMakFHDy7sC
Saputra, N., Adji, T. B., & Permanasari, A. E. (2015). Analisis sentimen data Presiden Jokowi dengan preprocessing normalisasi dan stemming menggunakan metode Naive Bayes dan SVM. Jurnal Dinamika Informatika, 5(1), 1–12. https://scholar.google.com/citations?view_op=view_citation&hl=en&user=48NFQPAAAAAJ&citation_for_view=48NFQPAAAAAJ:u-x6o8ySG0sC
Saputra, N., Nurbagja, K., & Turiyan, T. (2022). Sentiment analysis of presidential candidates Anies Baswedan and Ganjar Pranowo using Naïve Bayes method. Jurnal Sisfotek Global, 12(2), 114–119. https://doi.org/10.38101/sisfotek.v12i2.552
Saputra, N., Riyadi, A., & Tentua, M. N. (2023). Sentiment analysis of COVID vaccination policy in Indonesia using Random Forest (pp. 205–209). https://doi.org/10.2991/978-94-6463-338-2_31
Tripathi, M. (2021). Sentiment analysis of Nepali COVID-19 tweets using NB, SVM and LSTM. Journal of Artificial Intelligence and Capsule Networks, 3(3), 151–168. https://doi.org/10.36548/jaicn.2021.3.001
Udayana, I. K. A. P. A. N., Mahendra, I. B. M., et al. (2023). Analisis sentimen opini berbahasa Indonesia pada sosial media menggunakan TF-IDF dan Support Vector Machine. JELIKU (Jurnal Elektronik Ilmu Komputer Udayana), 12(1), 45–52. https://garuda.kemdiktisaintek.go.id/documents/detail/3694249
van der Maaten, L., & Hinton, G. (2008). Visualizing data using t-SNE. Journal of Machine Learning Research, 9, 2579–2605. https://jmlr.org/papers/v9/vandermaaten08a.html
Wicaksono, B., Rahmayanti, V., & Nastiti, S. (2024). Analisis sentimen dalam opini publik di channel YouTube Indonesia Lawyers Club tentang isu populer dengan menggunakan metode LSTM dan Bi-LSTM. Jurnal Algoritma, 21(2), 241–251. https://doi.org/10.33364/algoritma/v.21-2.1696
Wilie, B., Vincentio, K., Winata, G. I., Cahyawijaya, S., Li, X., Lim, Z. Y., Soleman, S., Mahendra, R., Fung, P., Bahar, S., & Purwarianti, A. (2020). IndoNLU: Benchmark and resources for evaluating Indonesian natural language understanding. In Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing (pp. 843–857). Association for Computational Linguistics. https://doi.org/10.18653/v1/2020.aacl-main.85
Wirsching, E. M., Rodriguez, P. L., Spirling, A., & Stewart, B. M. (2025). Multilanguage word embeddings for social scientists: Estimation, inference, and validation resources for 157 languages. Political Analysis, 33(2), 156–163. https://doi.org/10.1017/pan.2024.17