The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Haiku In The Wild

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Chad Fowler

Posts: 408
Nickname: chadfowler
Registered: Apr, 2003

A programmer, musician, and language addict.
Haiku In The Wild Posted: Feb 14, 2005 2:30 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Chad Fowler.
Original Post: Haiku In The Wild
Feed Title: ChadFowler.com
Feed URL: http://feeds2.feedburner.com/Chadfowlercom
Feed Description: Best practices, worst practices, and some generally obvious stuff about programming.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Chad Fowler
Latest Posts From ChadFowler.com

Advertisement
Tonight, Why posted some lovely Ruby haiku, which reminded me of a program I’ve been dreaming of writing for a few years now. So, I sat down and started it.

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.

Read: Haiku In The Wild

Topic: Catapult Wiki Exoskeleton Previous Topic   Next Topic Topic: Money is everything

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use