The Computational Generation of a Class of Pun
Total Page:16
File Type:pdf, Size:1020Kb
THE COMPUTATIONAL GENERATION OF A CLASS OF PUN A thesis submitted to the Department of Computing and information Science in conformity with the requirements for the degree of Master of Science Queen's University Kingston, Ontario, Canada September, 1999 Copyright 8 Christopher Venour, 1999 National Library BiMioîhèque nationale du Canada Acquisitions and Acquisitions et Bibliographie Services services bibliographiques 395 Wellington Street 395. nie Welk'ngton OîtawaON K1AONQ Ottawa ON Kt A ON4 canada canada The author has granted a non- L'auteur a accordé une licence non exclusive Licence dowing the exclusive permettant à la National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distribute or sell reproduire, prêter, distribuer ou copies of this thesis in microform, vendre des copies de cette thèse sous paper or electronic formats. la forme de microfiche/nlm, de reproduction sur papier ou sur format électronique. The author retains ownership of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantial extracts fiom it Ni la thèse ni des extraits substantiels may be printed or otherwise de celle-ci ne doivent être imprimés reproduced without the author's ou autrement reproduits sans son permission. autorisation. Abstract This document examines what &es texts funny and explores bow sophisticated a computer program and database would need to be in order to produce jokes of varying complexity, A precise mode1 of a class of pun is then created and implemented into a program thaî can generate jokes. By doing so, we show that some fonns of punning can be codified and thus puncture some of the mystique surrounding humour. Our anaiysis of humour also reveals some new fundamental building blocks that wiii be required for compreheasive laquage generation and understanding- Acknowledgments 1 would like to thank my supervisor Dr. Michael Levison for his guidance in the creation of this thesis. 1 would also like to thank my family wbo has always supported me in my schooihg and in al1 things. Thank you also to my family at St- James for their support and intetest in me. A specid thanks to Mary whose gentle and kind ways are a blessing to me and ail who know her. And finaily 1 would Lice to thaak my brocher-in-law Michael without whom this thesis would not have been completed- 1 am very gratefuI to him for all his kindness and encouragement. Contents 1 INTRODUCTION 1.1 Humour and Cornputational linguistics................................................................................. 1 1.2 Reievance of the research ........................................___........,,,-.-.. -....-. .... 1 1.3 Goals .........................,............................................................................................ ..... -3 2 DEVELOPING A PRACTICAL MODEL OF HUMOUR 2.1 Attardo and Raskin's theory of humour .............................. ... .......................................... 5 2.2 Dividing humour into two categories............................................................................... 10 2.2.1 Verbal vs . Situational humour .................................................................................... 10 2.3 The Ambiguity Theory of Humour .................... .... .........*.............................................11 2.3.1 LOW-levelambiguities ...... .. ................................................................................... 12 2.3.2 High-level âxnbiguity ............................................. ........ ................... 16 2.3.3 Are al1 jokes ambiguous? .......................... ......................................................19 2.3.4 What kind of ambiguity is funny? ............................................................................ 19 2.3.5 Script precedence vs .script equality .......-...... ......... .. .......................................... 20 2.3.6 Where does the ambiguity occur? ............................. .... ............................. 21 2.4 A Practical Mode1 of Humour...................... .... .......................................................... -21 2.4.1 Choose a Narrative Strategy......................................................................................... -21 iii 2.4.2 Construct Schemata ....................................................................................................... 23 2.4.3 Choose a Ternpiate.. .....~............~.~................................................................................. 25 2.4.4 Find Targets and Situation ..................... ......... .., .......................................................... 26 3 PREVIOUS AUTOMATED JOKE ALGORITHMS 3.1 Lessard and Levison's delof Tom Swifties .................................................................... 28 3.1 .1 Computational generaiion of Tom Swifries ................................................ ......,,......29 3.2 Lessard and Levison's mode1 of riddles .............................................................................. 32 3.2.1 Computational generation of this class of riddles .................................................... 33 3.3 Binsted's mode1 of a class of riddles ....................................,., ............................................. 33 3.3.1 Computational generation of this class of riddles ....................,.,, .................... 34 3.4 What components of the practical model (Section 2.4) are performed by the cornputer in previous joke-generators? .............................................. ..36 4 MODELING AND GENERATING HCPPS 4.1 Why use common phrases? ...................... .. .............................................................. 37 4.2 Components of HCPPs ......................................................................................................... 38 4.3 Levels of complexity of HCPPs ..................... .. ...................................................... 39 4.4 Focusing on a subclass of homophone pun ................ .... ............................................. 40 4.5 Required Lexical Database Elements ...................................... .. 4.6 The Schemata ....................................................................................................................... 43 iv 5.1 Populating the Lexical Database .................. ....,,........... ....................................................... 56 5.1.1 The reserved fields ........................................................................................................ 57 5.1 -2 HCPP Lexical entries and their relations ................... ,..,............ ...................................57 5.2 Building the Lexicon ......... .....-. ........................................................................................ 61 5.2.1 Generate the Initiai List ................................................................................................. 62 5.2.2 Remove unusefi1 homophones and add common phrases to the lexicon..................... 63 5.2.3 Add the remaining words maktog up the common phrases to the lexicon ................... 66 5.2.4 Fid certain relations to lexical entries and add hem to the lexicon.. .......................... 68 5.3 Generating the Jokes ................... ...... ................................................................................ 68 ANALYSIS OF RESULTS 69 Evaluating the output ........................................................................................................... 69 Irnproving the joke generator ........................................................................................ .. 70 7 CONCLUSION 7.2 Possible extensions and improvements ...................,. ........................................................ 74 7.3 The next generation .............................................................................................................. 75 7.4 Conclusion ...................................-....................................................... ......................... 81 BlBLIOGRAPEN A The lendeou, morphology des, aaributcs and terminils B The implemented schemPtP C The generated jokes D A sampie questionnnire E The jokes' scores Vita List of Tables L Jokes illustcating Attacdo and Raskin' s pararnetecs................................................................. 6 2 Examples of verbal humour and situational humour ........................................................... 11 . 4 Examples of puns with word-level arnbigoity................................................................ 13 6 Examples of jokes using phrase-level ambiguity ................................................................... 15 7 Examples of syntactic and hi&-level ambiguity ................................................................ 15 8 The different kinds of ambiguity that appear in jokes ........................... ....... ............. 18 9 Ambiguous texts ..................................................................................................................... 20 10 Examples of Schemata and Templates .................... ........... L 1 Examples of Tom Swifües ................................................................................................. 29 12 Situational Tom Swifties ...................................................................................................... 30 13 Syntagmatic and paradigrnatic homwym nddles ...............................................................