Random Haiku goes to the next level
For many years, I've been offering random haiku poems via my Little Pagoda of Random Haiku, at http://www.randomhaiku.com/. It started as an experiment with using FSObjects to pass values between Flash and Javascript, then evolved as I built a random haiku generator, added some animation, and finally hooked up a voice synthesizer to read the poem aloud. It looks simple, but underneath there are about 6 layers of technology involved. It's cool, but has never really gained the popularity it deserves.
There is a good reason why. It was built to work in IE4. And it still does. Unfortunately, it doesn't behave in IE5, 6, 7, Firefox, Opera, Safari, Netscape, or any other browser that people typically use today. And I haven't had time to redo the whole thing - if I did, I might have scrapped the Javascript layer and rejigged the grammar engine in native Actionscript.
The little Pagoda lived at Rob Ring's site for a while, which explains the faint watermark in the background that says "ROB ____ T ORG". Yet another thing that I never bothered fixing.
A while back, I had a few hours to spare and realizing that my loyal haiku enthusiasts were being neglected, I decided to take my grammar engine and port it over to PHP. Now I have a working version of the poem generator on the server, and better yet: it can generate random poetry as XML.
See an example:
http://www.randomhaiku.com/haiku.xml
Reload the page a few times, and you'll see it really is a randomly generated poem with the 5-7-5 syllabic structure.
Granted, the lexicon it's using is fairly small right now. The words "flattery" and "existence" pop up a little too often for my liking. So to remedy that I've recently acquired a 120,000 word English lexicon, categorized by grammar taxonomy (adjective, noun, verb, gerund, conjunction, etc). It will need a lot of cleaning up, and then I have to fill in a column with the number of syllables in each word. Any volunteers?
A future version (in my dreams) will allow you - yes you! - to upload your own lexicon, or choose from a selection of jargon- and industry-specific word lists. Need a random haiku on your knitting blog? Choose the knitting theme... need a random haiku about Rock Music? I'll put together a few sample lexica for just those occasions.
The plan to publicize RandomHaiku 2.0 is to offer it as a web service, complete with an API for XML, JSON, and a Javascript plug-n-play widget that people can paste easily onto their own site, blog or MySpace page. That may take time, since I seem to devote free time to typing these blog posts instead of actually finishing my personal projects. When it is ready, I'll post a notice here and a hundred other places.
In the mean time, if you need a random haiku as XML, come and get it.
Filed under Uncategorized





