Detecting Irony in Shakespeare’s Sonnets with SPARSAR
Authors: Rodolfo Delmonte, Nicolò Busetto (Università Ca' Foscari Venezia, 2019)
Topic: Sentiment, Emotion, Irony, Hate

Abstract
In this paper we propose a novel approach to irony detection in Shakespeare’s Sonnets, a well-known data set that is statistically valuable. In order to produce a meaningful experiment, we created a gold standard by collecting opinions from famous literary critics on the same data focusing on irony. In the experiment, we use SPARSAR, a system for English poetry analysis and reciting by TTS. The system produces a deep linguistically-based representation at phonetic, syntactic, and semantic levels. It has been used to detect irony with a novel approach based on phonetic processing and sentiment analysis. At first, the evaluation was very disappointing, with only 50% of the sonnets matching the gold standard. Eventually, taking advantage of the semantic representation produced by the system at the propositional level, the logical structure of the sonnet was highlighted by computing the discourse relations of the couplet and/or the final quatrain. In this way, we managed to improve accuracy by 17%, up to 66.88%.

Introduction
Shakespeare’s Sonnets are a collection of 154 poems which is renowned for being full of ironic content (Weiser, 1983), (Weiser, 1987) and for its ambiguity thus sometimes reverting the overall interpretation of the sonnet. Lexical ambiguity, i.e. a word with several meanings, emanates from the way in which the author uses words that can be interpreted in more ways not only because inherently polysemous, but because sometimes the additional meaning it evokes is derived on the basis of the sound, i.e. by homophones (see “eye”, “I” in sonnet 152). The sonnets are also full of metaphors which many times require contextualising the content to the historical Elizabethan life and society. Furthermore, the sonnets are full of words related to specific language domains. For instance, there are words related to the language of economy, war, nature and to the discoveries of the modern age, and each of these words may be used as a metaphor of love. Many of the sonnets are organized around a conceptual contrast, an opposition that runs parallel and then diverges, sometimes with the use of the rhetorical figure of the chiasmus. It is just this contrast that generates irony, sometimes satire, sarcasm, and even parody. Irony may be considered in turn as: what one means using language that normally signifies the opposite, typically for humorous or emphatic effect; a state of affairs or an event that seems contrary to what one expects and is amusing as a result. As to sarcasm this may be regarded the use of irony to mock or convey contempt.(Attardo, 1994) Parody is obtained by using the words or thoughts of a person but adapting them to a ridiculously inappropriate subject. There are several types of irony, though we select verbal irony which, in the strict sense, is saying the opposite of what you mean for outcome, and it depends on the extralinguistics context. It is important to remark that in many cases, the linguistic structures on which irony is based, may require the use of nonliteral or figurative language, i.e. the use of metaphors. In our approach we will follow the so-called incongruity presumption or incongruity-resolution presumption. Theories connected to the incongruity presumption are mostly cognitive-based and related to concepts highlighted for instance, in (Attardo, 2000). The focus of theorization under this presumption is that in humorous texts, or broadly speaking in any humorous situation, there is an opposition between two alternative dimensions. As a result, in our study of the sonnets, produced by the contents of manual classification, we have been looking for contrasting situations; while in the sentiment analysis experiment, we have been concerned with a quantitative count of polarity related items. Computational research on sentiment analysis has been based on the use of shallow features with a binary choice to train statistical model (Carvalho et al., 2009) that, when optimized for a particular task, will produce acceptable performance. However generalizing the model has proven to be a hard task. In addition, the text addressed by recent research has been limited to tweets, which are in no way comparable to the sonnets contain a lot of nonliteral language. The other common approach used to detect irony, in the majority of the cases, is based on polarity detection(Van Hee et al., 2018). Sentiment Analysis(Kim and Hovy, 2004) and (Kao and Jurafsky, 2012) is in fact an indiscriminate labeling of texts either on a lexicon basis or on a supervised feature basis where in both cases, it is just a binary - ternary or graded - decision that has to be taken. This is certainly not explanatory of the phenomenon and will not help in understanding what it is that causes humorous reactions to the reading of an ironic piece of text. It certainly is of no help in deciding which phrases, clauses or just multiwords or simply words, contribute to create the ironic meaning (see (Reyes et al., 2012); (Reyes and Rosso, 2013)). We will not comment here on the work done to produce the gold standard which has already been described in a separate paper (Busetto & Delmonte, 2019 - To appear) but see all the file in the Supplementary materials). We simply say that we considered as ironic or sarcastic all sonnets that have been so defined by at least one of the many literary critics’ comments we looked into.

Conclusion
In this paper we have presented work carried out to annotate and experiment with the theme of irony in Shakespeare’s sonnets. The gold standard for the experiment has been created by collecting comments produced by literary critics on the presence of some kind of thematic, semantic and syntactic opposition in the sonnets as to produce some sort of irony. We have used the system available on the web, SPARSAR, to produce an automatic evaluation based on two parameters, phonetic features collapsed according to the theory that treats certain sounds to induce a negative rather than a positive mood. The second parameter is polarity, derived from the output of the module for sentiment analysis available in the system. From a comparison between the critics’ choices and the system’s the result was at first rather disappointing, it stopped at 50% of all sonnets. We then produced a new and much richer experiment by considering the logical structure of the sonnet and the content of the couplet by means of sentiment analysis, discourse markers and discourse relations. This allowed us to reach a final accuracy of 68.88%.