Sentiment analysis of public opinion on the non-cash food assistance (BPNT) program on platform x using naive bayes

Authors

  • Nurul Asma As-shidiq Universitas Pelita Bangsa, Indonesia
  • Donny Maulana Universitas Pelita Bangsa, Indonesia
  • M. Zubair Abdurrohman Universitas Pelita Bangsa, Indonesia

DOI:

https://doi.org/10.35335/mandiri.v15i1.551

Keywords:

BPNT, Naive Bayes, Platform X, Sentiment Analysis, TF-IDF

Abstract

The Non-Cash Food Assistance (BPNT) program is one of the Indonesian government's social assistance policies that frequently receives public attention and discussion on social media. This study aims to analyze public sentiment toward the implementation of the BPNT program based on comments posted on Platform X. The dataset consisted of 1,758 Indonesian-language comments collected through web crawling between October 2025 and January 2026. The collected data were processed through several preprocessing stages, including case folding, cleaning, tokenization, normalization, stopword removal, and stemming. Furthermore, TF-IDF was applied to transform textual data into numerical features, and sentiment classification was performed using the Multinomial Naive Bayes algorithm. The dataset was divided into training and testing data using an 80:20 ratio. The results showed that neutral sentiment dominated public discussions with 51.48%, followed by positive sentiment with 33.90% and negative sentiment with 14.62%. Performance evaluation using a Confusion Matrix achieved an accuracy of 79.545%. These findings indicate that the Naive Bayes approach can effectively classify public sentiment regarding the BPNT program and provide useful insights for evaluating social assistance policies.

References

Alfawas, T. I., & Rahim, A. (t.t.). Penerapan Fitur Ekstraksi TF-IDF untuk Analisis Sentimen Ulasan Game Bus Simulator Indonesia dengan Algoritma Naive Bayes.

Bird, S., Klein, E., & Loper, E. (2009). Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit. O’Reilly Media, Inc.

Damanik, F. J., & Setyohadi, D. B. (2021). Analysis Of Public Sentiment About Covid-19 In Indonesia On Twitter Using Multinomial Naive Bayes And Support Vector Machine. IOP Conference Series: Earth and Environmental Science, 704(1), 012027. https://doi.org/10.1088/1755-1315/704/1/012027

Fawcett, T. (2006). An introduction to ROC analysis. Pattern Recognition Letters, ROC Analysis in Pattern Recognition, 27(8), 861–874. https://doi.org/10.1016/j.patrec.2005.10.010

Febrilliani, J. S., & Wibowo, A. (2025). Twitter Public Sentiment towards Vasectomy in Indonesia Using SVM and Naïve Bayes. Research Horizon, 5(4), 1415–1424. https://doi.org/10.54518/rh.5.4.2025.756

Hermawan, D., Aditya, A., & Purwiantono, F. E. (2024). Sentiment Analysis of Vaccine Perceptions in Indonesia: A Comparative Study Using the Naïve Bayes Multinomial Text Algorithm on Twitter Data. 2024 International Seminar on Intelligent Technology and Its Applications (ISITIA), 42–47. https://doi.org/10.1109/ISITIA63062.2024.10667933

Manning, C., Raghavan, P., & Schuetze, H. (2009). Introduction to Information Retrieval.

Maulana, D., & Ramasamy, R. K. (2026). Systematic Review of Quantization-Optimized Lightweight Transformer Architectures for Real-Time Fruit Ripeness Detection on Edge Devices. Computers, 15(1), 69. https://doi.org/10.3390/computers15010069

Muthmainnah, M., Rudiman, R., & Yulianto, F. (2025). Sentiment Analysis of the Public on the Deployment of Smart Robots in Indonesia Using the Naïve Bayes Method. JSE Journal of Science and Engineering, 3(2), 85–89. https://doi.org/10.30650/jse.v3i2.3887

Naraswati, N. P. G., Nooraeni, R., Rosmilda, D. C., Desinta, D., Khairi, F., & Damaiyanti, R. (2021). Analisis Sentimen Publik dari Twitter Tentang Kebijakan Penanganan Covid-19 di Indonesia dengan Naive Bayes Classification. Sistemasi: Jurnal Sistem Informasi, 10(1), 222–238. https://doi.org/10.32520/stmsi.v10i1.1179

Negara, E. S., Syaputra, R., Erlansyah, D., Andryani, R., Saksono, P. H., Aditya, F., & Agam, P. M. (2024). SENTIMENT ANALYSIS OF PUBLIC OPINION ON PRESIDENTIAL ADVISORY APPOINTMENTS USING NAIVE BAYES CLASSIFICATION. Jurnal Ilmiah Ilmu Terapan Universitas Jambi, 8(2), 452–466. https://doi.org/10.22437/jiituj.v8i2.35254

