Application Of TF-IDF And Word2vec For Feature Extraction In Sentiment Analysis Of Free Nutritious Food Policies

Authors

  • Alam Rahmatullah Department of Engineering, Siliwangi University, Tasikmalaya, Indonesia
  • Qisthi Annisa Department of Engineering, Siliwangi University, Tasikmalaya, Indonesia

DOI:

https://doi.org/10.52435/complete.v6i2.741

Keywords:

Accuracy, Automatic Labelling, Positive and Negative Sentiments, Public Review Data, Semantic Context

Abstract

The free nutritious meal policy has become a hot topic of discussion among the public because it is related to improving health and education quality. However, its implementation has given rise to a variety of pros and cons that need to be analyzed systematically. This study aims to analyze sentiment toward the policy by utilizing Term Frequency–Inverse Document Frequency (TF-IDF) and Word2Vec as feature extraction methods on public review data obtained from social media X. After undergoing preprocessing and automatic labeling, the data was classified into positive and negative sentiments using the Support Vector Machine (SVM) algorithm. The analysis results  how that the sentiment data is unbalanced, with the positive class dominating at 75% and the negative class at 25%. In model testing, TF-IDF achieved an accuracy of 81%, while Word2Vec achieved an accuracy of 80%. This difference shows that TF-IDF is more stable in handling short and informal texts, while Word2Vec still has the potential to capture the semantic context between words. This research opens up opportunities for further research, it is recommended to balance the data between classes and combine the TF-IDF and Word2Vec methods, or use a deep learning approach such as BERT to obtain more accurate results and capture deeper semantic context.

References

R. Hidayat and R. Ramadhan, “Peran Media Sosial Dalam Mengkonstruksi Opini Publik Terkait Kebijakan Pemerintah: Studi Kasus Wacana Publik Tahun 2025,” CORE: Journal of Communication Research, vol. 3, no. 2, pp. 64–75, Jul. 2023.

A. Sitanggang, Y. Umaidah, Y. Umaidah, R. I. Adam, and R. I. Adam, “Analisis Sentimen Masyarakat Terhadap Program Makan Siang Gratis Pada Media Sosial X Menggunakan Algoritma Naive Bayes,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 12, no. 3, Aug. 2024, doi: 10.23960/jitet.v12i3.4902.

U. Agustini, “Efektivitas dan Tantangan Kebijakan Program Makan Bergizi Gratis sebagai Intervensi Pendidikan di Indonesia,” Jurnal Kiprah Pendidikan, vol. 4, no. 3, pp. 362–368, Jul. 2025, doi: 10.33578/kpd.v4i3.p362-368.

O. Sumantri Riyanto and M. Rianita Elfrida Sinaga, “Penegakan Hak Anak Atas Makanan Aman Dan Sehat: Studi Kasus Keracunan Dalam Program Makan Bergizi Gratis Ditinjau Dari Tanggung Jawab Negara,” Juris Humanity: Jurnal Riset dan Kajian Hukum HAM, Jun. 2025.

R. Amelia, “Sentiment Analysis of Government Policy in Relocating the Republic of Indonesia’s Capital City,” Journal of Public Administration and Government, vol. 5, no. 2, pp. 177–187, Aug. 2023, [Online]. Available: https://jurnal.fisip.untad.ac.id/index.php/JPAG

D. W. Syahputra, B. Rahayudi, and L. Muflikhah, “Analisis Sentimen Twitter terhadap Kebijakan Pemberlakuan Pembatasan Kegiatan Masyarakat menggunakan Metode Support Vector Machine,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 6, no. 3, pp. 1067–1072, Mar. 2022, [Online]. Available: http://j-ptiik.ub.ac.id`

Y. Sibaroni, “Perbandingan Pembobotan Fitur TF-IDF dan TF-ABS Dalam Klasifikasi Berita Online Menggunakan Support Vector Machine (SVM),” e-Proceeding of Engineering, vol. 10, no. 3, pp. 3652–3663, Jun. 2023.

M. I. Syafaah and L. Lestandy, “Emotional Text Classification Using TF-IDF (Term Frequency-Inverse Document Frequency) And LSTM (Long Short-Term Memory),” JUITA: Jurnal Informatika, vol. 10, no. 2, pp. 225–232, Nov. 2022, [Online]. Available: https://atapdata.ai/dataset/192/HIMPUNAN_DATA_E

F. Rifaldy, Y. Sibaroni, and S. S. Prasetiyowati, “Effectiveness of Word2Vec and TF-IDF in Sentiment Classification on Online Investment Platforms Using Support Vector Machine,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 10, no. 2, pp. 863–874, Mar. 2025, doi: 10.29100/jipi.v10i2.6055.

A. H. Dani, E. Y. Puspaningrum, and R. Mumpuni, “Studi Performa TF-IDF dan Word2Vec Pada Analisis Sentimen Cyberbullying,” Jurnal Teknik Informatika dan Terapan, vol. 2, no. 2, pp. 94–106, Jun. 2024, doi: 10.62951/router.v2i2.76.

Z. Zhan, “Comparative Analysis of TF-IDF and Word2Vec in Sentiment Analysis: A Case of Food Reviews,” ITM Web of Conferences, vol. 70, p. 02013, 2025, doi: 10.1051/itmconf/20257002013.

G. R. Ati and P. T. Prasetyaningrum, “Analysis of Community Sentiment Towards Free Nutrition Meal Programs on Twitter Using Naïve Bayes, Support Vector Machine, K-Nearest Neighbors, and Ensemble Methods,” Journal of Information Systems and Informatics, vol. 7, no. 2, pp. 1443–1460, Jul. 2025, doi: 10.51519/journalisi.v7i2.1098.

N. R. Dewi, E. Y. Puspaningrum, and H. Maulana, “Analisis Sentimen Tweet Vaksinasi COVID-19 Menggunakan RNN Dengan Metode TF-IDF Dan Word2Vec,” Jurnal Informatika dan Sistem Informasi (JIFoSI), vol. 3, no. 1, pp. 56–65, Apr. 2022.

Downloads

Published

2025-12-31

Issue

Section

Original Articles