SENTIMENT ANALYSIS OF THE NATIONAL MANDATE PARTY (PAN) IN YOUTUBE COMMENTS USING THE TF-IDF AND COSINE SIMILARITY APPROACHES

Penulis

  • Tresna Yudha Prawira Universitas Muhammadiyah Brebes
  • Fitri Ayuning Tyas Universitas Muhammadiyah Brebes
  • Azhar Basir Universitas Muhammadiyah Brebes

DOI:

https://doi.org/10.47652/metadata.v8i1.937

Abstrak

This study analyzed public sentiment towards the National Mandate Party (PAN) on YouTube comments using the Term Frequency Inverse Document Frequency (TF-IDF) approach and cosine similarity. The aim of the study was to map the tendency of public opinion into three categories: positive, negative, and neutral, and to evaluate the performance of this method compared to a simple lexicon-based approach. Comment data is obtained through the YouTube Data API, then processed through the stages of text cleanup, normalization, stopword removal, and stemming using Sastrawi. Word representation is formed with TF-IDF, while sentiment classification is done by calculating vector similarity using cosine similarity. The results of the analysis showed that neutral sentiment dominated at 63.2%, followed by negative sentiment at 20.7%, and positive sentiment at 16.1%.  The TF-IDF model  is able to classify neutral and negative comments quite well, although some positive comments are difficult to distinguish from neutral comments. These findings suggest that discussions about PAN on YouTube tend to be informative rather than emotional, with a higher tendency to criticize than support. In conclusion, the TF-IDF and cosine similarity methods are effective in providing an overview of public opinion with low computational complexity, while being a lightweight alternative to deep learning-based methods.

Referensi

Maramis, S., Andrias Herman Balo, A., Indira Romanti Aulia, W., Arsitektur, J., Teknik, F., & Halu Oleo Kendari, U. (2022). Creative Center Building with a Contemporary Architectural Approach in Kendari City. 7(2), 2503–3344.

Puspita Sukmawati, R., Tri Harjanto, S., Nelza Mulki Iqbal, M., Architecture Program, M., Civil Engineering and Planning, F., & Malang, I. (2022). Ratih Puspita Sukmawati | Suryo Tri Harjanto | Muhammad Nelza Mulki Iqbal Creative Hub and Disability-Friendly Business Incubation Facilities Theme: Behavioral Architecture. 647–664.

Ramadhany, H. Z., Gatot, I., Susilo, A., Herlia, P., Mt, S. T., Architecture, M. P., Civil Engineering, F. T., Planning, D., & Malang, I. (n.d.). Design of Kukar Creative Center in Kutai Kartanegara with the Theme of Metaphorical Architecture.

Siregar, T., & Kustianingrum, D. (2022). Application of the Biophilic Architecture Theme in the Design of the Urbangle Hotel in Bandung. E-Proceeding, 2(1), 1– 12.

Triwahyono, D., & Susilo, G. A. (2020). Malang Innovation and Creative Center Theme: Green Architecture. Pengilon: Architecture Journal, 4(02), 175–186. https://ejournal.itn.ac.id/index.php/pengilon/article/view/3113%0Ahttps://ejour nal.itn.ac.id/index.php/pengilon/article/download/3113/2416

Ummah, M. S. (2019). Bogor Regency in Figures 2023. Sustainability (Switzerland), 11(1), 1–14. http://scioteca.caf.com/bitstream/handle/123456789/1091/RED2017Eng-

ene.pdf?sequence=12&isAllowed=y%0Ahttp://dx.doi.org/10.1016/j.regsciurbec

o.2008.06.005%0Ahttps://www.researchgate.net/publication/305320484_Sistem_ Pembetungan_Terpusat_Strategi_Melestari

Zulva A, Fibria C.N, N. F. . (2022). Application of Green Architecture in Creative Hubs at Surabaya People's Amusement Park. 7(2), 747–755.

Nst, V. F. H., Isnaini, D. B. J., Supriadi, S., Syafrizal, S., & Ichsan, R. N. (2025). Model Of Human Resource Collaboration Strategy In Strengthening Msme Halal Products In The Indonesian Nias Islands. Jurnal Ilmiah METADATA, 7(3), 62-79.

