Analisis sentimen publik di twitter terhadap pelantikan presiden Prabowo menggunakan algoritma Naïve Bayes

Adhika Pramita Widyassari, Dea Salsabilla, M. Ali Amrozi

Abstract


Sentiment analysis on social media, especially Twitter, is an effective method to understand public opinion towards political events such as the inauguration of President Prabowo. This study aims to identify the sentiment of the Indonesian people regarding the inauguration of President Prabowo through machine learning-based sentiment analysis using the Multinomial Naïve Bayes algorithm. Data was collected from Twitter with relevant keywords and hashtags, covering the time span before and after the inauguration to capture the dynamics of sentiment changes. The preprocessing process was carried out through text cleaning, removing stop words, tokenization, and stemming to improve model accuracy. The classification results show the distribution of public sentiment, with the majority being neutral (52.63%), followed by positive sentiment (42.98%), and negative (4.39%). The model achieved an accuracy of 75%, showing quite good performance for short text classification. The contribution of this study lies in the application of sentiment analysis to the specific event of the inauguration of the President of Indonesia, with a focus on the critical period before and after the inauguration, which has not been widely studied before. The novelty of this study is the use of real-time Twitter data related to current political events (inauguration of President Prabowo), as well as the emphasis on neutral sentiment which provides a deeper dimension to public understanding. It is hoped that these findings can be the basis for designing more effective public communication strategies on social media.

Keywords: naïve bayes, prabowo presidential inauguration, twitter, sentiment analysis

Full Text:

PDF

References


M. O. Ibrohim and I. Budi, “A Dataset and Preliminaries Study for Abusive Language Detection in Indonesian Social Media,” Procedia Comput. Sci., vol. 135, pp. 222-229, 2018, doi: https://doi.org/10.1016/j.procs.2018.08.169

R. Luthfiansyah and B. Wasito, “Analisis Sentimen Terhadap Para Kandidat Presiden 2024 Berdasarkan Netizen Pengguna Twitter Dengan Metode Data Mining Dan Text Mining,” J. Inform. Dan Bisnis, vol. 11, no. 2, pp. 85-104, Jul. 2023, doi:

https://doi.org/10.46806/jib.v11i2.994

V. Pekar, H. Najafi, J. M. Binner, R. Swanson, C. Rickard, and J. Fry, “Voting intentions on social media and political opinion polls,” Gov. Inf. Q., vol. 39, no. 4, p. 101658, 2022, doi: https://doi.org/10.1016/j.giq.2021.101658

Mr. Swapnil P. Goje and Dr. Rupali H. Patil, “Sentiment Analysis of Political Parties on social media: A Machine Learning and Lexicon-Based Approach,” Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol., vol. 10, no. 5, pp. 233-246, Nov. 2024, doi: https://doi.org/10.32628/CSEIT24105103

E. Kubin and C. Von Sikorski, “The role of (social) media in political polarization: a systematic review,” Ann. Int. Commun. Assoc., vol. 45, no. 3, pp. 188-206, Jul. 2021, doi: https://doi.org/10.1080/23808985.2021.1976070

C. Villavicencio, J. J. Macrohon, X. A. Inbaraj, J. H. Jeng, and J. G. Hsieh, “Twitter sentiment analysis towards covid-19 vaccines in the Philippines using naïve bayes,” Inf. Switz., vol. 12, no. 5, 2021, doi: https://doi.org/10.3390/info12050204

T. Arifqi, N. Suarna, and W. Prihartono, “Penggunaan Naïve Bayes Dalam Menganalisis Sentimen Ulasan Aplikasi Mcdonald'S Di Indonesia,” JATI J. Mhs. Tek. Inform., vol. 8, no. 2, pp. 1949-1956, 2024, doi: https://doi.org/10.36040/jati.v8i2.8740

Y. A. Singgalen, “Pemilihan Metode dan Algoritma dalam Analisis Sentimen di Media Sosial : Sistematic Literature Review,” J. Inf. Syst. Inform., vol. 3, no. 2, pp. 278-302, 2021, doi: https://doi.org/10.33557/journalisi.v3i2.125

I. Septiana and D. Alita, “Perbandingan Random Forest dan SVM dalam Analisis Sentimen Quick Count Pemilu 2024,” J. Inform. J. Pengemb. IT, vol. 9, no. 3, pp. 224-233, Dec. 2024, doi: https://doi.org/10.30591/jpit.v9i3.6640

N. Sidauruk, N. Riza, and Rd. N. Siti Fatonah, “Penggunaan Metode Svm Dan Random Forest Untuk Analisis Sentimen Ulasan Pengguna Terhadap Kai Access Di Google Playstore,” JATI J. Mhs. Tek. Inform., vol. 7, no. 3, pp. 1901-1906, Nov. 2023, doi:

https://doi.org/10.36040/jati.v7i3.6899

A. Saepudin, A. Faqih, and G. Dwilestari, “Perbandingan Algoritma Klasifikasi Support Vector Machine, Random Forest dan Logistic Regression Pada Ulasan Shopee,” J. Tekno Kompak, vol. 18, no. 1, p. 178, Feb. 2024, doi: https://doi.org/10.33365/jtk.v18i1.3764

L. Maada, K. Al Fararni, B. Aghoutane, M. Fattah, and Y. Farhaoui, “A comparative study of Sentiment Analysis Machine Learning Approaches,” in 2022 2nd International Conference on Innovative Research in Applied Science, Engineering and Technology (IRASET), 2022, pp. 1-5. doi: https://doi.org/10.1109/IRASET52964.2022.9738346

