Opening Computational Door on Knock Knock Jokes - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Opening Computational Door on Knock Knock Jokes

Description:

... Computational Door on Knock Knock Jokes. Julia M. Taylor & Lawrence J. ... Ammonia trying to be funny. 24. Results. 66 training jokes. 59 jokes were recognized ... – PowerPoint PPT presentation

Number of Views:231
Avg rating:3.0/5.0
Slides: 27
Provided by: matthew69
Category:

less

Transcript and Presenter's Notes

Title: Opening Computational Door on Knock Knock Jokes


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 Whos 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
  • --Whos there?
  • --Water
  • --Water who?
  • --Water you doing tonight?
  • Type2 A wordplay on Line3
  • --Knock, Knock
  • --Whos there?
  • --Ashley
  • --Ashley who?
  • --Actually, I dont know.
  • Type3 A meaningful response to a wordplay of
    Line4
  • --Knock, Knock
  • --Whos there?
  • --Tank
  • --Tank who?

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 today end-of-sentence 1)

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 Whos 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 feel excited!

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
ifalixited 9.23
ifolixited 9.23
15
Step 2 Generation of Wordplay Sequences

ifelixited 10.0
iferixited 9.56
ifilixited 9.23
efelixited 9.23
ifalixited 9.23
ifolixited 9.23
16
Step 2 Generation of Wordplay Sequences
if el exited
ifelexited 9.23


17
Step 3 Wordplay Validation
if el exited
one word?
NO
YES
divide into pairs
if el el exited
each pair in bigram?
NO
YES
Step 4
Step 2
18
Step 2 Generation of Wordplay Sequences
i feel excited
ifeelexcited 7.x


19
Step 3 Wordplay Validation
i feel excited
one word?
NO
YES
divide into pairs
I feel feel excited
each pair in bigram?
NO
YES
Step 4
Step 2
20
Step 4 Last Sentence Validation 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
  • --Whos there?
  • --Ammonia
  • --Ammonia who?
  • --Ammonia

Ammonia Im only
--Knock, Knock --Whos 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
Write a Comment
User Comments (0)
About PowerShow.com