Homophonic Pun Generation with Lexically Constrained Rewriting (2020)

Abstract: Punning is a creative way to make conversation enjoyable and literary writing elegant. In this paper, we focus on the task of generating a pun sentence given a pair of homophones. We first find the constraint words supporting the semantic incongruity for a sentence. Then we rewrite the sentence with explicit positive and negative constraints. Our model achieves the state-of-the-art results in both automatic and human evaluations. We further make an error analysis and discuss the challenges for the computational pun models.

## introduction in this work, we mainly study the homophonic puns where two meanings relying on the same (or similar) sounding signs. as figure 1 shows, the pun exploits the sound similarity between "tuna" and "tune". the word ("tuna") appearing in the sentence that triggers humor is a pun word, while its homophonic word ("tune") is the alternative word. the semantics of the homophones are expressed by two words independently ("whistling", "fisherman"). on the surface, there is one interpretation: "the fisherman had no tuna". implied by "whistling" and the pronunciation of "tuna", there is another interpretation:"the whistling fisherman sang out of tune". early models for pun generation are mainly relying on templates @xcite @xcite @xcite @xcite . to improve the diversity of generated puns, @xcite propose a neural approach to generate puns conditioning on two meanings of the target word. based on it, @xcite introduce a word sense classifier as the discriminator to generate homographic puns by adversarial generative network. however, neural generative models usually mimic the norm and the generated sentences are lack of novelty. to make the generated puns more creative, @xcite first sample a sentence containing the alternative word from the corpus. they then replace the alternative word with the pun word and insert a topic word. this retrieve-and-edit approach is brilliant. however, the part-of-speech (pos) tags of the pun words and its alternative words are different in 46.08% puns in the gold pun dataset @xcite . directly replacing the alternative word with the pun word usually leads to grammar errors in the generated sentence. as there are tons of sentences containing the alternative word, it is also necessary to rank the sentences purposefully. to address the issues above, we propose a constraint selection algorithm to extract the candidate sentence containing the alternative word and its corresponding constraints. then our lexically constrained rewriting model (lcr) generates puns by rewriting the normal sentences with constraints. in this way, the different semantic meanings of two homophones are expressed naturally in a generated sentence. both automatic and human evaluation results demonstrate the efficacy of our model foot_0 . ## our method the framework of our model is shown in figure 2 . given a pair of homophones, we retrieve sentences containing the alternative word ("tune") and pun word ("tuna"). next, we extract the most suitable weak word ("boy") and the corresponding support word ("fisherman") to form constraints. positive constraints contain the pun word and its support word. negative constraints contain the alternative word and its weak word. finally, we rewrite the candidate sentence with lexical constraints to generate a homophonic pun. ## conclusion in this work, we propose to generate homophonic puns with lexically constrained rewriting. we retrieve sentences containing the alternative word as candidate sentences. and then we use constraint selection algorithm to rank candidate sentences and choose support word to imply the semantics of the pun word. finally we rewrite the sentence with constraints. our model outperforms previous works on the task of homophonic pun generation. however,as discussion in error analysis, there are several challenges to solve in the future.