Machine humour : an implemented model of puns

This thesis describes a formal model of a subtype of humour, and the implementation of that model in a program that generates jokes of that subtype. Although there is a great deal of literature on humour in general, very little formal work has been done on puns, and none has been implemented. All current linguistic theories of humour are over-general and not falsi able. Our model, which is speci c, formal, implemented and evaluated, makes a signi cant contribution to the eld. Punning riddles are our chosen subtype of verbal humour, for several reasons. They are very common, they exhibit certain regular structures and mechanisms, and they have been studied previously by linguists. Our model is based on our extensive analysis of large numbers of punning riddles, taken from children's joke books. The implementation of the model, JAPE (Joke Analysis and Production Engine), generates punning riddles, from a humour independent lexicon. Pun generation requires much less world knowledge than pun comprehension, making it feasible for implementation. To support our claim that all of JAPE's output is punning riddles, we conducted an evaluatory experiment. We took JAPE texts, human-generated texts, nonsense non-jokes and sensible non-jokes, and asked joke experts to evaluate them. For joke experts, we used 8{11 year old children, since psychological research suggests that this age group enjoys, and can recognize, punning riddles better than other age groups. The results showed that JAPE's output texts are, in fact, recognizably jokes. The evaluation showed that our model adequately describes a signi cant subtype of verbal humour. We believe that this model can now be expanded to cover puns in general, as well as other types of linguistic humour. ii Acknowledgements I would rst of all like to thank my supervisors, Drs Graeme Ritchie and Helen Pain, for their careful guidance during the course of the research reported here, and for smiling patiently at all the bad jokes { mine and JAPE's. Sev Davison has been the most wonderful assistant that anyone could ask for | thanks for helping with the experiments, reading through this tome, and being generally supportive. Thanks too to Fiona Pollard and Ben Hambidge for their devoted e orts to convince small children that experiments are fun, and to Paul Bailey for proofreading the thesis. I would also like to thank all the volunteers who helped me test the prototype program, in particular: David Asher, Jim Broughton, Don Casadonte, William Chesters, Myles Chippendale, Mark Dalgarno, Richard Evans, Enrique Filloy-Garcia, Chris Gathercole, Richard Henson, Tudor Wyatt Johnston, Matthias Klaes, Stewart Long, Steve McCoy, Marc Nantel, Simon Perkins, Tim Pizey, Sheila Rock, Sarah Rose, and Chris Seah. Your comments were invaluable. The nal evaluation was made possible by a great deal of help from the sta of Craiglockhart Primary School, and the sta of the Edinburgh International Science Festival. Thanks also to all the children who took part. Thanks to Garry Dobson for his voice. The nal two years of my PhD were funded by the Natural Science and Engineering Council of Canada. In my nal year, I was helped by a Special Opportunity Grant. Special thanks to Jean-Pierre Lalande and Lyn Pharand, for being much too helpful to be real bureaucrats, and to Graeme Hirst, for helping to convince NSERC to fund me. iii Declaration I hereby declare that I composed this thesis entirely myself and that it describes my own research. Kim Binsted Edinburgh November 6, 1996 iv