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 FormatReferences
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
License
Copyright (c) 2026 Ferdi Antonio, Handry Eldo, Arrazy Elba Ridha, Iwan Adhicandra, Cut Susan Octiva

This work is licensed under a Creative Commons Attribution 4.0 International License.
This is an open-access journal distributed under the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits unrestricted use, distribution, reproduction, and adaptation in any medium (even commercially), provided appropriate credit is given to the original author(s), a link to the license is provided, and any changes made are indicated. Authors retain copyright without restrictions and grant the journal the right of first publication as well as non-exclusive publishing rights for archiving, indexing, and scholarly dissemination.
Downloads
OJS UsageStats PluginMost read articles by the same author(s)
- Integration of Edge Computing and Wireless Sensors for Energy Efficiency Monitoring in Solar Panels Cut Susan Octiva, T. Irfan Fajri, Handry Eldo, Ayuliana Ayuliana, Nur Amalia Hasma · Vol. 6 No. 1 (2026): APRIL 2026
- Integrating Zero Trust Architecture with Blockchain Technology to Maintain Data Security in the Cloud T. Irfan Fajri, Handry Eldo, Cut Susan Octiva, Dikky Suryadi, Muhammad Lukman Hakim · Vol. 5 No. 3 (2025): DECEMBER 2025
Recommended Articles
Journal Transparency
Additional InformationLearn more about how this journal ensures quality, ethics, and transparency.