Public Response to the Legalization of The Criminal Code Bill with Twitter Data Sentiment Analysis

Deny Irawan, Dana Indra Sensuse, Prasetyo Adi Wibowo Putro, Aji Prasetyo

Research output: Contribution to journalArticlepeer-review

2 Citations (Scopus)


The Criminal Code Bill, also known as Rancangan Kitab Undang-undang Hukum Pidana (RKUHP), passed in the House of Representatives (DPR) on December 6, 2022, is being debated because several issues need to be fixed. Therefore, research was conducted to determine the public's reaction to the ratification of the Criminal Code Bill by analyzing Twitter data. This study aims to obtain a general response to the legalized RKUHP. We use sentiment analysis, a text-processing method, to get data from the public. To do this, we used N-grams (unigrams, bigrams, and trigrams) along with three algorithms: Naïve Bayes, Classification and Regression Tree (CART), and Support Vector Machine (SVM). The result of sentiment analysis found that 51% of tweets were positive about the ratification of the RKUHP, and 49% were negative. In addition, it was also found that SVM has the best accuracy compared to other algorithms, with an accuracy value of 0.81 on the unigram combination.

Original languageEnglish
Pages (from-to)295-303
Number of pages9
JournalInternational Journal of Advanced Computer Science and Applications
Issue number2
Publication statusPublished - 2023


  • classification and regression tree (CART)
  • Naïve Bayes
  • Sentiment analysis
  • support vector Machine (SVM)


Dive into the research topics of 'Public Response to the Legalization of The Criminal Code Bill with Twitter Data Sentiment Analysis'. Together they form a unique fingerprint.

Cite this