Sentiment Analysis and Emotional Reviews of Hospital Services Using Naïve Bayes and Support Vector Machine (SVM)

Authors

  • Muhammad Rio Lintang Cahya
  • Erwin Yudi Hidayat

DOI:

https://doi.org/10.25139/inform.v11i1.11257

Keywords:

Sentiment Analysis, Emotion Review, SVM, Naïve Bayes, Hospital Service

Abstract

Hospitals are crucial healthcare institutions that play a vital role in providing medical services to the community. Patient perceptions and experiences regarding hospital services are often reflected in reviews left on digital platforms such as Google Maps. This study aims to analyze public sentiment and emotions toward hospital services in Semarang City using Google Maps user reviews. A total of 16,364 reviews from 21 hospitals were collected between 2023 and 2024. Sentiment labelling was performed using a lexicon-based approach to classify reviews into positive, negative, and neutral categories. To explore the emotions expressed in the reviews, the NRC Emotion Lexicon (EmoLex) was used to identify eight basic emotions. The analysis revealed that 'Trust' was the most dominant emotion (7,090 words), indicating high patient confidence, followed by 'Joy'. Furthermore, for predictive modelling using Naïve Bayes and Support Vector Machine (SVM) algorithms, SVM achieved 90% accuracy, whereas Naïve Bayes achieved only 78%. The results of this analysis are expected to serve as input for hospitals to improve service quality and as a reference for prospective patients in selecting a hospital.

References

U. K. Nisak and Cholifah, “Buku Ajar Statistik Di Fasilitas Pelayanan Kesehatan,” UMSIDA Press, pp. 1–107, 2020, Accessed: Jan. 03, 2026, doi:10.21070/2020/978-623-6833-94-0

Kemenkes, “Peraturan Menteri Kesehatan Republik Indonesia,” 2020.

J. D. C. Aruan, B. Rahayudi, and A. Ridok, “Analisis Sentimen Opini Masyarakat terhadap Pelayanan Rumah Sakit Umum Daerah menggunakan Metode Support Vector Machine dan Term Frequency-Inverse Document Frequency,” Jurnal Pengembangan Teknologi Informasi Dan Ilmu Komputer, vol. 6, no. 5, pp. 2072–2078, 2022.

Y. Soumokil, M. Syafar, and A. Yusuf, “Analisis Kepuasan Pasien Di Rumah Sakit Umum Daerah Piru,” Jurnal Ilmiah Kesehatan Sandi Husada, vol. 10, no. 2, pp. 543–551, 2021, doi: 10.35816/jiskh.v10i2.645.

M. Isnan, G. N. Elwirehardja, and B. Pardamean, “Sentiment Analysis for TikTok Review Using VADER Sentiment and SVM Model,” Procedia Comput. Sci., vol. 227, pp. 168–175, 2023, doi: 10.1016/j.procs.2023.10.514.

I. H. Kusuma and N. Cahyono, “Analisis Sentimen Masyarakat Terhadap Penggunaan E-Commerce Menggunakan Algoritma K-Nearest Neighbor,” Jurnal Informatika: Jurnal Pengembangan IT (JPIT), vol. 8, no. 3, 2023.

A. S. Aribowo and S. Khomsah, “Implementation Of Text Mining For Emotion Detection Using The Lexicon Method (Case Study: Tweets About Covid-19) Implementasi Text Mining Untuk Deteksi Emosi Menggunakan Metode Leksikon (Studi Kasus: Twit Tentang Covid-19),” Jurnal Informatika dan Teknologi Informasi, vol. 18, no. 1, pp. 49–60, 2021, doi: 10.31515/telematika.v18i1.4341.

J. Supriyanto, D. Alita, and A. R. Isnain, “Penerapan Algoritma K-Nearest Neighbor (K-NN) Untuk Analisis Sentimen Publik Terhadap Pembelajaran Daring,” Jurnal Informatika dan Rekayasa Perangkat Lunak, vol. 4, no. 1, pp. 74–80, Mar. 2023, doi: 10.33365/jatika.v4i1.2468.

A. R. Kardian and D. Gustiana, “Analisis Sentimen Berdasarkan Opini Pengguna pada Media Twitter Terhadap BPJS Menggunakan Metode Lexicon Based dan Naïve Bayes Classifier,” Jurnal Ilmiah Komputasi, vol. 20, no. 1, Mar. 2021, doi: 10.32409/jikstik.20.1.401.

