Sentiment Analysis of YouTube Comments on Indonesia’s Capital Relocation Using Naive Bayes

Authors

  • Asro STMIK IM Bandung
  • Novi Rukhviyanti STMIK IM Bandung
  • Didik Santoso Universitas Tangerang

Keywords:

Sentiment Analysis, Naive Bayes, YouTube, Public Opinion, Capital Relocation

Abstract

The relocation of Indonesia’s capital city from Jakarta to East Kalimantan has generated wide public debate, with YouTube becoming one of the main platforms where people actively express their opinions. This study explores those responses by applying the Naive Bayes algorithm to classify sentiments found in user comments. The comments were collected using Google’s API and then refined through a series of text-cleaning steps, such as removing unnecessary words, applying normalization, and stemming. Once prepared, a Multinomial Naive Bayes classifier was employed to group the comments into three categories: positive, negative, and neutral. The results indicate stable performance, with the model correctly classifying about three out of four comments across various test splits. Negative sentiments were consistently identified with high reliability, while neutral and positive tones were more difficult to capture, as reflected in lower recall values. These findings highlight both the potential and the limitations of Naive Bayes in sentiment analysis, while also providing valuable insights into public opinion regarding Indonesia’s capital relocation policy.

Downloads

Published

2025-12-02

Issue

Section

Artikel