COMPUTATIONAL HUMOUR
Siddhartha GNaga VarunSachin R
OVERVIEW
Introduction Motivation Humor Recognition and Classification STANDUP Humor generating application Computer Model of ‘Sense of Humor’ Conclusion
INTRODUCTION
Introduction
Computational Humor is a branch of computational linguistics and Artificial intelligence which uses computers in humor research.
It is a relatively new area in AI with its first dedicated conference starting in 1992.
Suslov did some of the earliest research in Computational humor. He proposed a scheme which describes human perception of information and emotions in the form of a computer model.
Motivation
Humor is AI-complete A problem is AI-complete when difficulty of solving it is equivalent to that of solving
the central artificial intelligence problem – making computers as intelligent as people
Good quality humor requires decent understanding of situations and normally it is the privilege of talented individuals who Recognize appropriate situations Choose appropriate kind of humor Generate humor Interact, control and evaluate feedback
Computers should be able to interact like humans and as humor forms one of the integral part of everyday interaction between human beings, to reach the ultimate goal, computers should be able to react to humor as we do
Overview
In our presentation we present pure machine learning techniques in the first part and discuss Suslov’s model of making a computer sense humor like a human
The basic difference between these techniques is that in the normal machine learning techniques we manually define some sentences as humorous, and proceed to recognize and build new humorous sentences
Suslov’s model tries to make a computer sense humour like a human. In this model, humor is interpreted as a specific malfunction in the course of information processing.
HUMOR RECOGNITION & CLASSIFICATION
Humor recognition
Humor in real life can be of different forms They can be of short sentences like one-liners, knock knock conversations,
puns One-liner is short sentence with comic effects which have simple syntax
with creative language construction and generally include alliteration or rhyming
Example : I get enough exercise just pushing my luck They can be long passages
Recognition and classification of large texts is hard since it involves a lot of scene planning while One-liners and knock knock conversations are easy to handle for their simple structure
For the most of humor recognition techniques that follow are studies conducted on one-liners
Collection of Data (one-liners)
Collection of Non humorous Data Proverbs (online proverb collection)
Example: creativity is more important than knowledge British National Corpus sentences (BNC)
Collection of Humorous Data Web search Boot strapping algorithm
Collection of One-liners - Algorithm
Seed one-liners
Web search
Stylistic constraint
Thematic constraint?
Candidate PagesYes? Yes?
Atleast one of selected keywords must be in the url
Example Key words Oneliner Humor Humour Joke Funny
Example site http://berro.com/Jokes
Identify enumerations having the seed one-liner Enumerations
generally contain texts of similar genre
Example Elements inside
tags <li> </li> with one of the list item a one-liner generally contain one-liner
Humor classification and Recognition
There are many types of Humor Anecdotes, Insult, Irony, Self deprecation, Word play, Vulgarity, Alliterations etc
Alliteration Word repetition and rhyme produce comic effect Example: Peter Piper picked a peck of pickled peppers Recognition is done by counting number of alliteration/rhyme chains using CMU
pronunciation dictionary Antonymy
Appears generally in many humor types since many include incongruity, opposition or other forms of contradiction
Example: A clean desk is a sign of cluttered desk drawer Recognition is done by using lexical resource WORDNET and antonym relation between
all nouns, adjectives and verbs are identified
Humor classification and Recognition - cont
Adult Slang Humor based on adult slang is very popular Recognized by counting number of lexicons that are labeled with domain
sexuality in WORDNET Some results after examination of one-liners revealed that
they seem to make frequent use of words such as man, woman, person, you, I etc
they include negative word forms such as doesn’t, isn’t, don’t, wrong, bad etc
Using this experimental data, given a text of one-liners, they are checked for different forms of humor, like alliteration, using their respective recognition techniques and whether the text is humorous or not is determined
Experimental Results
Different characteristics like Alliteration, anonymity are recognized both in humorous data and non-humorous data using the recognition techniques
It is observed that 96% of humorous one-liners have alliteration while non humorous data have 70%
Similar observations are made for other characteristics and these metrics are used to decide the probability of whether an unknown text is humorous
Knock, Knock joke Recognition
Similar research is done to recognize knock knock jokes and identify wordplay in them. Typical process involves Joke format validation Word play sequence validation Last sentence validation
Knock knock Who’s thereWaterWater who?Water you doing tonight
Here keyword ‘water’ is recognized and by analyzing last sentence it finds the expected word ‘what are’
and checks the similar-to relationship between them before confirming it as
a wordplay
HUMOR GENERATION
Early experiments - JAPE
JAPE - Joke Analysis and Production Engine Designed by Greame Ritchie and Binsted in 1994 to generate Q&A puns Examples:
Q: What do you call a strange market? A: A bizarre bazaar
Limitations Non interactive with entire choice of schema, lexicons internal to system Available only to knowledgeable researcher High response time
STANDUP
System To Augment Non-speakers Dialogue Using Puns Working application based on JAPE developed using JAVA in 2007
User interface guides the user through process of creating 11 types of jokes Subject specific jokes Difference b/n jokes Similar sounding word jokes etc
Example: Q: What is difference between leaves and a car? A: One you brush and rake, the other you rush and brake
There are mainly three stages in STANDUP joke generation Schemas Description rules templates
OVERVIEW OF BACK-END
Choose related items for an answer
Choose appropriate items for question
Insert items into textual forms
Riddle
Schemas
Dictionary
Description Rules
Text templates
USER CONSTRAINTS
Explanation through an example
Q: What do you call a cry that has pixelsA: A computer Scream
Question TypeCan be decided by user
itself
SCHEMAS
There are 11 schemas in STANDUP. A typical schema is as follows
► Header: newelan(NP, A, B, HomB)
► Lexical Preconditions : homophone(B, HomB), noun(HomB)
Computer Screen
Computer A
Screen B
Within the current threshold for phonetic similarity
scream and screen HomB B
Description Rules► Question specifications: shareproperties(NP, HomB)
Computer Screen Scream
Synonym(Y,synY)Meronym(X,merX)
Synonym(Scream, synY)
Cry
Meronym(Computer Screen, merX)
Pixels
Surface Template► Template Specifier: [merHyp, merX, synY]
What all we have till now
ComputerScreenScream
Crypixels
Answer
Question terms
Q: What do you call a cry that has pixelsA: A computer Scream
Question TypeCan be decided by user
itself
Success of STANDUP
The UI application is used to help physically disable children who don’t interact with other children
Children enjoyed using STANDUP, they interacted with other children by telling them jokes and even explaining how they are formed using STANDUP
STANDUP is considered by many scientists as an advancement in transformational creativity
COMPUTER MODEL OF ‘SENSE OF HUMOR’
Introduction
The central viewpoint: the humorous effect is a consequence of the ”commutation” or exchange of two mutually exclusive images (versions or estimates) in the human consciousness.
For example, consider the following joke: The horse tradesman: “If you mount this horse at 4 in the morning then at 7
in the morning you will be at Mumbai.” The customer: ”But what shall I do in Mumbai at 7 in the morning?”
Here the tradesman intends to tell about the horse speed but the customer thinks that he is telling how to reach Mumbai by 7 in the morning. This causes a commutation of two views in the brain of third person giving rise to humor in this case.
Information Processing
We begin the formulation of the computer model of ”a sense of humor” by analyzing information processing.
Suppose that a succession of symbols A1 , A2 , A3 , . . . (”text”) is introduced from the outside world to the brain (visual or auditory)
In the brain a set of images or meanings is put in correspondence to each word.
The problem of information processing consists in choosing one image or meaning from the set associated with each symbol.
Information Processing - cont
A1 A2 A3 An
B1 B2 Bn
B1(i1) B2(i6) Bn(ik)
Information Processing - cont
The algorithm of information processing consists in the following: all possible trajectories in the image space are constructed a certain probability is ascribed to each trajectory on the basis of the
information on the correlation of images stored in memory the most probable trajectory is chosen
The number of operations required for the realization of any algorithm of such type increases exponentially with the length of the text
So only fragments of the text containing no more than a certain number (N) of symbols can be immediately treated by such a method
Information Processing - cont
The longer texts can be processed as follows: During the processing of the first N symbols not one but several (M)
of the most probable trajectories are remembered When the next symbol arrives, for each of the M conserved
trajectories all possible continuations are constructed Then again M of the most probable trajectories are conserved and so
on
N M
Information processing - cont
B is where all trajectories converge to a single point and we have a definite understanding at this point. C is the point where the subconscious starts sending what it understood to the conscious.
A
(Start of all trajectories)
TAC
C
D
B
Humorous effect
Humorous effect - cont
The delay of point C with respect to front A results in the time interval TAC during which the information introduced to the brain does not appear in the consciousness.
The interval AC have the upper bound Tmax on the time scale. if TAB > Tmax
Then TAC = Tmax and text is interpreted incorrectly Correct interpretation trajectory is sent later to consciousness
causing humor sensation If TAB < Tmax
TAC = TAB and correct interpretation is sent
Humorous effect - cont
The described specific malfunction can be identified with ”a humorous effect”.
Consider this process applied to perception of the joke given previously.
When the horse tradesman says: “If you mount this horse at 4 in the morning then at 7 in the morning you will be at Mumbai.” two versions arise in subconscious, that he is telling about the speed of horse or he is telling how to reach Mumbai.
For many people, the first version seems to be more probable. When the customer says “But what shall I do in Mumbai at 7 in the
morning?”, the probability of second version is increased and when these two versions commute, humorous effect arises.
Humorous effect - cont
We can say that different susceptibility of people to humour is connected with the differences in the delay Tmax.
People with large Tmax seldom laugh because point C seldom outruns point B.
Conversely, people with small Tmax are aware of a humorous effect even in cases that most people do not see as funny.
Applying Suslov model
Computer is given a Tmax of a normal person Each word is given a set of images, trajectories are drawn,
highest probable trajectory is selected and using Tmax humor is sensed
Limitations There are many options of images for a given word Calculating probabilities of these word is done using determined data
but is still a hard task Experiments are done using ideal languages, using a real life
language includes many complications
CONCLUSIONS
Computational humor is new area which is growing everyday Humor recognition techniques are to be developed so that humor
data can be analyzed more precisely Computer model of sense of humor should be developed to
create a practical working model Using this model and Humor generation techniques, computer
can analyze when to generate humor and might even evaluate the feedback
References
I.M.Suslov, Computer Model of "a Sense of Humour". I. General Algorithm. Biofizika SSSR 37, 318 (1992) [Biophysics 37, 242 (1992)]
Rada Mihalcea, Carlo Strapparava: Making Computers Laugh: Investigations in Automatic Humor Recognition. HLT/EMNLP 2005
Ritchie, G., Manurung, R., Pain, H., Waller, A., Black, R., & O’Mara, D. (2007). A practical application of computational humour. In Proceedings of the 4th International Joint Conference on Computational Creativity (pp. 91-98).
THANK YOU