Lexical similarity between sentiment classes, ambiguity of meaning, and the high number of overlapping words between labels are the main challenges in sentiment classification regarding government budget efficiency on social media. This issue is widely discussed because it relates to transparency and accountability in state financial management, so public perceptions of it need to be analyzed in context to support data-based policy evaluation. This study aims to develop an optimal sentiment classification model by integrating IndoBERT-based word representation and XGBoost classification algorithm. A total of 1,650 public comments were manually collected from platform X (Twitter), YouTube, TikTok, and Instagram, and annotated into three sentiment categories: positive, negative, and neutral, with inter-annotator reliability evaluated using Cohen's Kappa reaching 92.2%. The model was tested through three different scenarios. Experimental results show that the proposed method, a hybrid of IndoBERT fine-tuning and XGBoost, produced the best performance with an accuracy of 93% and an F1-score of 92%. Compared with the IndoBERT pre-trained model and the XGBoost baseline, the proposed model improved accuracy by 26 percentage points (from 67% to 93%). Contextual representation through fine-tuning proved effective in addressing meaning ambiguity, handling lexical similarity across classes, and improving model accuracy and stability. This study demonstrates the efficacy of hybrid transformer–ensemble models for handling high-ambiguity texts in the public-sector domain, thereby contributing to the literature on Indonesian sentiment classification.
Copyrights © 2026