Ichsan, R. N., Nst, V. F. H., Supriadi, S., Syafrizal, S., & Lubis, F. P. A. (2025). Sharia principles, digital transformation, and local economy: Challenges and opportunities for Sharia cooperatives in Langkat Regency. Jurnal Ilmiah METADATA, 7(3), 30-41.

Ichsan, R. N., Siregar, B. A., Suma, D., Nst, V. F. H., & Lubis, F. P. A. (2025). Halal Industry In The Fulfillment Of Sharia Maqasid: A Qualitative Study On Halal Business Actors In North Sumatra. Jurnal Ilmiah METADATA, 7(2), 80-97.

Wijaya, D. M., Nst, V. F. H., & Isnaini, D. B. Y. (2025). Designing A Talent Management Strategy To Address Organizational Transformation Challenges: A Case Study of PT. Sentosa Deli Mandiri. Moneter: Jurnal Keuangan dan Perbankan, 13(1), 125-138.

Nst, V. F. H., Ichsan, R. N., Supriadi, S., & Lubis, F. P. A. (2025). Edukasi Konsep Pariwisata Ramah Muslim Bagi Pelaku Usaha Pariwisata Di Kabupaten Langkat, Sumatera Utara. Jurnal Pengabdian Masyarakat Hablum Minannas, 4(1), 26-36.

Nst, V. F. H., Wijaya, D. M., Azaman, A., & Nasti, N. (2025). Sustainability Performance Management Integration: A Systemic Approach In Improving The Organizational Competitiveness Of PT. Sentosa Deli Mandiri. Moneter: Jurnal Keuangan dan Perbankan, 13(1), 114-124.

Nst, V. F. H., Wijaya, D. M., & Azaman, A. (2025). Pengaruh Modal Intelektual Dan Komitmen Organisasional Terhadap Kinerja Pegawai Dengan Organizational Citizenship Behavior (Ocb) Sebagai Variabel Intervening Pada Pemerintahan Kota Medan. Jurnal Ilmiah METADATA, 7(1), 1-15.

Nst, V. F. H., Asmuni, A., & Anggraini, T. (2024). Review Of Fiqh Muamalah On The Forms Of Online Buying And Selling Contracts In The Tiktok Shop Application. Jurnal Review Pendidikan dan Pengajaran (JRPP), 7(3), 10804-10812.

Ichsan, R. N., Nst, V. F. H., Nasution, L., & Hutabarat, L. (2024). The effect of halal labeling on the performance of small and medium enterprise (SME) in medan city. Jurnal Mantik, 8(1), 421-427.

Lubis, M. R., Ichsan, R. N., Nasution, L., Nst, V. F. H., & Lubis, D. (2024). Analysis Of Factors Affecting The Amount Of People's Business Credit Loans In Lubuk Pakam District, Deli Serdang Regency, North Sumatra Province. Jurnal Ekonomi, 13(02), 915-923.

Nst, V. F. H., Majid, M. S. A., & Harahap, I. (2024). The Role Of Imports In Development According To Islamic And Conventional Macroeconomic Perspectives. Moneter: Jurnal Keuangan dan Perbankan, 12(1), 100-106.

Devi, R. S., Lubis, M. A., Nst, V. F. H., & Sihombing, A. (2024). Persaingan Usaha Tidak Sehat Berdasarkan Undang-Undang Nomor 5 Tahun 1999 Tentang Larangan Praktek Monopoli Dan Persaingan Usaha Tidak Sehat. Jurnal Ilmiah METADATA, 6(1), 108-118.

##submission.downloads##

Diterbitkan

2026-01-28

Cara Mengutip

Prawira, T. Y., Tyas, F. A., & Basir, A. (2026). SENTIMENT ANALYSIS OF THE NATIONAL MANDATE PARTY (PAN) IN YOUTUBE COMMENTS USING THE TF-IDF AND COSINE SIMILARITY APPROACHES. Jurnal Ilmiah METADATA, 8(1), 111-125. https://doi.org/10.47652/metadata.v8i1.937