A. Nugraha, “Analisis Sentimen dalam Text Mining: Memahami Emosi Melalui Bahasa,” Teknologipintar.org, vol. 3, no. 12, 2023.

S. Rohimah, M. Afdal, M. Mustakim, and R. Novita, “Analisis Sentimen Traveloka Berdasarkan Ulasan Google Play Store Menggunakan Algoritma Support Vector Machine dan Random Forest,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 3, pp. 1709–1716, Dec. 2024, doi: 10.47065/bits.v6i3.6300.

D. R. Andriyani, M. Afdal, and S. Monalisa, “Analisis Sentimen Masyarakat Terhadap Penghapusan Honorer Berdasarkan Opini Dari Twitter Menggunakan Naïve Bayes Classifier,” Building of Informatics, Technology and Science (BITS), vol. 5, no. 1, Jun. 2023, doi: 10.47065/bits.v5i1.3541.

M. A. Rani and N. Hendrastuty, “Perbandingan Algoritma NBC Dan SVM Untuk Melakukan Analisis Sentimen Terhadap PP NO.82 Tahun 2021,” Technology and Science (BITS), vol. 6, no. 4, 2025, doi: 10.47065/bits.v6i4.6496.

A. E. Perkasa and A. N. Putri, “Penerapan Naïve Bayes Untuk Analisis Sentimen Pada Ulasan Aplikasi Mobile Legends,” Technology and Science (BITS), vol. 6, no. 4, 2025, doi: 10.47065/bits.v6i4.6507.

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,” Technology and Science (BITS), vol. 6, no. 4, pp. 2240–2250, 2025, doi: 10.47065/bits.v6i4.6534.

T. H. J. Hidayat, Y. Ruldeviyani, A. R. Aditama, G. R. Madya, A. W. Nugraha, and M. W. Adisaputra, “Sentiment analysis of twitter data related to Rinca Island development using Doc2Vec and SVM and logistic regression as classifier,” in Procedia Computer Science, Elsevier B.V., 2021, pp. 660–667. doi: 10.1016/j.procs.2021.12.187.

S. Hidayatulloh, L. Muflikhah, and R. S. Perdana, “Implementasi Embedding IndoBERT dan Support Vector Machine (SVM) Untuk Analisis Sentimen Publik terhadap Layanan Biznet,” Jurnal Pengembangan Teknologi Informasi Dan Ilmu Komputer, vol. 9, no. 9, pp. 2548–964, Sep. 2025.

D. C. Rahmadani, S. Khomsah, and M. Y. Fathoni, “Analisis Emosi Wisatawan Menggunakan Metode Lexicon Text Analysis,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 10, no. 1, May 2024, doi: 10.28932/jutisi.v10i1.6690.

T. C. M. Yunanda, M. Hanafi, and W. M. P. Dhuhita, “Sentiment Analysis on TikTok Shop Reviews Using Long Short-Term Memory Method to Find Business Opportunity,” Inform : Jurnal Ilmiah Bidang Teknologi Informasi dan Komunikasi, vol. 9, no. 1, pp. 1–7, Sep. 2023, doi: 10.25139/inform.v9i1.6524.

C. M. Tri Yunanda, M. Hanafi, and W. M. Pradnya Dhuhita, “Sentiment Analysis on TikTok Shop Reviews Using Long Short-Term Memory Method to Find Business Opportunity,” Inform : Jurnal Ilmiah Bidang Teknologi Informasi dan Komunikasi, vol. 9, no. 1, pp. 1–7, Sep. 2023, doi: 10.25139/inform.v9i1.6524.

N. V. Pusean, N. Charibaldi, and B. Santosa, “Comparison of Scenario Pre-processing Performance on Support Vector Machine and Naïve Bayes Algorithms for Sentiment Analysis,” Inform : Jurnal Ilmiah Bidang Teknologi Informasi dan Komunikasi, vol. 8, no. 1, pp. 57–63, Jan. 2023, doi: 10.25139/inform.v8i1.5667.

M. Gultom, J. Marikros, and W. Rusli, “Penerapan Vader Sentiment untuk Mendeteksi Sentimen Bahasa Inggris berbasis Website,” SEMINAR NASIONAL CORISINDO, pp. 13–18, Aug. 2024.

