Utility Mill

Markov_Chain_Parody_Text_Generator

Give it a body of text and get some random yet sensical text back


Output


Instructions / Discussion

What is it?

From the creator's website:

Mark V. Shaney is a Python script which takes in a typically fairly large body of text and generates another [smaller] body of text which resembles the original, usually with hilarious side-effects. Mark V. Shaney was first written by Bruce Ellis.

More from Wikipedia

How does it work?

Also from the creator's website:

Roughly speaking, this script first finds all 3-word groups within the given text. Then it builds sentences by taking the last two words currently in the current sentence being built and finding a valid word to add on to the end . A word is valid if it, along with the current last 2 words, completes a 3-word group found in the given text. Therefore, sentences will appear to have local structure. However, as a whole, these sentences will typically come out as complete nonsense. This process is known as a Markov Chain (Mark V. Shaney, get it?).

The code I based this utility off of originally comes from here.

Default text is courtesy of the Declaration of Independence.

Usage Notes

The longer the text body you enter the better. You'll probably want to keep it under 10,000 words or so to keep things snappy.

Utility Mill is another wonderful Blended Technologies project.

copyright, owned and operated by Blended Technologies LLC.

Powered by Python and the ineffable Web.py