Madlib

a toy to analyze and generate text
Madlib - Insult Generator - Compliment Generator - Pick-Up Line Generator - Euphemism Generator

About

Madlib is a collection of programs for analyzing and randomly generating text. In its simplest form, it can be used to play a game similar to the classic "Mad Libs" game by Roger Price and Leonard Stern. However, it can be used for much more complex tasks, and is capable of generating phrases in any context-free grammar.

The main difference between the original Mad Libs game and this program is that instead of filling in the blanks in someone else's story, you write the story and create a dictionary, and the program fills in the blanks. This is not incredibly useful for the original game, but does a great job of generating phrases which require several levels of blank-filling.

An easier way to think of this is in terms of templates. You create templates, and the madlib program will fill them in for you. These templates can refer to each other in any way you like, and the results are usually unpredictable.

Madlib

MadLib generates random phrases based on a formal context-free grammar. It can give you random insults, compliments, and a lot more.

Here is an example of a recursively generated phrase. Each line represents the state of the phrase after one more "blank" has been filled. I have bolded each part which differs from the line above.
	__START__
	\u__insult__
	\u__phrase__!
	\u__familyphrase__!
	\uyour __family__ iswas __somethingbad__!
	\uyour __family__ was __somethingbad__!
	\uyour __family__ was a/an __adj__ __noun__!
	\uyour __family__ was a/an __adj__ hog liver!
	\uyour father was a/an __adj__ hog liver!
	\uyour father was a/an over-ripe hog liver!
	\uyour father was an over-ripe hog liver!
	Your father was an over-ripe hog liver!
	Your father was an over-ripe hog liver!
	
So, after a few iterations and random choices, it creates an insult by filling in blanks until there are no more blanks to fill.

Babble

Babble analyzes text and generates a grammar file for MadLib. This lets you imitate text but create completely different meanings. It will speak in a manner similar to its input, but combine words and phrases in unusual and unpredictable ways.

For example, I fed "The Steakhouse Incident", a disgusting but funny tale, through babble. And when I asked it to imitate, it told me things such as this:
Therefore, bending over resulted in a standing ovation. Oh, did I asked her, I'm sure she probably should have always considered myself as relatively stable gravitationally, but vomiting takes precidence over shit wave was no fucking toilet seat. My attention was thus diverted.
This result is pretty typical in several ways:
  • It has grammatical errors. The program does not understand grammar in the same sense we do; it does not understand natural language. It only knows, statistically, which words and phrases tend to go together.
  • It says things I probably would not have thought of on my own. I have heard it said that humor is based on incongruity, and Babble is all about incongruity. By combining unlikely concepts, it creates things which often end up being funny.
  • It sounds like the original author, in terms of lexical texture. So, on a small scale, it is a good imitation. But on a larger scale, it is just rubbish.
  • The content doesn't really make sense. Because, after all, it is just babble. It simply combines concepts randomly according to their statistic proximity.

Warble

Warble analyzes a word list and generates a grammar to imitate the spellings used in that word list. If I feed it an english spelling dictionary, this will cause it to create english-like words.
Madlib - Insult Generator - Compliment Generator - Pick-Up Line Generator - Euphemism Generator
Last modified: May 06, 2011 @ 10:32 MDT
Copyright (C) 1996-2017 Selene Scriven