“When Words Fail, Emojis Prevail”: A Novel Architecture for Generating Sarcastic Sentences With Emoji Using Valence Reversal and Semantic Incongruity (2023)

Abstract: Sarcasm is a form of figurative language that serves as a humorous tool for mockery and ridicule. We present a novel architecture for sarcasm generation with emoji from a non-sarcastic input sentence in English. We divide the generation task into two sub tasks: one for generating textual sarcasm and another for collecting emojis associated with those sarcastic sentences. Two key elements of sarcasm are incorporated into the textual sarcasm generation task: valence reversal and semantic incongruity with context, where the context may involve shared commonsense or general knowledge between the speaker and their audience. The majority of existing sarcasm generation works have focused on this textual form. However, in the real world, when written texts fall short of effectively capturing the emotional cues of spoken and face-to-face communication, people often opt for emojis to accurately express their emotions. Due to the wide range of applications of emojis, incorporating appropriate emojis to generate textual sarcastic sentences helps advance sarcasm generation. We conclude our study by evaluating the generated sarcastic sentences using human judgement. All the codes and data used in this study has been made publicly available.

## introduction sarcasm is defined as the use of remarks that often mean the opposite of what is said in order to hurt someone's feelings or to criticize something in a humorous way foot_1 . sarcastic remarks are often challenging to interpret considering their literal meaning differs greatly from the speaker's actual intent. compared to verbal or in-person conversations, textual sarcasm presents additional challenges due to the absence of visual cues, vocal tone etc. non-sarcastic input sarcastic output with emoji i really hate walking in the rain. i really love the outdoors walking in the rain. i sat feeling thoroughly miserable. mom is in a bad mood today. happy mothers day mom is in a well mood today. she sounded tense and angry. that movie was bad. that movie was awesome. bad intelligence and political incompetence. the presence of sarcasm makes it significantly harder for machines to understand the actual meaning of the textual data. this has motivated research in detecting sarcasm in textual data. in order to train machines to detect sarcasm, we need quality datasets that represent different aspects of sarcasm in text. even though we have an abundance of social media data and resources, it can be difficult to collect correctly labeled sarcastic texts. instead, many research have tried to generate texts that can accurately express sarcastic notions @xcite @xcite . many studies have also investigated strategies in incorporating sarcasm generation into chatbots @xcite . emojis, small ideograms that represent objects, people, and scenes @xcite , are one of the key elements of a novel form of communication due to the advent of social media. using emojis within texts can give us additional cues on sarcasm, replicating facial expressions and body language, etc. incorporating emojis with texts for training will let the machines catch these cues easily @xcite . @xcite observed that when emojis were included in the sentence, their emoji-based sarcasm detection model performed noticeably better. in this study, we propose a new framework in which when given a non-sarcastic text as input, the text is converted into a sarcastic one with emoji where the emoji will specifically help to identify the sarcastic intent of the text. for textual sarcasm generation, we are incorporating the works of @xcite and @xcite and for emoji prediction, a deep learning model fine tuned on openai's clip (contrastive language-image pre-training) foot_2 @xcite is used. the emoji prediction module along with the sarcasm generation module generates the final sarcastic text including emoji. this work provides two major contributions: as far as our understanding goes, there has been no previous framework proposed on textual sarcasm generation that also incorporates emojis. this framework can aid downstream tasks by allowing a deeper understanding of sarcasm to produce more contextually relevant responses. ## related work research on sarcasm have been a subject of interest for several decades. the following sub sections provide a brief overview of the past work done on different aspects of sarcasm. ## methodology our model architecture consists of 3 modules which are as follows: reversal of valence, retrieval of commonsense and emoji prediction. the reversal of valence module takes in a negative utterance and generates an utterance with positive sentiment. the retrieval of commonsense module outputs relevant commonsense context sentence which helps in creating a sarcastic situation. lastly, the emoji prediction module generates an emoji which makes the overall output more sarcastic. with these three modules, we have incorporated two of the fundamental features of sarcasm: reversal of valence and semantic incongruity with the context. a diagram of the overall pipeline is demonstrated in figure 1 . we describe the modules in details in the next few sub sections. ## experimental setup the dataset, model configurations for the different modules, and the evaluation criteria for our work are all discussed in the following sub sections. ## experimental results & analysis