Normawati, D., & Prayogi, S. A. (2021). Implementasi Naïve Bayes Classifier Dan Confusion Matrix Pada Analisis Sentimen Berbasis Teks Pada Twitter. 5.

Nurlita, N., Rudiman, R., & Hallim, A. (2025). Sentiment Analysis, Classification of Twitter Tweets of the Constitutional Court Decision on Vice Presidential Candidates Using Naïve Bayes Method. JSE Journal of Science and Engineering, 3(2), 96–100. https://doi.org/10.30650/jse.v3i2.3894

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, É. (2011). Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12(85), 2825–2830.

Powers, D. M. W. (2020). Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation (arXiv:2010.16061). arXiv. https://doi.org/10.48550/arXiv.2010.16061

Prasetyo, P. A. M., & Hermawan, A. (2023). Analisis sentimen twitter terhadap pemilihan presiden menggunakan algoritma naïve bayes. INFOTECH : Jurnal Informatika & Teknologi, 4(2), 224–233. https://doi.org/10.37373/infotech.v4i2.863

Pristiyono, Ritonga, M., Ihsan, M. A. A., Anjar, A., & Rambe, F. H. (2021). Sentiment analysis of COVID-19 vaccine in Indonesia using Naïve Bayes Algorithm. IOP Conference Series: Materials Science and Engineering, 1088(1), 012045. https://doi.org/10.1088/1757-899X/1088/1/012045

Rachmad, A., Kustiyahningsih, Y., Pratama, R. I., Syakur, M. A., Rochman, E. M. S., & Hapsari, D. (2022). Sentiment Analysis of Government Policy Management on the Handling of Covid-19 Using Naive Bayes with Feature Selection. 2022 IEEE 8th Information Technology International Seminar (ITIS), 156–161. https://doi.org/10.1109/ITIS57155.2022.10010004

Rahmadani, R., Rahim, A., & Rudiman, R. (2024). ANALISIS SENTIMEN ULASAN “OJOL THE GAME” DI GOOGLE PLAY STORE MENGGUNAKAN ALGORITMA NAIVE BAYES DAN MODEL EKSTRAKSI FITUR TF-IDF UNTUK MENINGKATKAN KUALITAS GAME. Jurnal Informatika dan Teknik Elektro Terapan, 12(3). https://doi.org/10.23960/jitet.v12i3.4988

Salam, R. R., Jamil, M. F., Ibrahim, Y., Rahmaddeni, R., Soni, S., & Herianto, H. (2023). Analisis Sentimen Terhadap Bantuan Langsung Tunai (BLT) Bahan Bakar Minyak (BBM) Menggunakan Support Vector Machine: Sentiment Analysis of Cash Direct Assistance Distribution for Fuel Oil Using Support Vector Machine. MALCOM: Indonesian Journal of Machine Learning and Computer Science, 3(1), 27–35. https://doi.org/10.57152/malcom.v3i1.590

Salton, G., & Buckley, C. (1988). Term-weighting approaches in automatic text retrieval. Information Processing & Management, 24(5), 513–523. https://doi.org/10.1016/0306-4573(88)90021-0

Setyawan, H., Azizah, L. M., & Pradani, A. Y. (2023). Sentiment Analysis of Public Responses on Indonesia Government Using Naïve Bayes and Support Vector Machine. Emerging Information Science and Technology, 4(1), 1–7. https://doi.org/10.18196/eist.v4i1.18681

Suryani, S., Fayyad, M. F., Savra, D. T., Kurniawan, V., & Estanto, B. H. (2023). Sentiment Analysis of Towards Electric Cars using Naive Bayes Classifier and Support Vector Machine Algorithm. Public Research Journal of Engineering, Data Technology and Computer Science, 1(1), 1–9. https://doi.org/10.57152/predatecs.v1i1.814

Zakaria, Z., Kusrini, K., & Ariatmanto, D. (2023). Sentiment Analysis to Measure Public Trust in the Government Due to the Increase in Fuel Prices Using Naive Bayes and Support Vector Machine. International Journal of Artificial Intelligence & Robotics (IJAIR), 5(2), 54–62. https://doi.org/10.25139/ijair.v5i2.7167

Zulfikar, W. B., Atmadja, A. R., & Pratama, S. F. (2023). Sentiment Analysis on Social Media Against Public Policy Using Multinomial Naive Bayes. Scientific Journal of Informatics, 10(1), 25–34. https://doi.org/10.15294/sji.v10i1.39952

Downloads

Published

2026-07-07

How to Cite

As-shidiq, N. A., Maulana, D., & Abdurrohman, M. Z. (2026). Sentiment analysis of public opinion on the non-cash food assistance (BPNT) program on platform x using naive bayes. Jurnal Mandiri IT, 15(1), 19–26. https://doi.org/10.35335/mandiri.v15i1.551