Machine Learning-Based Model for Sentiment and Sarcasm Detection (2021)

Abstract: Within the last few years, the number of Arabic internet users and Arabic online content is in exponential growth. Dealing with Arabic datasets and the usage of non-explicit sentences to express an opinion are considered to be the major challenges in the field of natural language processing. Hence, sarcasm and sentiment analysis has gained a major interest from the research community, especially in this language. Automatic sarcasm detection and sentiment analysis can be applied using three approaches, namely supervised, unsupervised and hybrid approach. In this paper, a model based on a supervised machine learning algorithm called Support Vector Machine (SVM) has been used for this process. The proposed model has been evaluated using ArSarcasm-v2 dataset. The performance of the proposed model has been compared with other models submitted to sentiment analysis and sarcasm detection shared task.

## introduction today, social networks such as facebook and twitter are considered new forms of social interaction, knowledge exchange, and collaboration. social networking sites allow users to exchange ideas, post updates, reviews, and comments while sharing their broader interests. du to the extreme usage of social networks, it is crucial to apply related analysis tasks automatically. these tasks ranges over sarcasm detection, offensive language detection @xcite , author profiling @xcite , irony detection @xcite and sentiment analysis. sentiment analysis is precious as it allows us to capture an overview of social network users' opinions towards specific topics, products, or services. sentiment analysis refers to the use of natural language processing (nlp) and machine learning (ml) to identify and extract subjective information in a piece of writing. sarcasm is defined as an indirect way to express an opinion as the written is literally not the intended meaning @xcite . it is considered a widespread phenomenon in social media, which is difficult to analyse, not just automatically but also for humans @xcite . although it has a significant effect on sentiment, it is ignored in social media analysis because it is considered too difficult to handle. so, sarcasm is still considered a challenge in sentiment analysis. due to the importance of sentiment analysis, many research works have been developed in this research field. however, most of these studies have focused on english and other indo-european languages @xcite . actually, few studies have been conducted on sarcasm and sentiment analysis in morphologically rich languages such as arabic @xcite . three main variations of the arabic language exist classical arabic, which is the language of the qur'an (islam's holy book); modern standard arabic (msa), and dialectical arabic. msa is an arabic language form used greatly in formal speeches and writings. dialectical arabic refers to all oral varieties spoken in daily communication. these vary from one arab country to another and from one region of the same country to another. the work in arabic sarcasm sentiment analysis using a variety of arabic dialects started in 2008. besides, a set of research work has been rapidly conducted such as @xcite @xcite . the authors use different ml approaches such as supervised, unsupervised, and hybrid approaches to detect sarcasm and sentiment. these approaches carry out the classification task as it classifies text into either sarcasm or not. however, more work is still needed to achieve better accuracy. in this paper, we present a model to detect sarcastic and sentiment arabic tweets from real ones using svm. the model is developed in the framework of the shared task on sarcasm and sentiment detection in arabic @xcite . the rest of this paper is organized as follows. section 2 reviews the dataset, section 3 gives a detailed description of how the systems were built and trained. in section 4, the system is evaluated, and the results are discussed. the paper is concluded in section 6 after a general discussion is introduced in section 5. ## dataset for both tasks, arsarcasm-v2 (abu farha et al., 2021) a dataset has been distributed to all participants. it contains a labeled training set with 12,548 tweets and a blind test set contains 3,000 unlabelled tweets. ## system the proposed system, as described in figure 1 , combines three main phases: preprocessing phase, the feature extraction phase, and the classification phase. ## conclusion sarcasm and sentiment detection is one of the most useful and challenging tasks. in this paper, we proposed svm based classifier model to detect arabic sarcasm and sentiment in twitter. the results are produced from training the model using svm classifier, one of the accurate classification algorithms. the model achieves moderate accuracies, which are relatively high, especially regarding arabic text. the performance can be improved using different weighting scores such as word embeddings. deep learning based models also can be used for the training purpose.