Sentiment and Public Emotion Classification of Viral Content Using Transformer-Based Model - Ferdi Antonio; Handry Eldo; Arrazy Elba Ridha; Iwan Adhicandra; Cut Susan Octiva (International Journal Software Engineering and Computer Science (IJSECS), 2026)
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.