Humor plays an important role in human languages and it is essential to model humor when building intelligence systems . Among different forms of humor , puns perform wordplay for humorous effects by employing words with double entendre and high phonetic similarity . However , identifying and modeling puns are challenging as puns usually involved implicit semantic or phonological tricks . In this paper , we propose Pronunciation-attentive Contextualized Pun Recognition ( PCPR ) to perceive human humor , detect if a sentence contains puns and locate them in the sentence . PCPR derives contextualized representation for each word in a sentence by capturing the association between the surrounding context and its corresponding phonetic symbols . Extensive experiments are conducted on two benchmark datasets . Results demonstrate that the proposed approach significantly outperforms the state-of-the-art methods in pun detection and location tasks . In-depth analyses verify the effectiveness and robustness of PCPR . During the last decades , social media has promoted the creation of a vast amount of humorous web contents ( Nijholt et al . , 2017 ) . Automatic recognition of humor has become an important task in the area of figurative language processing , which can benefit various downstream NLP applications such as dialogue systems , sentiment analysis , and machine translation ( Melby and Warner , 1995 ; Augello et al . , 2008 ; Ghosh et al . , 2015 ; Bertero and Fung , 2016 ; Blinov et al . , 2019 ) . However , humor is one of the most complicated behaviors in natural language semantics and sometimes it is even difficult for humans to interpret . In most cases , understanding humor requires adequate background knowledge and a rich context . Puns are a form of humorous approaches using the different meanings of identical words or words with similar pronunciations to explain texts or utterances . There are two main types of puns . Homographic puns rely on multiple interpretations of the same word . As shown in Table 1 , the phrase all right means good condition or opposite to left ; the word reaction means chemical change or action . The two meanings of the same expression are consistent with its context , which creates a humorous pun in both sentences when there is a clear contrast between two meanings . On the other hand , heterographic puns take advantage of phonologically same or similar words . For example , the word pairs sale and sail , weak and week in Table 1 have the same or similar pronunciations . The sentences are funny because both words fit the same context . Understanding puns is a big fish to fry for deep comprehension of complex semantics . These two forms of puns have been studied in literature from different angles . To recognize puns in a sentence , word sense disambiguation techniques ( WSD ) ( Navigli , 2009 ) have been employed to identify the equitable intention of words in utterances ( Pedersen , 2017 ) . External knowledge bases such as WordNet ( Miller , 1998b ) have been applied in determining word senses of pun words ( Oele and Evang , 2017 ) . However , these methods can not tackle heterographic puns with distinct word spellings and knowledge bases that only contain a limited vocabulary . To resolve the issues of sparseness and heterographics , the word embedding techniques ( Mikolov et al . , 2013 ; Pennington et al . , 2014 ) provide flexible representations to model puns ( Hurtado et al . , 2017 ; Indurthi and Oota , 2017 ; Cai et al . , 2018 ) . However , a word may have different meanings regarding its contexts . Especially , an infrequent meaning of the word might be utilized for creating a pun . Therefore , static word embeddings are insufficient to represent words . In addition , some puns are created by replacing a word with another word with the same or similar pronunciation as examples shown in Table 1 . Therefore , to recognize puns , it is essential to model the association between words in the sentence and the pronunciation of words . Despite existing approaches attempt to leverage phonological structures to understand puns ( Doogan et al . , 2017 ; Jaech et al . , 2016 ) , there is a lack of a general framework to model these two types of signals in a whole . In this paper , we propose Pronunciation-attentive Contextualized Pun Recognition ( PCPR ) to jointly model the contextualized word embeddings and phonological word representations for pun recognition . To capture the phonological structures of words , we break each word into a sequence of phonemes as its pronunciation so that homophones can have similar phoneme sets . For instance , the phonemes of the word pun are { P , AH , N } . In PCPR , we construct a pronunciation attentive module to identify important phonemes of each word , which can be applied in other tasks related to phonology . We jointly encode the contextual and phonological features into a self-attentive embedding to tackle both pun detection and location tasks . We summarize our contributions as following . • To the best of our knowledge , PCPR is the first work to jointly model contextualized word embeddings and pronunciation embeddings to recognize puns . Both contexts and phonological properties are beneficial to pun recognition . In this paper , we propose a novel approach , PCPR , for pun detection and location by leveraging a contextualized word encoder and modeling phonemes as word pronunciations . Moreover , we would love to apply the proposed model to other problems , such as general humor recognition , irony discovery , and sarcasm detection , as the future work .
Puns involve implicit semantic or phonological tricks however there is no general framework to model these two types of signals as a whole.
They propose to jointly model contextualized word embeddings and phonological word representations by breaking each word into a sequence of phonemes for pun detection.
The proposed approach outperforms the state-of-the-art methods in pun detection and location tasks.