S. Mutmatinah, “Metode Deep Learning LSTM dalam Analisis Sentimen Aplikasi PeduliLindungi,” 2024. https://doi.org/10.34304/scientific.v1i1.231

W. Lin and L. Liao, “Lexicon-based prompt for financial dimensional sentiment analysis,” Expert Syst. Appl., vol. 244, no. September 2022, p. 122936, 2024, doi: https://doi.org/10.1016/j.eswa.2023.122936

A. H. A. Zharifa and E. I. H. Ujianto, “Analisis Sentimen Publik di Twitter Pasca Debat Kelima Pilpres 2024 dengan Naïve Bayes,” Edumatic J. Pendidik. Inform., vol. 8, no. 2, pp. 754-763, Dec. 2024, doi: https://doi.org/10.29408/edumatic.v8i2.28048

L. Abdillah Fudholi, N. Rahaningsih, and R. Danar Dana, “Sentimen Analisis Perilaku Penggemar Coldplay Di Media Sosial Twitter Menggunakan Metode Naïve Bayes,” JATI J. Mhs. Tek. Inform., vol. 8, no. 3, pp. 4150-4159, Jun. 2024, doi:https://doi.org/10.36040/jati.v8i3.9827

V. R. Prasetyo et al., “Analisis Sentimen Dan Kategorisasi Review Pelanggan Pada Cafe Kopi Paste Dengan Metode Naïve Bayes Dan K-Nearest Neighbor Sentiment Analysis and Categorization of Customer Reviews on Kopi Paste Cafe Using Naïve Bayes and K-Nearest Neighbor Methods,” J. Ilm. NERO, vol. 8, no. 1, p. 2023, 2023. https://doi.org/10.21107/nero.v8i1.18465

Q. A. Xu, V. Chang, and C. Jayne, “A systematic review of social media-based sentiment analysis: Emerging trends and challenges,” Decis. Anal. J., vol. 3, no. May, p. 100073, 2022, doi: https://doi.org/10.1016/j.dajour.2022.100073

A. Cahya Kamilla, N. Priyani, R. Priskila, and V. Handrianus Pranatawijaya, “Analisis Sentimen Film Agak Laen Dengan Kecerdasan Buatan: Text Mining Metode Naïve Bayes Classifier,” JATI J. Mhs. Tek. Inform., vol. 8, no. 3, pp. 2923-2928, 2024, doi: https://doi.org/10.36040/jati.v8i3.9587

C. M. Bishop, Pattern Recognition and Machine Learning. New York, NY, USA: Springer, 2006. https://doi.org/10.1007/978-1-4615-7566-5

P.-N. Tan, A. Karpatne, M. Steinbach, and V. Kumar, Introduction to Data Mining Global Edition. Pearson Deutschland, 2019. [Online]. Available: https://elibrary.pearson.de/book/99.150005/9780273775324

C. Fan, M. Chen, X. Wang, J. Wang, and B. Huang, “A Review on Data Preprocessing Techniques Toward Efficient and Reliable Knowledge Discovery From Building Operational Data,” Front. Energy Res., vol. 9, no. March, pp. 1-17, 2021, doi: https://doi.org/10.3389/fenrg.2021.652801

A. E. Hassanien and A. Darwish, Machine Learning and Big Data Analytics Paradigms: Analysis, Applications and Challenges. 2021. doi: https://doi.org/10.1007/978-3-030-59338-4

J. R. Jim, M. A. R. Talukder, P. Malakar, M. M. Kabir, K. Nur, and M. F. Mridha, “Recent advancements and challenges of NLP-based sentiment analysis: A state-of-the-art review,” Nat. Lang. Process. J., vol. 6, no. February, p. 100059, 2024, doi: https://doi.org/10.1016/j.nlp.2024.100059

J. Tao and X. Fang, “Toward multi-label sentiment analysis: a transfer learning based approach,” J. Big Data, vol. 7, no. 1, pp. 1-26, 2020, doi: https://doi.org/10.1186/s40537-019-0278-0

D. Jurafsky and J. H. Martin, “Naïve Bayes, Text Classification, and Sentiment,” in Speech and Language Processing, 2024, ch. CHAPTER 4.

P. Nandwani and R. Verma, “A review on sentiment analysis and emotion detection from text,” Soc. Netw. Anal. Min., vol. 11, no. 1, pp. 1-19, 2021, doi: https://doi.org/10.1007/s13278-021-00776-6

I. E. Syahputra, T. Tulus, and S. Efendi, “Indonesian Text Dataset for Determining Sentiment Classification Using Mechine Learning Approach,” J. Inform. Telecommun. Eng., vol. 3, no. 2, pp. 192-201, 2020, doi: https://doi.org/10.31289/jite.v3i2.3153

S. Iyengar and S. J. Westwood, “Fear and Loathing across Party Lines: New Evidence on Group Polarization,” Am. J. Polit. Sci., vol. 59, no. 3, pp. 690-707, 2015. https://doi.org/10.1111/ajps.12152

Y. Kim, “The contribution of social network sites to exposure to political difference: The relationships among SNSs, online political messaging, and exposure to cross-cutting perspectives,” Comput. Hum. Behav., vol. 27, no. 2, pp. 971-977, 2011, doi: https://doi.org/10.1016/j.chb.2010.12.001




DOI: https://doi.org/10.21107/nero.v10i1.28701

Refbacks

  • There are currently no refbacks.


Copyright (c) 2025 Adhika Pramita Widyassari, Dea Salsabilla, M. Ali Amrozi