Leveraging Offensive Language for Sarcasm and Sentiment Detection in A rabic (2021)

Abstract: Sarcasm detection is one of the top challenging tasks in text classification, particularly for informal Arabic with high syntactic and semantic ambiguity. We propose two systems that harness knowledge from multiple tasks to improve the performance of the classifier. This paper presents the systems used in our participation to the two sub-tasks of the Sixth Arabic Natural Language Processing Workshop (WANLP); Sarcasm Detection and Sentiment Analysis. Our methodology is driven by the hypothesis that tweets with negative sentiment and tweets with sarcasm content are more likely to have offensive content, thus, fine-tuning the classification model using large corpus of offensive language, supports the learning process of the model to effectively detect sentiment and sarcasm contents. Results demonstrate the effectiveness of our approach for sarcasm detection task over sentiment analysis task.

## introduction current trend in sentiment analysis research is moving toward the special sub-field of sarcasm detection. it is becoming one of the most challenging and relevant task for the sentiment analysis community. the complexity of detecting sarcastic content is attributed to multiple factors including context understanding, cultural aspects, and personal traits @xcite . this paper describes two systems that have been submitted to the shared sub-tasks of sarcasm detection and sentiment analysis at the sixth arabic natural language processing workshop (wanlp 2021) @xcite . the approach adopted in developing the systems is inspired by the findings from offensive language studies. previous researchers highlight sarcastic content as one of the main causes of confusion for offensive lan-guage detection systems @xcite . additionally, multiple studies applied sentiment features into the task of offensive language detection and report significant gain in performance @xcite @xcite . all of these findings demonstrate the relationship among sentiment analysis, sarcasm detection, and offensive language detection tasks. our main methodology is based on transfer learning that is performed by joint fine-tuning over the concatenated tasks; offensive language, sarcasm detection, sentiment analysis, and transfer corpora. thus, the contextualized word embedding is learned based on the entire fine-tuning corpus. the main goal from applying this system pipeline is to examine the impact of offensive language linguistic features on sarcastic language and sentiment content. multiple researchers from offensive language detection studies report findings from their experiments that highlight the relationship between sarcasm detection and offensive language detection. for example in @xcite , the authors applied a multitask learning and multilabel classification approach with arabert model @xcite , for hate speech detection and offensive language detection. the findings from their error analysis showed some mislabeled hate speech tweets that are mostly related to mockery, sarcasm, or mentioning other offensive and hateful statements within tweets. @xcite also report similar findings. in @xcite , multiple classification models for offensive language detection were explored, and the results from the error analysis highlight some issues that confused the classifiers including the use of sarcastic speech to quote scenes from popular movies. furthermore, various offensive language detection studies apply sentiment features in their models and report positive effects in system performance. for instance, @xcite deploy a cyberbullying detection system that consists of sentistrength foot_0 features related to sentiment polarity of twitter users to train a classifier. results report higher performance when using the system with sentistrength features from the model that does not apply sentiment features. @xcite develop an offensive language detection system based on assuming a correlation between negative sentiment and offensive language. they use aranet @xcite to augment the imbalanced dataset by adding negative tweets and develop m-bert foot_1 -based classifiers. results show higher performance of the model that applies negative sentiment augmented dataset over the others that do not consider the sentiment augmentation approach. additionally, abu farha and magdy (2020b) explored various classifiers using different multitask learning settings across offensive language, hate speech, and sentiment analysis. result demonstrates higher performance for the model that is trained on offensive language, hate speech, and sentiment, assuming all offensive and hate speech tweets are negative sentiment and others are positive sentiment. ## methodology transfer learning is performed by joint training over the concatenated task and transfer corpora, and subwords are learned over the concatenation of both corpora; offensive language and sarcasm detection or sentiment analysis. the overall proposed system architecture is described in fig. 1 . we submitted two separate submissions that were independently trained and tested for each sub-task. ## error analysis and discussion we manually investigate samples of the misclassified samples for each sub-task from both models. among the common errors for sarcasm detection sub-task is offensive tweets that were classified as sarcasm, while it is not sarcasm. for example the following tweet is misclassified as sarcasm by all experiments using both models: ' / messi is impolite, the coaches draw two lines of defense and he hits them alone'. for the sentiment analysis sub-task, most of the common errors are from the neutral class, such as ' / la liga news -the injury hits barcelona's spanish goalkeeper', which has some offensive terms ' / hit' but it is not negative, while all models classify it as a negative sentiment tweet. further analysis is required to examine the extent of the overlap among the three tasks and the forms of content that are shared across them. ## conclusions this paper represents the system used in submissions for sarcasm detection and sentiment analysis sub-tasks at the sixth arabic natural language processing workshop (wanlp) @xcite . our approach examines transfer learning across offensive language, saracsm detection, and sentiment analysis. the results highlight valuable impact of our approach for sarcasm detection task over sentiment analysis task.