Sentiment Analysis of Covid-19 Bansos Issues on Twitter using Chi-Square and Naïve Bayes


  • Muhammad Fikri Hidayattullah Politeknik Harapan Bersama




Sentiment Analysis, Bansos, Covid, Naive Bayes, Chi-Square

Dimension Badge Record


Social assistance or what is often called Bansos (Bantuan Sosial) is assistance in the form of goods or money from the government for the community that is temporary and selective. There were many reports from the public complaining that some had not received assistance or had not received it at all. This problematic social assistance has caused a stir in public reports on various social media, including Twitter. To find out the classification of public opinion related to social assistance on Twitter, it is necessary to do pre-processing and analysis of tweets. The dataset used is data crawled using the Twitter API and produces 702 tweet data in CSV format. Tweets retrieved based on the keyword 'bansos' in August 2021. The dataset is divided into two categories, positive and negative. Data with a total of 328 positive categories and 374 data of negative categories. The method applied in this study uses the Chi-Square feature selection method and the Naïve Bayes Classifier algorithm. The purpose of this research is to produce a website-based application that can classify tweets related to social assistance covid-19 into 2 categories, positive and negative by using the Chi-Square feature selection and the Naïve Bayes Classifier algorithm. The F1 score in the positive class is 85% and the negative class is 89% and produces an accuracy value of 87%. The results of the comparison between Naive Bayes and Naive Bayes using Chi-Square show that there is no difference in accuracy.


Download data is not yet available.

Author Biography

Muhammad Fikri Hidayattullah, Politeknik Harapan Bersama



Google Scholar Cite Analysis
Abstract viewed = 81 times


Bahassine, S., Madani, A., Al-Sarem, M., & Kissi, M. (2020). Feature selection using an improved Chi-square for Arabic text classification. Journal of King Saud University - Computer and Information Sciences, 32(2), 225–231.

Chen, S., Webb, G. I., Liu, L., & Ma, X. (2020). A novel selective naïve Bayes algorithm. Knowledge-Based Systems, 192(xxxx), 105361.

Fitri, V. A., Andreswari, R., & Hasibuan, M. A. (2019). 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 Computer Science, 161, 765–772.

Fitria, F. N., Wijaya, S. R., & Abhipraya, F. arta. (2021). Efektivitas Penyaluran Bantuan Sosial dari Pemerintah untuk Disalurkan Kepada Masyarakat Terdampak Pandemi Covid-19 di Kabupaten Ponorogo Tahun 2020. Ilmu Politik Dan Ilmu Komunikasi, 6(1), 40–50. Retrieved from

Fitriana, F., Utami, E., & Al Fatta, H. (2021). Analisis Sentimen Opini Terhadap Vaksin Covid - 19 pada Media Sosial Twitter Menggunakan Support Vector Machine dan Naive Bayes. Jurnal Komtika (Komputasi Dan Informatika), 5(1), 19–25.

Isnain, A. R., Marga, N. S., & Alita, D. (2021). Sentiment Analysis Of Government Policy On Corona Case Using Naive Bayes Algorithm. IJCCS (Indonesian Journal of Computing and Cybernetics Systems), 15(1), 55.

Kolluri, J., & Razia, S. (2020). WITHDRAWN: Text classification using Naïve Bayes classifier. Materials Today: Proceedings, (xxxx).

Launa, & Lusianawati, H. (2021). Potensi Korupsi Dana Bansos di Masa Pandemi Covid-19. Majalah Semi Ilmiah Populer Komunikasi Massa, 2, 1–22.

Mufida, A. (2020). Polemik Pemberian Bantuan Sosial Di Tengah Pandemic Covid 19 | Mufida | ADALAH, 4, 159–166. Retrieved from

Nurwahyuni, S. (2019). Analisis Sentimen Aplikasi Transportasi Online KRL Access Menggunakan Metode Naive Bayes. Swabumi, 7(1), 31–38.

Paudel, S., Prasad, P. W. C., Alsadoon, A., Islam, M. R., & Elchouemi, A. (2019). Feature selection approach for twitter sentiment analysis and text classification based on chi-square and naïve bayes. Advances in Intelligent Systems and Computing, 842, 281–298.

Ratnawati, F. (2018). Implementasi Algoritma Naive Bayes Terhadap Analisis Sentimen Opini Film Pada Twitter. INOVTEK Polbeng - Seri Informatika, 3(1), 50.

Ruspiantoko, D., Fitriyani, L., & Kholidah, A. (2021). Analisis Framing Tentang Kasus Tersangka Korupsi Dana Bansos Covid-19 Juliari Peter Batubara Di Tempo. Jurnal Pendidikan Ilmu Pengetahuan Sosial (JPIPS), 1(13), 1–7. Retrieved from

Singh, J., Bagga, S., & Kaur, R. (2020). Software-based Prediction of Liver Disease with Feature Selection and Classification Techniques. Procedia Computer Science, 167(2019), 1970–1980.

Wickramasinghe, I., & Kalutarage, H. (2021). Naive Bayes: applications, variations and vulnerabilities: a review of literature with code snippets for implementation. Soft Computing, 25(3), 2277–2293.

Wongkar, M., & Angdresey, A. (2019). Sentiment Analysis Using Naive Bayes Algorithm Of The Data Crawler: Twitter. Proceedings of 2019 4th International Conference on Informatics and Computing, ICIC 2019, 1–5.



Submitted Date: 2023-07-23
Accepted Date: 2023-07-24
Published Date: 2023-07-26

How to Cite

Hidayattullah, M. F. . (2023). Sentiment Analysis of Covid-19 Bansos Issues on Twitter using Chi-Square and Naïve Bayes. Journal of Computer Networks, Architecture and High Performance Computing, 5(2), 571-578.