connotation_clashers at S em E val-2022 Task 6: The effect of sentiment analysis on sarcasm detection (2022)

Abstract: We investigated the influence of contradictory connotations of words or phrases occurring in sarcastic statements, causing those statements to convey the opposite of their literal meaning. Our approach was to perform a sentiment analysis in order to capture potential opposite sentiments within one sentence and use its results as additional information for a further classifier extracting general text features, testing this for a Convolutional Neural Network, as well as for a Support Vector Machine classifier, respectively. We found that a more complex and sophisticated implementation of the sentiment analysis than just classifying the sentences as positive or negative is necessary, since our implementation showed a worse performance in both approaches than the respective classifier without using any sentiment analysis.

## introduction according to cambridge dictionary, sarcasm is defined as the use of remarks that mean the opposite of what they say, in order to hurt someone's feelings or to criticize something in a humorous way. while detecting sarcasm can be very difficult even beyond the text level, it is a real challenge to detect sarcasm in textual data. when having conversations in person, it is easier for people to detect sarcasm because they have additional information in form of the speaker's emphasis of words, his facial expressions and body gestures. all of this information is not available in written language. yet, detecting sarcasm from text becomes more and more important, since everyday life nowadays takes place on social media platforms to a large extent, unfortunately including things like hate speech in order to offend people. sarcasm is often used as a tool for that @xcite , so operators need ways to detect and remove offensive material expressed in a sarcastic way in large amounts of messages and posts released by millions of people every day. the shared task (described in abu farha et al., 2022) consisted of three sub tasks: we only participated in sub task a of the shared task. our strategy was to additionally perform a sentiment analysis on the given text data, using the contradictory nature of a sarcastic statement, between the actual utterance and its true meaning/intent. for example in the sentence "i love how ill i became last night. . . ", a sentiment analysis might recognize the clash of connotations between the positive connotated word "love" and the negative connotated fact of "being ill". @xcite also mentioned the inversing effect of using irony (a form of sarcasm) in a sentence on the overall sentiment of that sentence and even included this notion in form of a class called "verbal irony by means of a polarity contrast" in one of their sub tasks of the task they provided for the semeval competition in 2018. in an earlier work described in @xcite a similar approach to our strategy was used, combining several convolutional neural networks (cnns), pre-trained on recognizing and classifying sentiment, emotion and personality features respectively, with a support vector machine classifier for classification only. however, for the best of our knowledge there was no earlier work investigating the impact of sentiment analysis on sarcasm detection for linear models. inspired by the previously mentioned work, we combined the result of our sentiment analysis with all other features subtracted from the given text and investigated the influence of sentiment analysis on the final sarcasm detection for both a linear model, as well as for a deep learning model, also comparing the performance of both approaches. ## training data according to sub task a, our system should classify an input text as either sarcastic, or non-sarcastic. if, for example, the string "i love how it rains for the seventh day in a row" was fed as input to our system, the output would be either "1" (sarcastic), or "0" (non-sarcastic). as training data, two collections of tweets were given, one in english and one in arabic. in ## system overview and experimental setup both approaches we decided to test for solving the task were implemented in python 3.8. in terms of sentiment analysis we decided to focus on english, for which we tested each of those approaches both combined with a sentiment analysis and without it. the predictions contained in our official submission were created by our deep learning model not being combined with sentiment analysis, for both english and arabic. ## conclusions the support vector machine model (svm) performed better than the cnn both when sentiment analysis was included, as well as on its own. the svm without sentiment analysis also showed the highest f1 score of all four tested models. however, in general our results show that our ways of implementing sentiment analysis even had a negative impact on the classification for sarcasm on both systems. one reason for the bad performance of the sentiment analysis could have been that we performed the sentiment analysis on the input sentences as a whole for both training and classifying. in order to recognize a contradiction within one sentence, as explained in section 1, improvements might be achieved if the sentence is split in several sub parts and sentiment analysis is performed on those parts. this way, positive and negative classifications with high confidence scores might be observed, clearly indicating the aforementioned clash of connotations. potential challenges that could come up in that case are to determine where to split the sentences exactly, or deciding which parts of even the sub parts the sentiment analysis should be performed on, since not all word types convey sentiment (e.g. stop words could be considered neutral). to account for this, alternatively to our approaches, a sentiment lexicon could be used to calculate scores on sub parts of sentences. even without splitting the input sentences, we could have implemented our idea better for both approaches. for example, for the deep learning approach, sentiment analysis datasets might be more useful, if their genre is the same or closer to our training data. an additional way to adjust our implementation for this approach would be to shift our decision boundary, classifying sentences contradictory, if output values of the sigmoid function between for example 0.35 and 0.65 can be observed, since clearly positive and negative sub parts might lead to a rather neutral sentiment in total. similarly, for the linear model approach we could have weighted the "rather positive" and the "rather negative" category as more important, compared to the more extreme categories.