Abstract: |
The Russia-Ukraine war has been a significant international conflict, generating a wide range of public sentiments. With escalating geopolitical tensions, determining whether public discourse supports or condemns the invasion has become increasingly important. This study investigates public attitudes through large-scale sentiment analysis of 1,426,310 tweets collected during the early phase of the conflict. Sentiment classification was performed using machine learning models, including XGBoost, Random Forest, Naïve Bayes, Support Vector Machine, and a Feedforward Deep Learning model, combined with Count Vectorizer and TF-IDF. The deep learning model with Count Vectorizer achieved the highest accuracy at 89.58%, outperforming all others. To go beyond polarity classification, emotion prediction was also conducted using a lexicon-based method (NRC Emotion Lexicon) and a transformer-based model (DistilRoBERTa), both trained to classify tweets into eight emotions: joy, trust, surprise, fear, anger, sadness, disgust, and anticipation. A comparative evaluation showed that the transformer model significantly outperformed the lexicon-based model across all metrics, including accuracy, precision, recall, F1 score, and Hamming loss. Fear and anger emerged as the most dominant emotions, highlighting widespread public anxiety and distress. This analysis provides a nuanced understanding of online discourse during conflict and offers insights for researchers, policymakers, and communicators responding to global crises. |