opening computational door on knock knock jokes l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Opening Computational Door on Knock Knock Jokes PowerPoint Presentation
Download Presentation
Opening Computational Door on Knock Knock Jokes

Loading in 2 Seconds...

play fullscreen
1 / 26

Opening Computational Door on Knock Knock Jokes - PowerPoint PPT Presentation


  • 436 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Opening Computational Door on Knock Knock Jokes' - niveditha


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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
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
restricted domain knock knock jokes
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
restricted domain knock knock jokes4
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.

experimental design
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
similarity table
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

training corpus
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)

how it works
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
step 1 joke format validation
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!
step 2 generation of wordplay sequences
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

step 2 generation of wordplay sequences11
Step 2: Generation of Wordplay Sequences

ifelixited

10.0

efelixited

9.23

step 2 generation of wordplay sequences12
Step 2: Generation of Wordplay Sequences

ifelixited

10.0

efelixited

9.23

ifilixited

9.23

ifalixited

9.23

ifolixited

9.23

step 2 generation of wordplay sequences13
Step 2: Generation of Wordplay Sequences

ifelixited

10.0

efelixited

9.23

ifilixited

9.23

ifalixited

9.23

ifolixited

9.23

iferixited

9.56

step 2 generation of wordplay sequences14
Step 2: Generation of Wordplay Sequences

ifelixited

10.0

efelixited

9.23

ifilixited

9.23

iferixited

9.56

ifolixited

9.23

ifalixited

9.23

step 2 generation of wordplay sequences15
Step 2: Generation of Wordplay Sequences

ifelixited

10.0

iferixited

9.56

ifilixited

9.23

efelixited

9.23

ifolixited

9.23

ifalixited

9.23

step 2 generation of wordplay sequences16
Step 2: Generation of Wordplay Sequences

if el exited

ifelexited

9.23

***

***

***

***

step 3 wordplay validation
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

step 2 generation of wordplay sequences18
Step 2: Generation of Wordplay Sequences

i feel excited

ifeelexcited

7.x

***

***

***

***

step 3 wordplay validation19
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

step 4 last sentence validation with wordplay
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
step 4 last sentence validation with wordplay21
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

step 4 last sentence generation with wordplay
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

knock knock joke generation
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
results
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
possible enhancements
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
conclusion
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