Sentiment analysis on public opinion trends on #MakanBergiziGratis programs on platform X using Long Short-Term Memory (LSTM) networks

Authors

  • Veny Dwi Wahyuningsih Universitas Bhinneka PGRI
  • Yayak Kartika Sari Universitas Bhinneka PGRI
  • Agung Prasetya Universitas Bhinneka PGRI

DOI:

https://doi.org/10.32664/smatika.v16i01.2260

Keywords:

BERT, Free Nutritious Meal Program, Long Short-Term Memory (LSTM), Sentiment Analysis, SMOTE

Abstract

The Free Nutritious Meal Program (Makan Bergizi Gratis/MBG) has sparked diverse public reactions on X (formerly Twitter), making it important to understand sentiment dynamics at scale. This study analyzes sentiment in 5,516 Indonesian-language tweets collected between January to November 2025 using a hybrid embedding of Bidirectional Encoder Representations from Transformers (BERT) with a Long Short-Term Memory (LSTM) model. Initial labeling using a lexicon-based approach reveals an imbalanced distribution (positive 34.34%, neutral 60.80%, negative 4.86%). To address this issue, the Synthetic Minority Over-sampling Technique (SMOTE) is used to build a synthetic representation for minority classes in the embedding space. This approach helps improve class balance while maintaining the overall data representation. The proposed model achieves good performance, with 82.98% accuracy, 83.27% precision, 82.98% recall, and an F1-score of 83.01%. Cross-validation indicates relatively consistent performance, with accuracy ranging from 80.51% to 84.41%. Despite these results, the negative class remains challenging (F1-score 0.57), highlighting the impact of linguistic complexity, including implicit and nuanced expressions in social media text. Overall, the findings suggest that integrating BERT embeddings with LSTM and feature-level SMOTE can be a suitable approach for handling imbalanced sentiment classification tasks. However, further improvements, particularly in advanced transformer fine-tuning and deeper linguistic modeling, are needed to better capture subtle sentiment patterns.

References

[1] DataReportal, “Digital 2024: Indonesia.” [Online]. Available: https://datareportal.com/reports/digital-2024-indonesia

[2] A. Atikah Merlinda and Y. Yusuf, “Analisis Program Makan Gratis Prabowo Subianto Terhadap Strategi Peningkatan Motivasi Belajar Siswa di Sekolah Tinjauan dari Perspektif Sosiologi Pendidikan,” Ranah Res. J. Multidiscip. Res. Dev., vol. 7, no. 2, pp. 1364–1373, 2025, doi: https://doi.org/10.38035/rrj.v7i2.1360.

[3] K. R. I. Kesehatan, “Kemenkes Tegaskan Keamanan Pangan sebagai Kunci Keberhasilan Program Makan Bergizi Gratis,” Kementerian Kesehatan Republik Indonesia., 2025. [Online]. Available: https://kemkes.go.id/id/kemenkes-tegaskan-keamanan-pangan-sebagai-kunci-keberhasilan-program-makan-bergizi-gratis?utm_source=chatgpt.com

[4] B. Suwastoyo, “Dilema Program Makan Siang Gratis, Antara Manfaat dan Tantangan,” 2024, [Online]. Available: https://www.cips-indonesia.org/post/dilema-program-makan-siang-gratis-antara-manfaat-dan-tantangan?lang=id

[5] B. Siswoyo, N. Azka, and P. Utomo, “Pemanfaatan Machine learning untuk Klasifikasi Sentimen Pelanggan pada Media Sosial,” vol. 1, no. 1, pp. 29–34, 2025.

[6] D. Wahyuni, N. Fadhillah, W. Ariestya, and U. Gunadarma, “Metode Long Short-Term Memory dan Lexicon Based Untuk Analisis Sentimen Aplikasi TikTok,” JIKSTIK, vol. 23, no. 2, pp. 173–180, 2024, doi: 10.32409/jikstik.23.2.3579.

[7] R. Refianti, A. B. Mutiara, and R. A. Putra, “A Lexicon-Based Long Short-Term Memory (LSTM) Model for Sentiment Analysis to Classify Halodoc Application Reviews on Google Playstore,” J. Appl. Data Sci., vol. 5, no. 1, pp. 146–157, 2024, doi: 10.47738/jads.v5i1.160.

