Reading Emotions Behind TikTok Text: Fine-Tuning IndoBERT for Nine-Class Emotion Classification in the Indonesian Language

Main Article Content

Indri Anjar Kartika Sari
Catur Suratnoaji
Agus Widiyarta

Abstract

This study focuses on fine-tuning IndoBERT for nine-class emotion classification of Indonesian TikTok text. A computational BAHAGIA pipeline is developed covering text preprocessing, label construction, class-imbalance handling, transformer fine-tuning, evaluation, and model export. The primary dataset contains 8,834 TikTok records, of which 2,775 contain emotion labels and form the labeled classification basis. Fine-tuned IndoBERT is compared with a TF-IDF–Logistic Regression baseline using accuracy, macro-F1, and weighted-F1. The documented repository results report 78.0% accuracy, 0.80 macro-F1, and 0.78 weighted-F1 for IndoBERT, compared with 73.7%, 0.73, and 0.74 for the baseline. The 0.07 macro-F1 improvement indicates better average performance across classes in the available evaluation. The main contribution is a contextual IndoBERT-based computational approach for fine-grained emotion classification in Indonesian social-media text. Heuristic labels and limited human validation constrain interpretation; the model is intended for text classification and social listening rather than psychological diagnosis.

Article Details

Section

Articles

References

BAHAGIA. (2026). BAHAGIA: Behavioral Analysis of Happiness And Grief In social-media Addiction—Emotion classification engine for Indonesian-language TikTok content. GitHub. https://github.com/indri007/BAHAGIA

Ceron, A., & Negri, F. (2016). The “Social Side” of Public Policy: Monitoring Online Public Opinion and Its Mobilization During the Policy Cycle. Policy & Internet, 8(2), 131–147. https://doi.org/10.1002/poi3.117

Glenn, A., LaCasse, P., & Cox, B. (2023). Emotion classification of Indonesian Tweets using Bidirectional LSTM. Neural Computing and Applications, 35, 9567–9578. https://doi.org/10.1007/s00521-022-08186-1

Jain, L., Velez, L., Karlapati, S., Forand, M., Kannali, R., Yousaf, R. A., Ahmed, R., Sarfraz, Z., Sutter, P. A., Tallo, C. A., & Ahmed, S. (2025). Exploring problematic TikTok use and mental health issues: A systematic review of empirical studies. SAGE Open Medicine,

16. https://doi.org/10.1177/21501319251327303

Koto, F., Rahimi, A., Lau, J. H., & Baldwin, T. (2020). IndoLEM and IndoBERT: A benchmark dataset and pre-trained language model for Indonesian NLP. Proceedings of the 28th International Conference on Computational Linguistics, 757–770. https://doi.org/10.18653/v1/2020.coling-main.66

Li, Y., et al. (2025). Association between problematic TikTok use and mental health: A systematic review and meta-analysis. International Journal of Public Health, 70. https://doi.org/10.3934/publichealth.2025027

Mellon, J., & Prosser, C. (2017). Twitter and Facebook are not representative of the general population: Political attitudes and demographics of British social media users. Research & Politics, 4(3), 1–9. https://doi.org/10.1177/2053168017720008

Stieglitz, S., Mirbabaie, M., Ross, B., & Neuberger, C. (2018). Social media analytics—Challenges in topic discovery, data collection, and data preparation. International Journal of Information Management, 39, 156–168. https://doi.org/10.1016/j.ijinfomgt.2017.12.002

Wilie, B., Vincentio, K., Winata, G. I., Cahyawijaya, S., Li, X., Lim, Z. Y., Soleman, S., Mahendra, R., Fung, P., Bahar, S., & Purwarianti, A. (2020). IndoNLU: Benchmark and resources for evaluating Indonesian natural language understanding. Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing, 843–857. https://doi.org/10.18653/v1/2020.aacl-main.85

Zimbra, D., Abbasi, A., Zeng, D., & Chen, H. (2018). The state-of-the-art in Twitter sentiment analysis: A review and benchmark evaluation. ACM Transactions on Management Information Systems, 9(2), Article 5. https://doi.org/10.1145/3185045

Public Sentiment toward Indonesia’s Free Nutritious Meal Program on X: A Systematic Review. (2026). Manuscript/document provided for the present research context.