Analisis Sentimen Masyarakat Terhadap Program Makan Bergizi Gratis (MBG) di Jawa Tengah Menggunakan Model Bidirectional Encoder Representations From Transformers For Indonesian (Indobert)
Abstract
This study analyzes public sentiment toward the Free Nutritious Meal (Makan Bergizi Gratis/MBG) program in Central Java using data from the social media platform X. Data were collected automatically with Python and Selenium WebDriver, yielding 2,000 tweets containing username, date, location, and comment text. The comments were labeled manually, producing a relatively balanced dataset of 1,017 negative and 983 positive comments. After preprocessing cleaning, case folding, slang normalization, and WordPiece tokenization the dataset was split 80:10:10 for training, validation, and testing. A pre-trained IndoBERT model (124,442,882 total parameters, of which 28,943,618 were trainable) was fine-tuned for binary sentiment classification over 8 epochs; training loss fell from 0.6925 to 0.4914 while validation accuracy rose from 71.00% to 76.50%. On the 200-sample held-out test set, the final model achieved 84.50% accuracy, 84.89% precision, 84.50% recall, and an 84.44% F1-score, with a confusion matrix of 92 true negatives, 77 true positives, 21 false negatives, and 10 false positives. As a practical output, the sentiment analysis results were integrated into an interactive Streamlit dashboard to support real-time monitoring of public opinion.