{'fraction_non_alphanumeric': 0.020515826494724502, 'fraction_numerical': 0.005861664712778429, 'mean_word_length': 5.252747252747253, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimization of Sentiment Analysis using Naive Bayes with Features Selection Chi-Square and Information Gain for Accuracy Improvement

Freedom of expression on social media is something that really challenging nowadays, where Twitter become one of the favorite social media platforms in Indonesia. There are many challenges that must be faced on this platform such as offensive language and hate speech from social media users. Based on Indonesian law, cyberbullying is a crime that violates the Law Electronic Information and Transactions (UU ITE). Therefore, the purpose of this study is to conduct a sentiment analysis that can classify sentiment tweets that have elements of cyberbullying. There are several challenges in the sentiment analysis study, such as polarity shift, binary classification, data sparsity, and accuracy. The focus of this research is to conduct experimental research on the performance of Naive Bayes methods in order to improve the accuracy of sentiment analysis. There are three methods that have been used in this study, they are original Naive Bayes without features selection, the combination of Naive Bayes and feature selection Chi-Square, and the combination of Naive Bayes and Information Gain. The results obtained in this research, that the accuracy of the Naive Bayes without feature selection obtained 85.6% accuracy, a combination of Naive Bayes and Chi-Square obtained 89.6% accuracy, and a combination Naive Bayes and Information Gain obtained 88.6% accuracy. It can be concluded, the Naive Bayes method combined with feature selection success improved the accuracy of the sentiment analysis by about 4 % from the original Naive Bayes without features selection.