Classification of Abusive Comments Using Various Machine Learning Algorithms

  • C. P. ChandrikaEmail author
  • Jagadish S. Kallimani
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 1040)


In the past decade, we have seen an increasing surge in the popularity of social networking sites, with Twitter and Facebook being some of the most popular ones. These sites allow you to share your expressions and views. However, as of now, there is no particular restriction applied by them to control the kind of content that is being uploaded. These uploaded contents may have obnoxious words, explicit images which may be unsuitable for social platforms. There is no predefined method for restricting unpleasant texts from publishing on social sites. To solve this problem, we propose a method that can aid human moderators as well as work independently. In this approach, logistic regression, multinomial Naïve Bayes, and random forest techniques are used to extract features like term frequency–inverse document frequency features, text features, and frequency features of the comments, respectively, to obtain a weak prediction model. Gradient boosting is applied to this model to obtain the final prediction model. We also applied a neural network using bidirectional long short-term memory and compared the accuracy rate of the two models. We believe that these models can help human moderators on various online platforms to filter out abusive comments.


Logistic regression Multinomial Naïve Bayes Random forest Gradient descent rule Long short-term memory 


  1. 1.
    Balci, K., Salah, A.A.: Automatic analysis and identification of verbal aggression and abusive behaviors for online social games. Comput. Human Behav. 53, 517–526 (2015)CrossRefGoogle Scholar
  2. 2.
    Chavan, V.S., Shylaja, S.S.: Machine learning approach for detection of cyber-aggressive comments by peers on social media network. In: International Conference on Advances in Computing, Communications and Informatics, pp. 2354–2358 (2015)Google Scholar
  3. 3.
    Djuric, N., Zhou, J., Morris, R., Grbovic, M., Radosavljevic, V., Bhamidipati, N.: Hate speech detection with comment embeddings. In: 24th International Conference on WWW ’15, vol. 9, pp. 29–30 (2015)Google Scholar
  4. 4.
    Yadav, S.H., Manwatkar, P.M.: An approach for offensive text detection and prevention in social networks. In: International Conference on Innovations in Information, Embedded and Communication Systems, pp. 1–4 (2015)Google Scholar
  5. 5.
    Al-garadi, M.A., Varathan, K.D., Ravana, S.D.: Cybercrime detection in online communications: the experimental case of cyberbullying detection in the twitter network. Comput. Human Behav. 63, 433–443 (2016)CrossRefGoogle Scholar
  6. 6.
    Wulczyn, E., Thain, N., Dixon, L.: Ex machina: personal attacks seen at scale. In: Proceedings of 26th International Conference on World Wide Web—WWW ’17, pp. 1391–1399 (2016)Google Scholar
  7. 7.
    Nobata, C., Tetreault, J., Thomas, A., Mehdad, Y., Chang, Y.: Abusive language detection in online user content. In: 25th International Conference on World Wide Web—WWW ’16, pp. 145–153 (2016)Google Scholar
  8. 8.
    Chatzakou, D., Kourtellis, N., Blackburn, J., De Cristofaro, E., Stringhini, G., Vakali, A.: Mean birds: detecting aggression and bullying on twitter. In: Proceedings of ACM Web Science Conference—WebSci ’17, pp. 13–22 (2017)Google Scholar
  9. 9.
    Park, J.H., Fung, P.: One-step and two-step classification for abusive language detection on twitter. In: Proceedings of First Workshop on Abusive Language, pp. 41–45 (2017)Google Scholar
  10. 10.
    Bourgonje, P., Moreno-Schneider, J., Srivastava, A., Rehm, G.: Automatic classification of abusive language and personal attacks in various forms of online communication. In: LNAI, vol. 10713, pp. 180–191 (2018)Google Scholar
  11. 11.
    Yadav, S.H., Manwatkar, P.M.: An approach for offensive text detection and prevention in social networks. ICIIECS, pp. 1–4 (2015)Google Scholar

Copyright information

© Springer Nature Singapore Pte Ltd. 2020

Authors and Affiliations

  1. 1.Department of Computer Science and EngineeringM. S. Ramaiah Institute of TechnologyBangaloreIndia

Personalised recommendations