Identification of offensive language in Urdu using semantic and embedding models
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...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
PeerJ Inc.
2022-12-01
|
Series: | PeerJ Computer Science |
Subjects: | |
Online Access: | https://peerj.com/articles/cs-1169.pdf |
_version_ | 1811177485080985600 |
---|---|
author | Sajid Hussain Muhammad Shahid Iqbal Malik Nayyer Masood |
author_facet | Sajid Hussain Muhammad Shahid Iqbal Malik Nayyer Masood |
author_sort | Sajid Hussain |
collection | DOAJ |
description | 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. |
first_indexed | 2024-04-11T06:02:35Z |
format | Article |
id | doaj.art-ebcebe3d89f74b838e3f3a9b8c6259a1 |
institution | Directory Open Access Journal |
issn | 2376-5992 |
language | English |
last_indexed | 2024-04-11T06:02:35Z |
publishDate | 2022-12-01 |
publisher | PeerJ Inc. |
record_format | Article |
series | PeerJ Computer Science |
spelling | doaj.art-ebcebe3d89f74b838e3f3a9b8c6259a12022-12-22T04:41:36ZengPeerJ Inc.PeerJ Computer Science2376-59922022-12-018e116910.7717/peerj-cs.1169Identification of offensive language in Urdu using semantic and embedding modelsSajid HussainMuhammad Shahid Iqbal MalikNayyer MasoodAutomatic 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.https://peerj.com/articles/cs-1169.pdfIdentificationOffensive langaugeNatural language processingUrduSemanticEmebedding model |
spellingShingle | Sajid Hussain Muhammad Shahid Iqbal Malik Nayyer Masood Identification of offensive language in Urdu using semantic and embedding models PeerJ Computer Science Identification Offensive langauge Natural language processing Urdu Semantic Emebedding model |
title | Identification of offensive language in Urdu using semantic and embedding models |
title_full | Identification of offensive language in Urdu using semantic and embedding models |
title_fullStr | Identification of offensive language in Urdu using semantic and embedding models |
title_full_unstemmed | Identification of offensive language in Urdu using semantic and embedding models |
title_short | Identification of offensive language in Urdu using semantic and embedding models |
title_sort | identification of offensive language in urdu using semantic and embedding models |
topic | Identification Offensive langauge Natural language processing Urdu Semantic Emebedding model |
url | https://peerj.com/articles/cs-1169.pdf |
work_keys_str_mv | AT sajidhussain identificationofoffensivelanguageinurduusingsemanticandembeddingmodels AT muhammadshahidiqbalmalik identificationofoffensivelanguageinurduusingsemanticandembeddingmodels AT nayyermasood identificationofoffensivelanguageinurduusingsemanticandembeddingmodels |