Lexicon-Based Sentiment Analysis of Indonesian News Headlines on the Free Nutritious Meal (MBG) Program: TextBlob versus InSet
Keywords:
sentiment analysis, lexicon-based methods, Indonesian language, news headlines, TextBlob, InSet, query-term bias, public policyAbstract
—Lexicon-based sentiment scoring is a common entry point in data-mining courses because it needs no training data. This paper applies a classroom pipeline built on Google News RSS, regularexpression preprocessing and TextBlob to 100 Indonesian headlines retrieved on 18 September 2026 with the query “Makan Bergizi Gratis”, Indonesia’s Free Nutritious Meal (MBG) program. Two Indonesian alternatives based on the InSet lexicon are added: a raw word-sum scorer and a refined scorer that masks query terms, removes stopwords and flips negated terms. All scorers are compared with a single-annotator reference set of 70 neutral, 19 negative and 11 positive headlines. TextBlob matched 0.2% of tokens and labelled 99 headlines neutral; its 71% accuracy is one point above the majorityclass baseline (κ = 0.05). Raw InSet covered 31.7% of tokens but overpredicted polarity (macro-F1 0.33, κ = 0.10). The query word gratis (free) alone contributed +128 lexicon points, more than the corpus net score of +80. Masking query terms and stopwords reduced the net score to +15, turning an apparently favourable press into a balanced one, and raised negative recall from 0.47 to 0.58 without improving overall agreement. Off-the-shelf lexicons are therefore unreliable for Indonesian policy headlines, and query-term leakage should be controlled whenever sentiment is aggregated from keyword searches
References
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Indonesian Journal of Cyber-AI and Security Intelligence

This work is licensed under a Creative Commons Attribution 4.0 International License.
This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0)


