This project is a program that generates random text that resembles a source document. The technique is called a Markov model, which is a statistical model that generates text based on the probability of a word following another word.

Example Output

Here is text generated from some of Dr. Seuss’s books:

Then we saw one kite! We saw ALL the things are everywhere.
Why are they sad and bad? I do not like it. Not one little bit!”
“Have no dear, little star.
Say! Look at me! Look at me now!” said the cat. “I will see something new. I will have to know how.

And this comes from Shakespeare’s Much Ado About Nothing:

LEONATO.
Take their examination these men.

FIRST WATCH.
This is all.

CLAUDIO.
How know you by your daughter?

CLAUDIO.
Can the working this, and then, with public
accusation, and my name is Conrade.

DOGBERRY.
Is our whole dissembly appeared?

VERGES.
Yes, I thank her; that she brought Count Claudio may hear, for what I have said against Benedick,
my dear friend Leonato of the matter: that’s the
scene that I was the prince’s
subjects.