Computational humor


Computational humor is a branch of computational linguistics and artificial intelligence which uses computers in humor research. It is a relatively new area, with the first dedicated conference organized in 1996.
The first "computer model of a sense of humor" was suggested by
Suslov as early as 1992.
Investigation of the general scheme of the information processing show a possibility
of a specific malfunction, conditioned by the necessity of a quick deletion from
consciousness of a false version. This specific malfunction can be identified
with a humorous effect on the psychological grounds; however, an essentially new ingredient, a role of timing, is added to a well known role of ambiguity. In biological systems,
a sense of humour inevitably develops in the course of evolution, because
its biological function consists in quickening the transmission of processed
information into consciousness and in a more effective use of brain resources.
A realization of this algorithm in neural networks
explains naturally the mechanism of laughter: deletion of a false version corresponds to zeroing of some part of the neural network and excessive energy of neurons is thrown out to the motor cortex, arousing muscular contractions.
Unfortunately, a practical realization of this algorithm needs extensive databases, whose creation in the automatic regime was suggested only recently
As a result, this magistral direction was not developed properly and subsequent investigations accepted somewhat specialized colouring.

Joke generators

Pun generation

An approach to analysis of humor is classification of jokes. A further step is an attempt to generate jokes basing on the rules that underlie classification.
Simple prototypes for computer pun generation were reported in the early 1990s, based on a natural language generator program, VINCI. Graeme Ritchie and Kim Binsted in their 1994 research paper described a computer program, JAPE, designed to generate question-answer-type puns from a general, i.e., non-humorous, lexicon. Some examples produced by JAPE are:
Since then the approach has been improved, and the latest report, dated 2007, describes the STANDUP joke generator, implemented in the Java programming language. The STANDUP generator was tested on children within the framework of analyzing its usability for language skills development for children with communication disabilities, e.g., because of cerebral palsy. Children responded to this "language playground" with enthusiasm, and showed marked improvement on certain types of language tests.

The two young people, who used the system over a ten-week period, regaled their peers, staff, family and neighbors with jokes such as: "What do you call a spicy missile? A hot shot!" Their joy and enthusiasm at entertaining others was inspirational.

Other

Stock and Strapparava described a program to generate funny acronyms.

Joke recognition

A statistical machine learning algorithm to detect whether a sentence contained a "That's what she said" double entendre was developed by Kiddon and Brun. There is an open-source Python implementation of Kiddon & Brun's TWSS system.
A program to recognize knock-knock jokes was reported by Taylor and Mazlack. This kind of research is important in analysis of human–computer interaction.
An application of machine learning techniques for the distinguishing of joke texts from non-jokes was described by Mihalcea and Strapparava.
Takizawa et al. reported on a heuristic program for detecting puns in the Japanese language.

Applications

A possible application for assistance in language acquisition is described in the section "Pun generation". Another envisioned use of joke generators is in cases of a steady supply of jokes where quantity is more important than quality. Another obvious, yet remote, direction is automated joke appreciation.
It is known that humans interact with computers in ways similar to interacting with other humans that may be described in terms of personality, politeness, flattery, and in-group favoritism. Therefore, the role of humor in human–computer interaction is being investigated. In particular, humor generation in user interface to ease communications with computers was suggested.
Craig McDonough implemented the Mnemonic Sentence Generator, which converts passwords into humorous sentences. Based on the incongruity theory of humor, it is suggested that the resulting meaningless but funny sentences are easier to remember. For example, the password AjQA3Jtv is converted into "Arafat joined Quayle's Ant, while TARAR Jeopardized thurmond's vase," an example chosen by combining politicians names with verbs and common nouns.

Related research

John Allen Paulos is known for his interest in mathematical foundations of humor. His book Mathematics and Humor: A Study of the Logic of Humor demonstrates structures common to humor and formal sciences and develops a mathematical model of jokes based on catastrophe theory.
Conversational systems which have been designed to take part in Turing test competitions generally have the ability to learn humorous anecdotes and jokes. Because many people regard humor as something particular to humans, its appearance in conversation can be quite useful in convincing a human interrogator that a hidden entity, which could be a machine or a human, is in fact a human.