Automatic Joke Generation cover image

Automatic Joke Generation

GOOFER, GAG and JokeJudger are three systems I created for my master's thesis about learning to automatically generate jokes from examples.

Table of Contents

GOOFER: Generator Of One-liners From Examples with Ratings

GOOFER is a framework that models a general pipeline for learning to generate jokes from example jokes. It is an extension of the generate-and-test principle by generalizing the typical template-and-schema approach used in other computational humor generators. With classic machine learning methods, it learns to recognize good patterns in jokes within particular templates and then produces similar jokes using this learned pattern.

goofer

JokeJudger: Platform for collecting jokes and ratings

Since there wasn't an appropriately large humorousness-rated joke dataset, I created a platform to collect jokes and ratings and called it JokeJudger. Because the GOOFER framework works with templates, we decided to collect only rated jokes for one template, namely analogy jokes. These jokes all fit the template "I like my X like I like my Y, Z". On the site, users were prompted with jokes and asked to rate them using 1 to 5 stars. They could also submit their own jokes and view the ratings they received.

Later in the research, generated jokes were uploaded alongside human-created jokes so they could be rated without users realizing they weren't created by hand. The collected jokes can be found here.

The main screen: rating jokes.
The main screen: rating jokes.
The create joke menu. A user could press "Challenge me" to already fill in some blanks.
The create joke menu. A user could press "Challenge me" to already fill in some blanks.
Users could also allow suggestions to be given when creating jokes. The platform would use Datamuse to find suitable words for that position.
Users could also allow suggestions to be given when creating jokes. The platform would use Datamuse to find suitable words for that position.
Users could view their performance of their jokes by viewing the distribution of ratings their jokes received.
Users could view their performance of their jokes by viewing the distribution of ratings their jokes received.
Users could view all new ratings for your jokes on the notification screen.
Users could view all new ratings for your jokes on the notification screen.
Users had a profile where they could see their achievements rank (how many jokes rated and created), and filter out jokes labeled as offensive.
Users had a profile where they could see their achievements rank (how many jokes rated and created), and filter out jokes labeled as offensive.
The best rated jokes of the week, month and all time were presented in the Hall of Fame.
The best rated jokes of the week, month and all time were presented in the Hall of Fame.

GAG: Generalised Analogy Generator

GAG (Generalised Analogy Generator) is an analogy joke generator. It uses the GOOFER framework but strips its template extraction components due to only handling one type of joke template.

The system uses the analogy jokes collected on JokeJudger to learn to distinguish the relations between words in a good analogy joke from a bad analogy joke. Afterwards, it generates millions of jokes and tries to identify the jokes that its test algorithm considers good.

In our evaluation (on JokeJudger), we showed that it was able to generate funny jokes half as frequently as humans did.

Evaluation of the jokes. The classifier algorithm outperformed the regression algorithm. The generated jokes were half as often as funny as human-created jokes with the exact same constraints (only one word per slot).
Evaluation of the jokes. The classifier algorithm outperformed the regression algorithm. The generated jokes were half as often as funny as human-created jokes with the exact same constraints (only one word per slot).

🍒 Generated Jokes

Here is a selection of jokes generated by the algorithm:

  • I like my coffee like I like my myself: hot.
  • I like my coffee like I like my sleep: strong.
  • I like my men like I like my graves: nameless.
  • I like my coffee like I like my country: cold.
  • I like my men like I like my society: heartless.
  • I like my women like I like my buildings: tall.
  • I like my women like I like my tests: independent.
  • I like my women like I like my questions: silly.
  • I like my men like I like my rain: gentle.
  • I like my women like I like my laughter: silly.
  • I like my computer like I like my affection: personal.
  • I like my computer like I like my argument: personal.
View Automatic Joke Generation
Back to projects