The Koperasi Merah Putih program is a government policy aimed at strengthening grassroots economic cooperatives at the village level, and its launch has triggered diverse public reactions on social media, particularly TikTok. This study aims to analyze public sentiment toward the program using a machine learning approach and to identify patterns in the distribution of public opinion based on collected comments. This research adopts a quantitative approach using a Naive Bayes-based sentiment analysis method. Data were collected through scraping of 2,299 TikTok comments discussing Koperasi Merah Putih, automatically labeled using a positive and negative keyword dictionary, followed by text preprocessing (cleaning, normalization, and removal of empty entries). Non-neutral labeled data were split into training (70%) and testing (30%) sets using stratified sampling, then transformed using CountVectorizer with unigram and bigram features, and classified using Multinomial Naive Bayes. The test results show that the model achieved an accuracy of 85.92%, with a precision of 0.84 and recall of 1.00 for the negative class, while the positive class achieved a precision of 1.00 but a recall of only 0.50, resulting in a weighted F1-Score of 0.84. The overall sentiment distribution indicates a dominance of neutral comments (89.3%), followed by negative (7.7%) and positive (3.0%) comments, suggesting that most public interactions are informational rather than emotionally charged, while strongly opinionated comments tend to be critical. The study concludes that a dictionary-based Naive Bayes approach is effective for accurately detecting negative sentiment but has limitations in capturing the linguistic diversity of positive expressions, indicating the need for lexicon expansion and larger training data in future research.
Copyrights © 2026