Computationally Recognizing Wordplay in Jokes

Computationally Recognizing Wordplay in Jokes Julia M. Taylor (tayloj8@email.uc.edu) Lawrence J. Mazlack (mazlack@uc.edu) Electrical & Computer Engineering and Computer Science Department University of Cincinnati piece of literature in which the funniness culminates in the final sentence. ” Most researchers agree that jokes can be broken into two parts, a setup and a punchline. The setup is the first part of the joke, usually consisting of most of the text, which establishes certain expectations. The punchline is a much shorter portion of the joke, and it causes some form of conflict. It can force another interpretation on the text, violate an expectation, or both (Ritchie, 1998). As most jokes are relatively short, it may be possible to recog- nize them computationally. Computational recognition of jokes may be possible, but it is not easy. An “intelligent” joke recognizer requires world knowledge to “understand” most jokes. Abstract In artificial intelligence, researchers have begun to look at ap- proaches for computational humor. Although there appears to be no complete computational model for recognizing verbally expressed humor, it may be possible to recognize jokes based on statistical language recognition techniques. This is an in- vestigation into computational humor recognition. It considers a restricted set of all possible jokes that have wordplay as a component and examines the limited domain of “Knock Knock” jokes. The method uses Raskin's theory of humor for its theoretical foundation. The original phrase and the complimentary wordplay have two different scripts that overlap in the setup of the joke. The algorithm deployed learns statistical patterns of text in N-grams and provides a heuristic focus for a location of where wordplay may or may not occur. It uses a wordplay generator to produce an utter- ance that is similar in pronunciation to a given word, and the wordplay recognizer determines if the utterance is valid. Once a possible wordplay is discovered, a joke recognizer de- termines if a found wordplay transforms the text into a joke. Theories of Humor Introduction Thinkers from the ancient time of Aristotle and Plato to the present day have strived to discover and define the origins of humor. Most commonly, early definitions of humor relied on laughter: what makes people laugh is humorous. Recent works on humor separate laughter and make it its own dis- tinct category of response. Today there are almost as many definitions of humor as theories of humor; as in many cases, definitions are derived from theories (Latta, 1999). Some researchers say that not only is there no definition that covers all aspects of humor, but also humor is impossible to define (Attardo, 1994). Humor is an interesting subject to study not only because it is difficult to define, but also because sense of humor varies from person to person. The same person may find something funny one day, but not the next, depending on the person’s mood, or what has happened to him or her recently. These factors, among many others, make humor recognition challenging. Although most people are unaware of the complex steps involved in humor recognition, a computational humor recognizer has to consider all these steps in order to approach the same ability as a human being. A common form of humor is verbal, or “verbally ex- pressed, humor” (Ritchie 2000). Verbally expressed humor involves reading and understanding texts. While understating the meaning of a text may be difficult for a computer, reading it is not. One of the subclasses of verbally expressed humor is the joke. Hetzron (1991) defines a joke as “a short humorous Raskin’s (1985) Semantic Theory of Verbal Humor has strongly influenced the study of verbally expressed humor. The theory is based on assumption that every joke is com- patible with two scripts, and those two scripts oppose each other in some part of the text, usually in the punch line, therefore generating humorous effect. Another approach is Suls’ (1972) two-stage model, which is based on false expectation. The following algorithm is used to process a joke using two-stage model (Ritchie, • As a text is read, make predictions • While no conflict with prediction, keep going • If input conflicts with prediction: o If not ending – PUZZLEMENT o If is ending, try to resolve: No rules found – PUZZLEMENT Cognitive rules found –HUMOR There have been attempts at joke generation (Attardo, 1996; Binsted, 1996; Lessard and Levison, 1992; McDonough, 2001; McKay, 2002; Stock and Strapparava, 2002) and pun recognizers (Takizawa, et al. 1996; Yokogawa, 2002) for Japanese. However, there do not appear to be any theory based computational humor efforts. This may be partly due to the absence of a theory that can be expressed as an unambiguous computational algorithm. In the cases of Raskin and Suls, the first does not offer any formal algorithm, and the second does not specify what a cognitive rule is, leaving one of the major steps open to interpretation. Wordplay Jokes Wordplay jokes, or jokes involving verbal play, are a class of jokes depending on words that are similar in sound, but are used in two different meanings. The difference between the two meanings creates a conflict or breaks expectation,