YouTube Sentiment Analyzer for Modi (YSAM): Unlocking YouTube Comment Sentiments with Machine Learning and Visualization
Sanghamitra Panda, Sushree Sasmita Dash, Ashis Kumar Ratha, Swapnajit Sahoo, Annimesh Sasmal, Debasish Swapnesh Kumar Nayak · 2025
Sentiment analysis has emerged as a critical field for understanding public opinion through textual data analysis. This study presents a comprehensive pipeline for sentiment analysis of YouTube comments regarding Indian Prime Minister Narendra Modi, utilizing machine learning techniques to identify complex patterns in public sentiment. The proposed methodology provides an effective approach for understanding citizen opinions through social media discourse analysis. The pipeline encompasses data extraction, preprocessing, vectorization using Term Frequency-Inverse Document Frequency (TF-IDF) and Bag of Words techniques, followed by classification using multiple machine learning models. A dataset comprising 3,000 comments was divided into training, validation, and testing subsets, with over-sampling techniques employed to address class imbalance issues. The ExtraTrees Classifier demonstrated superior performance, achieving 96% accuracy in sentiment classification. Additionally, this study presents a user-friendly sentiment analysis dashboard for real-time processing and visualization of sentiment patterns, highlighting the potential of machine learning applications in sentiment analysis and providing valuable insights for researchers and practitioners in computational social science.