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

Authors

  • Trisnawadi Ismardani universitas ibrahimy
  • Zaihol Fatah Univeritas Ibrahimy

DOI:

https://doi.org/10.26714/jodi.v3i2.876

Keywords:

google colaboratory, naive bayes, analisis sentimen, TF-IDF, youtube

Abstract

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.

Downloads

Published

2025-12-31

How to Cite

Ismardani, T., & Fatah, Z. (2025). 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. Journal Of Data Insights, 3(2), 113–123. https://doi.org/10.26714/jodi.v3i2.876