Identification of offensive language in Urdu using semantic and embedding models
Open Access
- 12 December 2022
- journal article
- research article
- Published by PeerJ in PeerJ Computer Science
- Vol. 8, e1169
Abstract
Automatic identification of offensive/abusive language is very necessary to get rid of unwanted behavior. However, it is more challenging to generalize the solution due to the different grammatical structures and vocabulary of each language. Most of the prior work targeted western languages, however, one study targeted a low-resource language (Urdu). The prior study used basic linguistic features and a small dataset. This study designed a new dataset (collected from popular Pakistani Facebook pages) containing 7,500 posts for offensive language detection in Urdu. The proposed methodology used four types of feature engineering models: three are frequency-based and the fourth one is the embedding model. Frequency-based are either determined by the term frequency-inverse document frequency (TF-IDF) or bag-of-words or word n-gram feature vectors. The fourth is generated by the word2vec model, trained on the Urdu embeddings using a corpus of 196,226 Facebook posts. The experiments demonstrate that the stacking-based ensemble model with word2vec shows the best performance as a standalone model by achieving 88.27% accuracy. In addition, the wrapper-based feature selection method further improves performance. The hybrid combination of TF-IDF, bag-of-words, and word2vec feature models achieved 90% accuracy and 97% AUC. In addition, it outperformed the baseline with an improvement of 3.55% in accuracy, 3.68% in the recall, 3.60% in f1-measure, 3.67% in precision, and 2.71% in AUC. The findings of this research provide practical implications for commercial applications and future research.Keywords
This publication has 22 references indexed in Scilit:
- A Lexicon-based Approach for Hate Speech DetectionInternational Journal of Multimedia and Ubiquitous Engineering, 2015
- Cursing in English on twitter2014
- Improving Cyberbullying Detection with User Context2013
- Lexical Bundles in Discourse Structure: A Corpus-Based Study of Classroom DiscourseApplied Linguistics, 2012
- Using Machine Learning to Detect Cyberbullying2011
- Impoliteness2011
- Understanding bag-of-words model: a statistical frameworkInternational Journal of Machine Learning and Cybernetics, 2010
- Offensive Language Detection Using Multi-level Classification2010
- A novel approach for ranking spelling error corrections for UrduLanguage Resources and Evaluation, 2007
- An information-theoretic perspective of tf–idf measuresInformation Processing & Management, 2003