Analisis Sentimen Pengguna X terhadap Kasus Korupsi Gula Tom Lembong Menggunakan Naïve Bayes, SVM, dan Random Forest
Abstract
The alleged sugar import corruption case involving Tom Lembong has become one of the most widely discussed public issues on social media, generating diverse reactions. This phenomenon illustrates how public opinion on legal issues is often influenced by perceptions of the public figures involved. This study aims to analyze public sentiment regarding the case on the social media platform X (formerly Twitter). The dataset consists of 1,802 tweets collected through a crawling process using the X API with the keyword “Tom Lembong.” The research stages include data cleaning, case folding, text normalization, tokenizing, stopword removal, stemming, sentiment labeling using a lexicon-based approach, and feature extraction with the Term Frequency–Inverse Document Frequency (TF-IDF) method. The prepared dataset was then tested using three classification algorithms: Naïve Bayes, Support Vector Machine (SVM), and Random Forest. The results show that the SVM algorithm achieved the highest accuracy (84%), followed by Random Forest (80%) and Naïve Bayes (76%). Based on the sentiment labeling results, positive sentiment dominated with 61%, while negative sentiment accounted for 39%. Although the analyzed issue concerns an alleged corruption case, the dominance of positive sentiment indicates that public opinion tends to focus on Tom Lembong’s personal image or public track record, which is viewed positively rather than on the substance of the legal allegations. These findings demonstrate the effectiveness of the SVM algorithm in analyzing high-dimensional text and provide insights into how public perception of legal issues can be influenced by image factors and the socio-political context on social media.
Downloads
References
M. Rizki, “Tom Lembong Didakwa Rugikan Negara Rp578 Miliar di Kasus Dugaan Korupsi Importasi Gula,” hukumonline.com. [Online]. Available: https://www.hukumonline.com/berita/a/tom-lembong-didakwa-rugikan-negara-rp578-miliar-di-kasus-dugaan-korupsi-importasi-gula-lt67c96d4063fde/
Rizky, “Jaksa Sebut Rp578 Miliar, Hakim Putuskan Hanya Rp194 Miliar, Vonis Tom Lembong Bikin Geger,” tempo.co. [Online]. Available: https://www.tempo.co/hukum/vonis-tom-lembong-4-5-tahun-penjara-angka-kerugian-negara-versi-hakim-dan-jaksa-berbeda-2048843
A. Sadat, “Akademisi Kritik Hitungan Kerugian Negara dalam Kasus Impor Gula Tom Lembong,” viva.co.id. [Online]. Available: https://www.viva.co.id/berita/nasional/1834004-akademisi-kritik-hitungan-kerugian-negara-dalam-kasus-impor-gula-tom-lembong
S. Ni’am and N. Akbar, “Divonis 4,5 Tahun Penjara, Hakim: Tom Lembong Tak Nikmati Hasil Divonis 4,5 Tahun Penjara, Hakim: Tom Lembong Tak Nikmati Hasil Korupsi,” kompas.com. [Online]. Available: https://nasional.kompas.com/read/2025/07/18/18462411/divonis-45-tahun-penjara-hakim-tom-lembong-tak-nikmati-hasil-korupsi
K. Pramayasa, I. Md, D. Maysanjaya, G. Ayu, and A. Diatri Indradewi, “Analisis Sentimen Program Mbkm Pada Media Sosial Twitter Menggunakan KNN Dan SMOTE,” Science and Information Technology (SINTECH), vol. 6, Aug. 2023, doi: https://doi.org/10.31598.
D. Prasetyoningrum and P. N. Andono, “Perbandingan Model Machine Learning dalam Analisis Sentimen Pada Kasus Monkeypox di Media Sosial X,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 3, pp. 2005–2014, Dec. 2024, doi: 10.47065/bits.v6i3.6447.
A. H. A. Zharifa and E. I. H. Ujianto, “Analisis Sentimen Publik di Twitter Pasca Debat Kelima Pilpres 2024 dengan Naive Bayes,” Edumatic: Jurnal Pendidikan Informatika, vol. 8, no. 2, pp. 754–763, Dec. 2024, doi: 10.29408/edumatic.v8i2.28048.
D. A. Fitri and D. Damayanti, “Komparasi Algoritma Random Forest Classifier Dan Support Vector Machine Untuk Sentimen Masyarakat Terhadap Pinjaman Online Di Media Sosial,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 9, no. 4, pp. 2018–2029, Nov. 2024, doi: 10.29100/jipi.v9i4.5608.
E. Triningsih, M. Afdal, I. Permana, and N. Evrilyan Rozanda, “Analisis Sentimen Terhadap Program Makan Bergizi Gratis Menggunakan Algoritma Machine Learning Pada Sosial Media X,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 4, pp. 2240–2250, Mar. 2025, doi: 10.47065/bits.v6i4.6534.
E. Danuarta and D. Alita, “Perbandingan Algoritma Naïve Bayes dan Random Forest untuk Melakukan Analisis Sentimen Cyberbullying Generasi Z Pada Twitter,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 4, Jul. 2025, doi: 10.47065/bits.v6i4.6909.
N. Shabrina Nasution, I. Permana, F. Nur Salisah, M. Afdal, and M. Megawati, “Analisis Sentimen Masyarakat Terhadap Kebijakan IKN Pada Periode Jokowi dan Prabowo Menggunakan Algoritma NBC, SVM, dan K-NN,” Building of Informatics, Technology and Science (BITS), vol. 7, no. 1, 2025, doi: 10.47065/bits.v7i1.7276.
M. Febrian As Shidiq, D. Alita, and L. Ratu Kec Kedaton Kota Bandar Lampung, “Analisis Sentimen Masyarakat Terhadap Kasus Judi Online Menggunakan Data dari Media Sosial X Pendekatan Naive Bayes Dan SVM,” Jurnal Sistem Informasi dan Informatika (Simika), vol. 8, no. 1, 2025, doi: 10.47080/simika.v8i1.3624.
A. Setiawan and R. R. Suryono, “Analisis Sentimen Ibu Kota Nusantara menggunakan Algoritma Support Vector Machine dan Naïve Bayes,” Edumatic: Jurnal Pendidikan Informatika, vol. 8, no. 1, pp. 183–192, Jun. 2024, doi: 10.29408/edumatic.v8i1.25667.
F. Arrazak, M. Afdal, R. Novita, and M. Megawati, “Analisis Sentimen Terhadap Pemain Naturalisasi dan Lokal Tim Nasional Sepakbola Indonesia Menggunakan Support Vector Machine,” Building of Informatics, Technology and Science (BITS), vol. 7, no. 2, Sep. 2025, doi: 10.47065/bits.v7i2.7471.
M. Daffa, A. Fahreza, A. Luthfiarta, M. Rafid, M. Indrawan, and A. Nugraha, “Analisis Sentimen: Pengaruh Jam Kerja Terhadap Kesehatan Mental Generasi Z,” Journal Of Applied Computer Science And Technology (JACOST), vol. 5, no. 1, pp. 2723–1453, 2024, doi: 10.52158/jacost.715.
E. Arya Pranata, F. Budiman, and D. Kurniawan, “Analisis Sentimen Ulasan Mobile JKN pada Playstore dengan Perbandingan Akurasi Algoritma Naïve Bayes dan SVM,” Building of Informatics, Technology and Science (BITS), vol. 7, no. 1, Jun. 2025, doi: 10.47065/bits.v7i1.7334.
N. Van Robert Jhosefhin et al., “Analisis Sentimen Crawling Data dari Sosial Media X tentang Gaza Menggunakan Metode SVM dan Decision Tree,” Jurnal Indonesia : Manajemen Informatika dan Komunikasi (JIMIK), vol. 6, no. 1, 2025, doi: 10.3587.
M. Irwanda, M. Afdal, R. Novita, and Z. Zarnelly, “Analisis Sentimen Masyarakat Terhadap Liga Indonesia Menggunakan Algoritma Naïve Bayes Classifier dan Support Vertor Machine Pada Platform X dan YouTube,” Building of Informatics, Technology and Science (BITS), vol. 7, no. 1, 2025, doi: 10.47065/bits.v7i1.7294.
E. Yuniar and N. Hendrastuty, “Perbandingan Metode Naive Bayes, Random Forest dan SVM Untuk Analisis Sentimen Pada Twitter Tentang Kenaikan Gaji Guru,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 4, Mar. 2025, doi: 10.47065/bits.v6i4.6970.
Z. Alfian, M. Afdal, R. Novita, and Z. Zarnelly, “Penerapan Support Vector Machine untuk Analisis Sentimen Pengguna X terhadap IndiHome, Biznet, dan Starlink,” Building of Informatics, Technology and Science (BITS), vol. 7, no. 2, Sep. 2025, doi: 10.47065/bits.v7i2.7429.
M. G. Andriawan and T. Ernawati, “Penggunaan Algoritma Naïve Bayes dan Support Vector Machine untuk Analisis Sentimen Konflik Palestina Dan Israel Pada Platform X,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 12, no. 3, Aug. 2024, doi: 10.23960/jitet.v12i3.4943.
A. Safira and F. N. Hasan, “Analisis Sentimen Masyarakat Terhadap Paylater Menggunakan Metode Naive Bayes Classifier,” Jurnal Sistem Informasi, vol. 5, no. 1, Jan. 2023, doi: 10.31849/zn.v5i1.12856.
J. Khatib Sulaiman, H. Margono, F. Nur Aprillia, and U. Airlangga, “Analisis Sentimen Komentar Childfree di Aplikasi X Menggunakan Naïve Bayes,” Indonesian Journal of Computer Science, vol. 13, no. 3, Apr. 2024, doi: 10.33022/ijcs.v13i3.3883.
N. Hadi and D. Sugiarto, “Analisis Sentimen Pembangunan IKN pada Media Sosial X Menggunakan Algoritma SVM, Logistic Regression dan Naïve Bayes,” Jurnal Informatika: Jurnal Pengembangan IT, vol. 10, no. 1, pp. 37–49, Jan. 2025, doi: 10.30591/jpit.v10i1.7106.
R. Raihandika and R. Suryono, “Perbandingan Algoritma Random Forest, KNN, SVM Untuk Analisis Sentimen Pengalaman Belanja ThriftDi X,” Building of Informatics, Technology and Science (BITS), vol. 6, No. 4, 2025, doi: 10.47065/bits.v6i4.6797.
G. P. Insany, I. L. Kharisma, and R. Rosmawati, “Penerapan Algoritma Random Forest untuk Menganalisis Ulasan Aplikasi Spotify pada Google Play,” Edumatic: Jurnal Pendidikan Informatika, vol. 8, no. 2, pp. 369–378, Dec. 2024, doi: 10.29408/edumatic.v8i2.26394.
E. Darwisah Harahap and R. Kurniawan, “Analisis Sentimen Komentar Terhadap Kebijakan Pemerintah Mengenai Tabungan Perumahan Rakyat (TAPERA) Pada Aplikasi X Menggunakan Metode Naïve Bayes,” Jurnal Teknik Informatika Unika ST. Thomas (JTIUST), vol. 9, no. 1, pp. 2657–1501, Jun. 2024, doi: 10.54367/jtiust.v9i1.3911.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Analisis Sentimen Pengguna X terhadap Kasus Korupsi Gula Tom Lembong Menggunakan Naïve Bayes, SVM, dan Random Forest
Pages: 1580-1591
Copyright (c) 2025 Aneira Vicentiya Kuncoro, Fikri Budiman, Defri Kurniawan

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).





















