Main Content
Open Access Articles

Sentiment and Public Emotion Classification of Viral Content Using Transformer-Based Model

Main Article Content

  • Ferdi Antonio1*
  • Handry Eldo2
  • Arrazy Elba Ridha3
  • Iwan Adhicandra4
  • Cut Susan Octiva5

Article Sidebar

Cover IJSECS VOLUME 6 NOMOR 1 APRIL 2026

Abstract

The proliferation of social media platforms has generated an unprecedented volume of viral content, each drawing varied public responses expressed through sentiment and emotion. Mapping those responses — not merely counting them — is what separates surface-level monitoring from a genuine understanding of public perception. This study classified sentiment (positive, negative, neutral) and emotion (anger, joy, sadness, and fear) toward viral content using a fine-tuned Transformer-based model. Data were collected from social media via web scraping, then subjected to standard text preprocessing: case folding, tokenization, stopword removal, and stemming. The cleaned dataset was subsequently annotated with sentiment and emotion labels. BERT (Bidirectional Encoder Representations from Transformers) served as the base architecture, fine-tuned for multi-label classification. Evaluation relied on an 80:20 train-test split, with performance measured through accuracy, precision, recall, and F1-score. Across all sentiment and emotion categories, the model returned consistently high scores and handled ambiguous, context-dependent text more reliably than conventional machine learning baselines. The Transformer-based approach proved well-suited for sentiment and emotion analysis on social media data, with clear potential for deployment in public opinion monitoring systems.

Article Details

How to Cite

Citation Format
Antonio, F., Eldo, H., Ridha, A. E., Adhicandra, I., & Octiva, C. S. (2026). Sentiment and Public Emotion Classification of Viral Content Using Transformer-Based Model. International Journal Software Engineering and Computer Science (IJSECS), 6(1), 194-203. https://doi.org/10.35870/ijsecs.v6i1.6969

References

16 References
  • Almalki, S. S. (2025). Sentiment analysis and emotion detection using transformer models in multilingual social media data. International Journal of Advanced Computer Science and Applications, 16(3), 324. https://doi.org/10.14569/IJACSA.2025.0160332
  • Antunes, F., Freire, M., Melo, P., & Costa, J. P. (2026). From emotional data to decisions: A systematic review on how airlines use sentiments and emotions to stay ahead. Journal of Air Transport Management, 131, 102911. https://doi.org/10.1016/j.jairtraman.2025.102911
  • Ashraf, S., & Choi, C. (2025). XP-STM: A cross-platform sentiment transferability model for negative public sentiment identification and mitigation. Journal of Engineering Research. https://doi.org/10.1016/j.jer.2025.12.005
  • Beshet, N. E., Salih, A. H., Salih, F. Z., Mahmood, H. E., Ahmed, A. A., Al Zahran, A., & Ghazal, T. M. (2026). Trends sentiment unveiled through deep dive into social media data. Procedia Computer Science, 275, 799–808. https://doi.org/10.1016/j.procs.2026.01.092
  • Kodati, D., & Tene, R. (2022). Identifying suicidal emotions on social media through transformer-based deep learning. Applied Intelligence, 53(10), 11885–11917. https://doi.org/10.1007/s10489-022-04060-8
  • Leon, M. (2025). Sentiment analysis: From rule-based lexicons to large language models. Intelligent Systems with Applications, 28, 200599. https://doi.org/10.1016/j.iswa.2025.200599
  • Maghsoudi, A., Nowakowski, S., Agrawal, R., Sharafkhaneh, A., Kunik, M. E., Naik, A. D., Xu, H., & Razjouyan, J. (2022). Sentiment analysis of insomnia-related tweets via a combination of transformers using Dempster-Shafer theory: Pre- and peri-COVID-19 pandemic retrospective study. Journal of Medical Internet Research, 24(12). https://doi.org/10.2196/41517
  • Md Suhaimin, M. S., Ahmad Hijazi, M. H., Moung, E. G., Nohuddin, P. N. E., Chua, S., & Coenen, F. (2023). Social media sentiment analysis and opinion mining in public security: Taxonomy, trend analysis, issues and future directions. Journal of King Saud University – Computer and Information Sciences, 35(9), 101776. https://doi.org/10.1016/j.jksuci.2023.101776
  • Oliveira, F. B., Haque, A., Mougouei, D., Evans, S., Sichman, J. S., & Singh, M. P. (2022). Investigating the emotional response to COVID-19 news on Twitter: A topic modelling and emotion classification approach. IEEE Access, 10, 16883–16897. https://doi.org/10.1109/ACCESS.2022.3150329
  • Parveen, S., Zaheen, U., & Khan, S. A. (2026). Deep learning approaches to sentiment analysis and text classification in social media data. The Critical Review of Social Sciences Studies, 4(1), 1168–1182. https://doi.org/10.59075/PVKFJC68
  • Sharma, U., Pandey, P., & Kumar, S. (2022). A transformer-based model for evaluation of information relevance in online social media: A case study of COVID-19 media posts. New Generation Computing, 40(4), 1029–1052. https://doi.org/10.1007/s00354-021-00151-1
  • Tabinda Kokab, S., Asghar, S., & Naz, S. (2022). Transformer-based deep learning models for the sentiment analysis of social media data. Array, 14, 100157. https://doi.org/10.1016/j.array.2022.100157
  • Tiwari, D., & Nagpal, B. (2022). KEAHT: A knowledge-enriched attention-based hybrid transformer model for social sentiment analysis. New Generation Computing, 40(4), 1165–1202. https://doi.org/10.1007/s00354-022-00182-2
  • Veluswamy, A. S., A, N., M, S., D, Y., M, A., & V, M. (2025). Natural language processing for sentiment analysis in social media: Techniques and case studies. ITM Web of Conferences, 76, 05004. https://doi.org/10.1051/itmconf/20257605004
  • Yazdi, M. G., Rafieizadeh, H., & Tajasob, P. (2025). Sentiment analysis of the 2024 Paris Olympics using RoBERTa language model. International Journal of Event and Festival Management, 17(1), 133–160. https://doi.org/10.1108/IJEFM-01-2025-0007
  • Zhou, Y., Li, Z., Tu, Y., & Lev, B. (2025). Precise refutation of social media rumors through users' perspective: Crowd classification based on believability. Expert Systems with Applications, 268, 126107. https://doi.org/10.1016/j.eswa.2024.126107

Author Biographies

Ferdi Antonio, Pelita Harapan University

Universitas Pelita Harapan, Tangerang Regency, Banten Province, Indonesia

Handry Eldo, Universitas Muhammadiyah Mahakarya Aceh

Universitas Muhammadiyah Mahakarya Aceh, Banda Aceh City, Aceh Province, Indonesia

Arrazy Elba Ridha, Universitas Teuku Umar

Universitas Teuku Umar, West Aceh Regency, Aceh Province, Indonesia

Iwan Adhicandra, Bakrie University

Bakrie University, South Jakarta City, Special Capital Region of Jakarta, Indonesia

Cut Susan Octiva, Universitas Amir Hamzah

Universitas Amir Hamzah, Deli Serdang Regency, North Sumatra Province, Indonesia

Downloads

OJS UsageStats Plugin
Download data is not yet available.

Most read articles by the same author(s)

Contrimetric

Recommended Articles

Journal Transparency

Additional Information

Learn more about how this journal ensures quality, ethics, and transparency.