Information Technology for Identifying Hate Speech in Online Communication Based on Machine Learning
摘要
Proposed in this paper information technology for identifying hate speech in online communication via machine learning methods is realized through the next steps: collecting data from reliable sources and forming datasets, data preprocessing (noise removal, text normalization, stop words removal, tokenization), labeling and data marking (hate, offensive or no hate), extracting significant linguistic features (using Bag-of-Words, TF-IDF, Word2Vec, GloVe, BERT), machine learning method choice, model realization, study and training of the model, estimation of classifier model accuracy. The basis of the considered model is implementation of the data cleaning, dataset partitioning, model training, fasttext using and prognostication. Machine learning method is selected taking into account its suitability for the tasks of text classification into categories of hate and hate speech and the previous efficiency evaluations. Different classifiers from the set of options as KNN (K-Nearest Neighbors), Naive Bayes, Decision Tree, Logistic Regression and Random Forest are estimated. According to metrics Accuracy KNN classifier achieves the accuracy of hate identification 0.832, Naive Bayes 0.315, Decision Tree 0.878, Logistic Regression 0.904 and Random Forest 0.879. According to metrics ROC AUC (Receiver Operating Characteristic Area Under the Curve) KNN classifier achieves performance of hate identification 0.82, Naive Bayes 0.61, Decision Tree 0.80, Logistic Regression 0.92 and Random Forest 0.89. Overall, random forest and logistic regression stand out as the most effective classifiers due to their high values of ROC AUC for all classes and general AUC. Decision Tree and KNN also demonstrate sufficient performance, whereas Naive Bayes lags behind other classifiers in terms of discriminative power and overall classification performance.