W. G. Irngamsyah, R. Helilintar, and L. Sinta Wahyuniar, “Deteksi Emosi Masyarakat Tentang Penyakit Gagal Ginjal Akut Dengan Metode Emolex Dan Logistic Regression,” Prosiding SEMNAS INOTEK (Seminar Nasional Inovasi Teknologi), vol. 9, pp. 2549–7952, 2025.

L. Cahyaningrum, A. Luthfiarta, and M. Rahayu, “Sentiment Analysis on the Impact of MBKM on Student Organizations Using Supervised Learning with Smote to Handle Data Imbalance,” Inform : Jurnal Ilmiah Bidang Teknologi Informasi dan Komunikasi, vol. 9, no. 1, pp. 58–66, Jan. 2024, doi: 10.25139/inform.v9i1.7484.

R. L. Mulianingrum and E. Y. Hidayat, “Comparative Performance of SVM and BERT-Base Using Hybrid Pre-processing for Fast Fashion Sentiment Analysis,” Journal of Applied Informatics and Computing (JAIC), vol. 9, no. 6, pp. 3464–3478, 2025.

N. Z. B. Jannah and K. Kusnawi, “Comparison of Naïve Bayes and SVM in Sentiment Analysis of Product Reviews on Marketplaces,” Sinkron, vol. 8, no. 2, pp. 727–733, Mar. 2024, doi: 10.33395/sinkron.v8i2.13559.

A. G. Ghifari, G. Y. Ananada, and K. Purwandari, “A Comparative Sentiment Analysis of Public Opinion on Indonesia’s National Football Coach Using CRNN and SVM,” Procedia Comput. Sci., vol. 269, pp. 1485–1493, 2025, doi: 10.1016/j.procs.2025.09.090.

D. Wang and Y. Zhao, “Using News to Predict Investor Sentiment: Based on SVM Model,” in Procedia Computer Science, Elsevier B.V., 2020, pp. 191–199. doi: 10.1016/j.procs.2020.06.074.

M. R. Rahman, A. F. Diansyah, and Hanafi, “Sentiment Analysis on the Shopee Application on Playstore Using the Random Forest Classification Method,” Inform : Jurnal Ilmiah Bidang Teknologi Informasi dan Komunikasi, vol. 9, no. 1, pp. 20–24, Nov. 2023, doi: 10.25139/inform.v9i1.5465.

D. Al Akhdaan, Taufik Edy Sutanto, and Muhaza Liebenlito, “Confident Learning pada IndoBERT: Peningkatan Kinerja Klasifikasi Sentimen,” The Indonesian Journal of Computer Science, vol. 13, no. 5, Oct. 2024, doi: 10.33022/ijcs.v13i5.4401.

S. Khomsah, R. Dias Ramadhani, and S. Wijayanto, “Big Data Analytics to Analyze Sentiment, Emotions, and Perceptions of Travelers (Case Study: Tourism Destination in Purwokerto Indonesia),” Jurnal E-Komtek (Elektro-Komputer-Teknik), vol. 5, no. 2, pp. 284–297, Dec. 2021, doi: 10.37339/e-komtek.v5i2.791.

N. Charibaldi, A. Harfiani, and O. Samuel Simanjuntak, “Comparison of the Effect of Word Normalization on Naïve Bayes Classifier and K-Nearest Neighbor Methods for Sentiment Analysis,” Inform : Jurnal Ilmiah Bidang Teknologi Informasi dan Komunikasi, vol. 9, no. 1, pp. 25–31, Dec. 2023, doi: 10.25139/inform.v9i1.7111.

M. Dewi et al., “Penerapan SMOTE-NCL untuk Mengatasi Ketidakseimbangan Kelas pada Klasifikasi Penyakit Jantung Koroner,” JIP (Jurnal Informatika Polinema), vol. 10, no. 1, 2023.

Downloads

Published

2026-02-03

How to Cite

Rio Lintang Cahya, M. ., & Yudi Hidayat, E. . (2026). Sentiment Analysis and Emotional Reviews of Hospital Services Using Naïve Bayes and Support Vector Machine (SVM). Inform : Jurnal Ilmiah Bidang Teknologi Informasi Dan Komunikasi, 11(1), 121–129. https://doi.org/10.25139/inform.v11i1.11257

Issue

Section

Articles