Abstract
The tremendous rise in social media usage over the past ten years has resulted in an extraordinary spike in hate speech activities in West Africa. Because of this, her unity is constantly in peril. This study combines relevant natural language processing techniques and machine learning classifiers to create a hate speech detection model using hate speech from West African countries, including Pidgin English, on Twitter, now ‘X’. The data was pre-processed using word embedding, CountVectorizer, and Term Frequency-Inverse Document Frequency (Tf-Idf) to extract useful characteristics from the cleaned dataset. Five machine learning classifiers were used to train the dataset, these include Logistic Regression (LR), Naïve Bayes (NB), Extreme Gradient Boost (XGBoost), Deep Neural Network (DNN), and Bidirectional Long and Short-Term Memory (Bi-LSTM). The Bi-LSTM fitted on Global Vectors (GloVe) embedding produced the best experiment results, with an accuracy of 92% and an F1-Score of 83% when assessed on a test set. The machine learning models generally demonstrated strong performance on test data, suggesting that they had internalised the knowledge from the training set and could use it to analyse new data.
Copyright of the paper named above is hereby assigned and transferred to the Arid Zone Journal of Engineering, Technology and Environment published by University of Maiduguri, Nigeria.