Scientific Reports (Nov 2024)
Detection of hate: speech tweets based convolutional neural network and machine learning algorithms
Abstract
Abstract There is no doubt that social media sites have provided many benefits to humanity, such as sharing information continuously and communicating with others easily. It also seems that social media sites have many advantages, but in addition to these advantages, there are disadvantages that we always strive to find a solution. One of these disadvantages is sharing hate speech. In our study, we’re discussing a way to solve this phenomenon by using Term Frequency-Inverse Document Frequency (TF-IDF) based approach to feature engineering on eleven classifiers for machine and deep learning that can automatically identify hate speech. Three different databases were used, the first of which “Hate speech offensive tweets by Davidson et al.”, the second called "Twitter hate speech" and finally we merged the second data with (Cyberbullying dataset (toxicity_parsed_dataset)". The classifiers involved are Logistic Regression (LR), Naive Bayes (NB), Multi-layer Perceptron (MLP), and Support Vector Machine (SVM), Random Forest (RF), K-Nearest Neighbor (KNN), K-Means, Decision Tree (DT), Gradient Boosting classifier (GBC), and the Extra Trees (ET) in addition to the convolutional neural network (CNN). Maximum accuracy was attained, which exceeded 99%.