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 project name is an acronym for "System To Augment Non-speakers' Dialog Using Puns" and an allusion to standup comedy.)
[4][6][7] 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?
[8] 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 (2011).
Based on the incongruity theory of humor, it is suggested that the resulting meaningless but funny sentences are easier to remember.
Conversational systems which have been designed to take part in Turing test competitions generally have the ability to learn humorous anecdotes and jokes.