RSS Amplifier

Donat Studios · Sep 23, 2010

Statistics Based Lorem Ipsum Generator

0
Sign in to vote or save

Jesse G. Donat · Donat Studios

It strikes me now, many years later, that what I'd built was essentially a PHP markov chain

Several months ago I was wondering to myself if you could detect patterns in a list of words and then use those patterns to generate a new list of fake “words”. A kind of a flavored Lorem Ipsum generator, where I could change the feel of the sentences by switching out the data set.  I’m sure thousands of developers have done this before me – but it was a fun thought experiment.

I threw together a little script in PHP to test the idea, and the results were kind of interesting so I figured I'd throw it on my site - Anyway, here are some examples in action – you can hit reload for a random ipsum!  The code and a sample dataset are below.

You need to supply a set of words for it to base the pattern off - here is my sample dataset.


Read the original on donatstudios.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.