Sentiment Analysis of Public Opinion on the Pertalite Fuel Issue in YouTube Comments Using the Naïve Bayes Method
DOI:
https://doi.org/10.59934/jaiea.v5i2.2037Keywords:
Sentiment Analysis, Pertalite Fuel, Youtube, Naïve Bayes, Text MiningAbstract
The issue of Pertalite fuel (BBM Pertalite) has generated widespread public reactions on social media, particularly on the YouTube platform, where users actively express opinions through comment sections. This study aims to analyze public sentiment toward the Pertalite fuel issue based on YouTube comments using a text mining approach and the Naïve Bayes classification algorithm. The dataset consists of approximately 3,000 YouTube comments collected via the YouTube Data API and processed through several text preprocessing stages, including cleaning, normalization, tokenization, stopword removal, and stemming. Sentiment labeling was performed using a lexicon-based approach, followed by feature extraction using Term Frequency–Inverse Document Frequency (TF-IDF). The data were divided into training and testing sets with an 80:20 ratio. Experimental results indicate that the Naïve Bayes model achieved an accuracy of 69.67%, with negative sentiment dominating public discourse both in terms of comment frequency and user engagement measured by likes. These findings suggest a prevailing public dissatisfaction with the Pertalite fuel issue and highlight the usefulness of social media–based sentiment analysis as a data-driven instrument for understanding public perception. The results of this study provide valuable insights that can support the evaluation of energy policies and demonstrate the potential of sentiment analysis in policy-related public opinion studies.
Downloads
References
W. Medhat, A. Hassan, and H. Korashy, “Sentiment analysis algorithms and applications : A survey,” Ain Shams Eng. J., vol. 5, no. 4, pp. 1093–1113, 2014, doi: 10.1016/j.asej.2014.04.011.
R. Nugroho, E. Hidayat, and E. Prasetyo, “Pemanfaatan media sosial untuk analisis opini publik terhadap kebijakan pemerintah,” J. Ilmu Sos. dan Hum., vol. 10, no. 2, pp. 256–266, 2021, doi: 10.23887/jish-undiksha.v10i2.32456.
B. Pang and L. Lee, “Opinion Mining and Sentiment Analysis,” Found. Trends Inf. Retr., vol. 2, no. 1–2, pp. 1–135, Jan. 2008, doi: 10.1561/1500000011.
A. Pak and P. Paroubek, “Twitter as a Corpus for Sentiment Analysis and Opinion Mining,” pp. 1320–1326.
K. Ravi and V. Ravi, “A survey on opinion mining and sentiment analysis: Tasks, approaches and applications,” Knowledge-Based Syst., vol. 89, pp. 14–46, 2015, doi: https://doi.org/10.1016/j.knosys.2015.06.015.
A. Alsaeedi and M. Z. Khan, “A Study on Sentiment Analysis Techniques of Twitter Data,” vol. 10, no. 2, pp. 361–374, 2019.
E. Cambria, “Affective Computing and Sentiment Analysis,” IEEE Intell. Syst., vol. 31, no. 2, pp. 102–107, 2016, doi: 10.1109/MIS.2016.31.
B. Liu, “Sentiment Analysis and Opinion Mining,” no. May, 2012.
R. Feldman, “Techniques and Applications for Sentiment Analysis,” Commun. ACM, vol. 56, pp. 82–89, 2013, doi: 10.1145/2436256.2436274.
A. Giachanou and F. Crestani, “Like It or Not : A Survey of Twitter Sentiment Analysis Methods,” vol. 49, no. 2, 2021.
A. Qazi, R. G. Raj, G. Hardaker, and C. Standing, “A systematic literature review on opinion types and sentiment analysis techniques,” Internet Res., vol. 27, no. 3, pp. 608–630, 2017, doi: https://doi.org/10.1108/IntR-04-2016-0086.
F. Informatik and T. Joachims, “K unstliche Intelligenz Text Categorization with Support Vector Machines : Learning with Many Relevant Features,” 1998.
R. Wahyudi, Y. A. Sari, and M. A. Fauzi, “Analisis sentimen masyarakat terhadap kebijakan pemerintah menggunakan Naïve Bayes,” J. Teknol. Inf. dan Ilmu Komput., vol. 8, no. 3, pp. 567–574, 2021, doi: 10.25126/jtiik.202183394.
B. A. Pratama and Adiwijaya, “Analisis sentimen pada Twitter menggunakan metode Naïve Bayes dengan seleksi fitur chi-square,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 2, no. 12, pp. 6303–6310, 2018, [Online]. Available: https://j-ptiik.ub.ac.id/index.php/j-ptiik/article/view/3444
D. Kurniawan, N. Hidayat, and L. Fanani, “Analisis sentimen opini publik pada media sosial menggunakan metode Naïve Bayes,” J. RESTI, vol. 4, no. 5, pp. 882–889, 2020, doi: 10.29207/resti.v4i5.2356.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.







