Sentiment Analysis of YouTube User Comments on Government Policies Using the Naïve Bayes Method: Analisis Sentimen Komentar Pengguna Youtube Terhadap Kebijakan Pemerintah Menggunakan Metode Naïve Bayes - Trisnawadi Ismardani; Zaihol Fatah (Journal of Data Insights, 2025)
This research endeavors to analyze public sentiment expressed in YouTube user comments regarding the government's policy pertaining to the confiscation of undeveloped land after a two-year period of non-utilization. The methodology employed leverages the Naïve Bayes algorithm for classification, implemented within the Google Colaboratory environment. Data were systematically collected from specific YouTube videos discussing the aforementioned land confiscation policy. The research workflow encompassed comprehensive stages: data acquisition, rigorous text preprocessing, feature weighting utilizing the Term Frequency-Inverse Document Frequency (TF-IDF) technique, and final classification using the Naïve Bayes algorithm. Evaluation results demonstrate that the proposed model achieved a high accuracy level of 90%, with the highest F1-score recorded within the neutral sentiment class. However, an imbalance in the dataset's class distribution led to comparatively lower precision and recall values for both the positive and negative classes. Overall, this study confirms the high efficacy of the Naïve Bayes algorithm in analyzing Indonesian-language text data from social media platforms, specifically YouTube comments, and provides a crucial foundation for the future development of more balanced sentiment models.