Join 3,572 readers in helping fund MetaFilter (Hide)

Haiku Finder
September 14, 2009 9:03 PM   Subscribe

Haiku Finder
This thingy looks for sentences or groups of sentences whose words fall in groups of 5, 7, and 5 syllables. It follows a few simple rules to discard obviously awkward breaks, although it still lets some through. Paste in the text of a book from the Gutenberg project, a transcript of an interview, speech or deposition, or some dry legal document to find the soul within.

There's also an "API" at http://mrfeinberg.com/haikufinder/text (POST with single param, "text"), for those whose browsers balk at pasting, say, the complete text of Ulysses into the textarea.
posted by e.e. coli (10 comments total) 6 users marked this as a favorite
This project was posted to MetaFilter by mdn on September 16, 2009: Haiku Finder

Magnificent.
Rumsfeld: As I said,
it is from the people I've
talked to. The building?

And I don't know why
you got the contradiction.
I can't explain that.

posted by Fiasco da Gama at 9:54 PM on September 14, 2009


I should mention that I've made the Python source code available:

http://github.com/jdf/haikufinder

It comes with a "findhaikus" script that you can run any file (or stdin) through, so... you know, go to town!
posted by e.e. coli at 6:07 AM on September 15, 2009


I loved the MU message.
posted by lipsum at 8:58 AM on September 15, 2009


When we speak of free
software, we are referring
to freedom, not price.


Cool! Very neat. Off to find the Treaty of Westphalia.
posted by never used baby shoes at 4:19 PM on September 15, 2009


I can't get this to work at all. I pasted in varying lengths of text from lots of dry, boring articles. Is there some length of text needed? How long?
posted by bluefly at 5:15 PM on September 16, 2009


I'm guessing it's because of the amount of syllables in the words being pasted, since it'd be more difficult to fit words of, say, four syllables in the haiku format if they're also surrounded with other longish polysyllabic words. Or maybe not even longish words, just ones of even-numbered syllables.
posted by cobwebberies at 11:28 PM on September 16, 2009


@bluefly It's a matter of (length x writing style). For some reason, literature tends to work pretty well. I've just extracted a bunch of haikus from tweets, which are pretty amusing.

everything happens
    the week i don't have access
to the outside world.

BAD IDEA, BAD
    IDEA, BAD IDEA.
I'm in a puddle.

Did u catch Whoopi
    talking bout Patrick Swayze
today on the View?

Just think to yourself
    how many have died so far...
add Patrick Swayze.

Wait. Swayze is dead?
    WHAT ABOUT HIS TV SHOW?
HE'S ON TV NOW!
posted by e.e. coli at 10:42 AM on September 17, 2009


A minor and frequent mistake, but the plural of haiku is just - haiku.
Just so you know. :)
posted by troubles at 2:16 PM on September 17, 2009


pl. haiku also -kus, mofo!
posted by e.e. coli at 6:57 PM on September 17, 2009


I tried this with Virginia Woolf (The Voyage Out) and the results were excellent:

The woman asked me
if I thought her husband looked
like a gentleman!

I don't suppose there's
been so good an opening
since the days of Pitt.

Still, on the whole, I'd
rather live without them than
without Jane Austen.

Thus, if you have hills
you ought to have a river;
if a river, hills.

One gets used to no
trees, though much too bare at first.
Cards after dinner.

posted by verstegan at 5:51 AM on September 19, 2009


« Older A Squid on the Ice...   |   ROVER DO! How Cool is Your Dog... Newer »


You are not currently logged in. Log in or create a new account to post comments.