1 / 26

Opening Computational Door on Knock Knock Jokes

Opening Computational Door on Knock Knock Jokes Julia M. Taylor & Lawrence J. Mazlack Applied Artificial Intelligence Laboratory University of Cincinnati Introduction This is an initial investigation into computational humor recognition using wordplay The program

niveditha
Download Presentation

Opening Computational Door on Knock Knock Jokes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Opening Computational Door on Knock Knock Jokes Julia M. Taylor & Lawrence J. Mazlack Applied Artificial Intelligence Laboratory University of Cincinnati

  2. Introduction • This is an initial investigation into computational humor recognition using wordplay • The program • Learns statistical patterns of text • Recognizes utterances similar in pronunciation to a given word • Determines if found utterances transform a text into a joke

  3. Restricted Domain: Knock Knock Jokes • Line1: “Knock, Knock” • Line2: “Who’s there?” • Line3: any phrase • Line4: Line3 followed by “who?” • Line5: One or several sentences containing • Type1: Line3 • Type2: A wordplay on Line3 • Type3: A meaningful response to a wordplay of Line3 or Line4

  4. Restricted Domain: Knock Knock Jokes • Type1: Line3 --Knock, Knock --Who’s there? --Water --Water who? --Water you doing tonight? • Type2: A wordplay on Line3 --Knock, Knock --Who’s there? --Ashley --Ashley who? --Actually, I don’t know. • Type3: A meaningful response to a wordplay of Line4 --Knock, Knock --Who’s there? --Tank --Tank who? --You are welcome.

  5. Experimental Design • Training set: • 66 Knock Knock jokes • Enhance similarity table of letters • Select N-gram training texts • 66 texts containing wordplay from 66 training jokes • Test set: • 130 Knock Knock jokes • 66 Non-jokes that have similar structure to Knock Knock jokes

  6. Similarity Table • Contains combination of letters that sound similar • Based on similarity table of cross-referenced English consonant pairs • Modified by: • translating phonemes to letters • adding vowels that are close in sound • adding other combinations of letters that may be used to recognize wordplay Segment of similarity table

  7. Training Corpus • Training texts were entered into N-gram database Nurse: I need to get your weight today. Impatient patient: 3 hours and 45 minutes. • Wordplay validation: bigram table (I need 1) (need to 1) (to get 1) (get your 1) (your weight 1) (weight today 1) (today end-of-sentence 1) • Punchline validation: trigram table (I need to 1) (need to get 1) (to get your 1) (get your weight 1) (your weight today 1) (weight todayend-of-sentence1)

  8. How It Works • Step1: joke format validation • Step2: computational generation of sound-alike sequences • Step3: validations of a chosen sound-alike sequence • Step4: last sentence validation with sound-alike sequence

  9. Step 1: Joke Format Validation • Line1: “Knock, Knock” • Line2: “Who’s there?” • Line3: any phrase • Line4: Line3 followed by “who?” • Line5: One or several sentences containing Line3 • Knock, Knock • Who is there? • I, Felix • I, Felix who? • I, Felix-ited! • Knock, Knock • Who is there? • I, Felix • I, Felix who? • I feelexcited!

  10. Step 2: Generation of Wordplay Sequences • Repetitive letter replacements of Line3 • Similarity used for letter replacements • Resulting utterances are ordered according to their similarity with Line3 • Utterances with highest similarity are checked for decomposition into several words Segment of similarity table

  11. Step 2: Generation of Wordplay Sequences ifelixited 10.0 efelixited 9.23

  12. Step 2: Generation of Wordplay Sequences ifelixited 10.0 efelixited 9.23 ifilixited 9.23 ifalixited 9.23 ifolixited 9.23

  13. Step 2: Generation of Wordplay Sequences ifelixited 10.0 efelixited 9.23 ifilixited 9.23 ifalixited 9.23 ifolixited 9.23 iferixited 9.56

  14. Step 2: Generation of Wordplay Sequences ifelixited 10.0 efelixited 9.23 ifilixited 9.23 iferixited 9.56 ifolixited 9.23 ifalixited 9.23

  15. Step 2: Generation of Wordplay Sequences ifelixited 10.0 iferixited 9.56 ifilixited 9.23 efelixited 9.23 ifolixited 9.23 ifalixited 9.23

  16. Step 2: Generation of Wordplay Sequences if el exited ifelexited 9.23 *** *** *** ***

  17. Step 3: Wordplay Validation if el exited NO one word? YES divide into pairs if el el exited each pair in bigram? NO YES Step 2 Step 4

  18. Step 2: Generation of Wordplay Sequences i feel excited ifeelexcited 7.x *** *** *** ***

  19. Step 3: Wordplay Validation i feel excited NO one word? YES divide into pairs I feel feel excited each pair in bigram? NO YES Step 2 Step 4

  20. Step 4: Last SentenceValidation with Wordplay • Wordplay is meaningful • Could occur • In the beginning of last sentence • In the middle of last sentence • At the end of last sentence

  21. Step 4: Last Sentence Validation with Wordplay • In the beginning of sentence: i feel excited (wordplay N, punch1, punch2) in trigram? NO YES One word? YES NO (wordplay N-1, wordplay N, punch1) in trigram? NO YES Step 2 joke Step 2

  22. Step 4: Last Sentence Generation with Wordplay • In the beginning of sentence: i feel excited Is there sentence in the training text with wordplay? NO YES Step 2 joke

  23. Knock Knock Joke Generation --Knock, Knock --Who’s there? --Ammonia --Ammonia who? --Ammonia … Ammonia = I’m only • --Knock, Knock • --Who’s there? • --Ammonia • --Ammonia who? • --Ammonia trying to be funny

  24. Results • 66 training jokes • 59 jokes were recognized • 7 unrecognized, no wordplay found • 66 non-jokes • 62 correctly recognized as non-jokes • 1 found wordplay that makes sense • 3 incorrectly recognized as jokes • 130 test jokes • 8 jokes were not expected to be recognized • 12 identified as jokes with expected wordplay • 5 identified as jokes with unexpected wordplay • 80 expected wordplays found

  25. Possible Enhancements • Improve last sentence validation • Increasing size of text used for N-gram training • Parser • N-grams with stemming • Improve wordplay generator • Use of phoneme comparison • Use wider domain • All types of Knock Knock jokes • Other types of wordplay jokes

  26. Conclusion • Initial investigation into KK joke recognition using wordplay • The program was designed to • Recognize wordplay in KK jokes 67% • Recognize KK jokes containing wordplay 12% • Alternate result of this program • KK joke generator

More Related