[8] A. Prasetya, Y. K. Sari, J. Iskandar, and M. K. Ansor, “Identifikasi Jenis Operasi Data Manipulation Language Berbasis Bilstm Pada Kalimat Berbahasa Indonesia,” JIPI (Jurnal Ilm. Penelit. dan Pembelajaran Inform., vol. 9, no. 4, pp. 2552–2557, 2024, doi: 10.29100/jipi.v9i4.8695.

[9] S. Chohan, A. Nugroho, A. Maezar, B. Aji, and W. Gata, “Analisis Sentimen Aplikasi Duolingo Menggunakan Metode Naïve Bayes dan Synthetic Minority Over Sampling Technique,” vol. 22, no. 2, 2020, doi: https://doi.org/10.31294/p.v21i2.

[10] Miftakhul Rahman, Mantri Kromo Fandith Fili, and Wardianto, “Analisis Hasil Rekapitulasi Pilkada Daerah Khusus Jakarta (DKJ) 2024 Menggunakan Metode Support Vector Machine,” JICode J. Inform. dan Komput., vol. 2, no. 1, pp. 100–111, 2025, doi: 10.30599/c0zqdw84.

[11] S. G. Wijaya, “Analisis Sentimen Pengguna Twitter Terhadap Kebijakan Royalti Restoran dan Kafe Dengan Multinomial Naive Bayes,” vol. 9, pp. 49–58, 2026, doi: https://doi.org/10.36080/idealis.v9i1.3698.

[12] L. B. Hutama and D. Suhartono, “Indonesian Hoax News Classification with Multilingual Transformer Model and BERTopic,” vol. 46, pp. 81–90, 2022, doi: https://doi.org/10.31449/inf.v46i8.4336.

[13] N. Mushtaq, G. Ali, D. Muhammad, K. Malik, and A. Bukhari, “BERT applications in natural language processing : a review,” 2025, doi: https://doi.org/10.1007/s10462-025-11162-5.

[14] R. Efendi, T. Wahyono, and I. R. Widiasari, “DBSCAN SMOTE LSTM : Effective Strategies for Distributed Denial of Service Detection in Imbalanced Network Environments,” 2024, doi: https://doi.org/10.3390/bdcc8090118.

[15] C. Sintiya, G. H. Hutagaol, D. Bate, and S. Irviantina, “Evaluasi Teknik Resampling untuk Class Balancing dalam Analisis Sentimen Kesehatan Mental Berbasis Bi-LSTM,” vol. 26, no. 2, pp. 257–274, 2025, doi: https://doi.org/10.55601/jsm.v26i2.1799.

[16] K. S. Nugroho et al., “Deteksi Depresi dan Kecemasan Pengguna Twitter Menggunakan Bidirectional LSTM,” no. Ciastech, pp. 287–296, 2021, doi: https://doi.org/10.48550/arXiv.2301.04521.

[17] E. Salim and A. Solichin, “Analisis Sentimen Pada Media Sosial Twitter Terhadap Pelayanan Dinas Kependudukan dan Pencatatan Sipil Menggunakan Algoritma Naive Bayes,” vol. 5, pp. 79–86, 2022, doi: https://doi.org/10.36080/idealis.v5i2.2961.

[18] C. H. Lin and U. Nuha, “Sentiment analysis of Indonesian datasets based on a hybrid deep ‑ learning strategy,” J. Big Data, vol. 10, p. 88, 2023, doi: 10.1186/s40537-023-00782-9.

[19] J. Rahman, A. Riaz, P. Malakar, and M. Kabir, “Recent advancements and challenges of NLP-based sentiment analysis : A state-of-the-art review,” Nat. Lang. Process. J., vol. 6, no. January, p. 100059, 2024, doi: 10.1016/j.nlp.2024.100059.

[20] K. Jia, F. Meng, J. Liang, and P. Gong, “Text sentiment analysis based on BERT-CBLBGA,” Comput. Electr. Eng., vol. 112, p. 109019, 2023, doi: https://doi.org/10.1016/j.compeleceng.2023.109019.

Downloads

Published

2026-03-30