Analysis of Public Sentiment Towards LGBT on Twitter Social Media using Naïve Bayes Method

Authors

  • Yudhi Franata University of Malikussaleh
  • Rizal University of Malikussaleh
  • Rizki Suwanda University of Malikussaleh

DOI:

https://doi.org/10.32736/sisfokom.v14i3.2400

Keywords:

Sentiment Analysis, LGBT, Twitter, Naïve bayes

Abstract

The advancement of information technology and the widespread use of social media have provided a platform for individuals to express their views on various social issues, including those related to Lesbian, Gay, Bisexual, and Transgender (LGBT) topics. This study aims to assess public sentiment towards LGBT issues on Twitter by employing the Naïve Bayes classification algorithm. Relevant tweets were collected through web scraping based on specific LGBT-related keywords within a defined time frame. The collected data underwent several preprocessing stages, including data cleaning, tokenization, stopword removal, and stemming. The processed data were then categorized into three sentiment classes: positive, negative, and neutral. Naïve Bayes was chosen for its effectiveness and efficiency in handling large-scale textual data. The analysis revealed that negative sentiment toward LGBT issues was predominant, although a considerable portion of tweets expressed neutral and positive sentiments. These findings offer valuable insights for policymakers, social activists, and academics in understanding public perception and formulating more effective communication strategies related to LGBT discourse in Indonesia. The classification model achieved an accuracy of 57%, precision of 52%, recall of 100%, and an F1-score of 68%. While the Naïve Bayes approach proved capable in sentiment classification, the model's accuracy could be further enhanced through improved data preparation or the application of more advanced algorithms.

References

R. Palupi, M. H. Rahmansyah, G. M. Arasta, and G. Irhamdhika, “Isu LGBT Dalam Bingkai Media Online (Analisis Framing Robert Entman Pada Pemberitaan RKUHP LGBT Pada Tempo. co Dan BBBCIndonesia. com),” Jurnal Media Penyiaran, vol. 2, no. 2, pp. 148–156, 2022.

E. Andina, “Faktor psikososial dalam interaksi masyarakat dengan gerakan lgbt di indonesia,” Aspirasi: Jurnal Masalah-masalah Sosial, vol. 7, no. 2, pp. 173–185, 2019.

S. Amalia, “Kelompok LGBT Indonesia Ikut Serta dalam Paris Pride,” 2019.

M. Sholihin, “Polisi Tak Beri Izin Kegiatan LGBT Berkedok Gathering di Puncak Bogor.,” vol. 1, 2022.

W. Yulita, E. D. Nugroho, and M. H. Algifari, “Analisis sentimen terhadap opini masyarakat tentang vaksin covid-19 menggunakan algoritma naïve bayes classifier,” Jurnal Data Mining dan Sistem Informasi, vol. 2, no. 2, pp. 1–9, 2021.

W. Zhang and F. Gao, “An improvement to naive bayes for text classification,” Procedia Eng, vol. 15, pp. 2160–2164, 2011.

N. Nurdin, M. Suhendri, Y. Afrilia, and R. Rizal, “Klasifikasi Karya Ilmiah (Tugas Akhir) Mahasiswa Menggunakan Metode Naive Bayes Classifier (NBC),” SISTEMASI: Jurnal Sistem Informasi, vol. 10, no. 2, pp. 268–279, 2021.

R. Rizal, M. Fikry, and A. Helmina, “Opinion Mining About Parfum on E-Commerce Bukalapak. Com Using the Naïve Bayes Algorithm,” JITK (Jurnal Ilmu Pengetahuan dan Teknologi Komputer), vol. 6, no. 1, pp. 107–114, 2020.

R. Tjut Adek and S. Nasution, “Tweet Clustering in Indonesian Language Twitter Social Media using Naive Bayes Classifier Method,” Eurasian Journal of Analytical Chemistry (Abbrev. Eurasian J Anal Chem. or EJAC), vol. 13, no. 6, pp. 277–284, 2018.

R. Kosasih and A. Alberto, “Sentiment analysis of game product on shopee using the TF-IDF method and naive bayes classifier,” ILKOM Jurnal Ilmiah, vol. 13, no. 2, pp. 101–109, 2021.

A. Karami, M. Lundy, F. Webb, H. R. Boyajieff, M. Zhu, and D. Lee, “Automatic Categorization of LGBT User Profiles on Twitter with Machine Learning,” Electronics (Basel), vol. 10, no. 15, p. 1822, 2021.

V. A. Fitri, R. Andreswari, and M. A. Hasibuan, “Sentiment analysis of social media Twitter with case of Anti-LGBT campaign in Indonesia using Naïve Bayes, decision tree, and random forest algorithm,” Procedia Comput Sci, vol. 161, pp. 765–772, 2019.

L. A. Fudholi, N. Rahaningsih, and R. D. Dana, “Sentimen Analisis Perilaku Penggemar Coldplay Di Media Sosial Twitter Menggunakan Metode Naive Bayes,” JATI (Jurnal Mahasiswa Teknik Informatika), vol. 8, no. 3, pp. 4150–4159, 2024.

H. Hermanto and A. Noviriandini, “Analisa Sentimen Terhadap Belajar Online Pada Masa Covid-19 Menggunakan Algoritma Support Vector Machine Berbasis Particle Sarm Optimization,” Jurnal Informatika Kaputama (JIK), vol. 5, no. 1, pp. 129–136, 2021.

L. Hickman, S. Thapa, L. Tay, M. Cao, and P. Srinivasan, “Text preprocessing for text mining in organizational research: Review and recommendations,” Organ Res Methods, vol. 25, no. 1, pp. 114–146, 2022.

H. Simorangkir and K. M. Lhaksmana, “Analisis Sentimen pada Twitter untuk Games Online Mobile Legends dan Arena of Valor dengan Metode Naïve Bayes Classifier,” eProceedings of Engineering, vol. 5, no. 3, 2018.

E. H. Muktafin, K. Kusrini, and E. T. Luthfi, “Analisis Sentimen pada Ulasan Pembelian Produk di Marketplace Shopee Menggunakan Pendekatan Natural Language Processing,” Jurnal Eksplora Informatika, vol. 10, no. 1, pp. 32–42, 2020.

Downloads

Published

2025-07-27

Issue

Section

Articles