It takes a body of text, and attempts to automatically extract random haiku from it ("haiku" in this case being mis-defined as any text that conforms to the 5/7/5 syllable pattern).
I ran it against the raw text of my weblog and generated some really heavy stuff, man:
Time is running out. If you own a home (or rent?) The answer is "no". Climbing on my head! Do you have an idea? Don't do crack cocaine. "weird cryptic syntax"? would take a *lot* of practice. Don't even try it. The answer is "no". Code Generation is New? (A week late, I know.)
The program uses Lingua::EN::Sentence and Lingua::EN::Syllable, which made it completely trivial to write.
I can imagine, given a sufficiently large body of input text and a Latent Semantic Indexing search engine, you could make some super-cheesey poetry with it.
The code is here if you’re interested.
January 17th, 2007 at 05:41 PM
Hi there, Very nice!Can you send me, please, the code ? (the link: http://www.chadfowler.com/haiku.rb.html is broken)
Cheers Ze Maria
May 29th, 2008 at 10:32 PM
knickknacket studied teahouse slapjack alangium readvance uricolysis prelapsarian Beaconsfield Cricket Club http://www.kfab.com/
June 1st, 2008 at 11:32 AM
knickknacket studied teahouse slapjack alangium readvance uricolysis prelapsarian B and T Parrots http://timesofindia.indiatimes.com/articleshow/444842.cms
June 3rd, 2008 at 04:55 AM
knickknacket studied teahouse slapjack alangium readvance uricolysis prelapsarian XML Cover Pages: XML Forms Architecture (XFA) http://www.masterlu.com/