Archive for April 27th, 2013

Haiku Detector Update


On Monday I posted a quick-and-dirty Haiku Detector Mac application I’d written which finds haiku (in terms of syllable counts and line breaks, not aesthetics) in any given text. Since then I’ve made it less dirty and maybe more quick. It now shows progress when it’s busy looking for haiku in a long text, and gives you a count of the sentences it looked at and the haiku it found. You can also copy all the haiku (Copy All Haiku in the Edit menu) or save them to a file (Save in the File menu.) Here’s where you can download the new version, which should still work on Mac OS X 10.6 and later. And here are a few more haiku I’ve found with it.

There’s only one (not counting a by-line) in the feature articles of the April 27 edition of New Scientist:

Inside a cosy
new gut the eggs hatch and the
cycle continues.

From Flatland: a romance of many dimensions, by Edwin Abbott Abbott:

On the reply to
this question I am ready
to stake everything.

“I come,” said he, “to
proclaim that there is a land
of Three Dimensions.”

Man, woman, child, thing—
each as a Point to the eye
of a Linelander.

This was the Climax,
the Paradise, of my strange
eventful History.

Here are a few more from Flatland which I’m editing this post to add, since I liked them more on the second reading:

Let us begin by
casting back a glance at the
region whence you came.

Therefore, pray have done
with this trifling, and let us
return to business.

Even if I were
a baby, I could not be
so absurd as that.

From Last Chance to See, by Douglas Adams and Mark Carwardine, which I somehow ended up with a text file of many years ago and eventually got a book of:

I’ve been here for five
days and I’m still waiting for
something to go right.

We each went off to
our respective rooms and sat
in our separate heaps.

They’re nocturnal birds
and therefore very hard to
find during the day.

It looked like a great
horn-plated tin opener
welded to its face.

We keep searching for
more females, but we doubt if
there are any more.

The very laws of
physics are telling you how
far you are from home.

Foreigners are not
allowed to drive in China,
and you can see why.

`Just the one left,’ she
said, putting it down on the
ground in front of her.

Yet it was hunted
to extinction in little
more than fifty years.

And conservation
is very much in tune with
our own survival.

And here’s my own haiku about a particularly amusing passage in that book:

Here Douglas Adams
trudges through his anagram:
Sago mud salad.

Charles Darwin’s most popular work, The Formation of Vegetable Mould Through the Action of Worms with Observations on their Habits, only contained 12 mostly-lacklustre haiku, but I like to think this one is a metaphor:

Worms do not always
eject their castings on the
surface of the ground.

Something about lack of worm castings being only skin-deep.

But most of these don’t mention nature or seasons, as haiku should. So here are some from Sylva, or A Discourse of Forest Trees:

Dieu, and thence rode to
Blois and on to Tours, where he
stayed till the autumn.

How graphic, and how
refreshing, is the pithy
point thus neatly scored—

Meteorology, or Weather Explained, by J.G. M’Pherson contains some very poetic-sounding unintentional haiku:

“It’ll pe aither
ferry wat, or mohr rain”—a
poor consolation!

“Beware of rain” when
the sheep are restive, rubbing
themselves on tree stumps.

The brilliant flame, as
well as the smoky flame, is
a fog-producer.

Till ten o’clock the
sun was not seen, and there was
no blue in the sky.

But, strange to say, there
is a healing virtue in
breathing different air.

There is much pleasure
in verifying such an
interesting problem.

Unfortunately, there are no haiku in Dijkstra’s ‘Go To Statement Considered Harmful‘.

The app still uses a lot of memory if you process a novel or two, and may have trouble saving files in that case; It looks like it’s a bug in the speech synthesis library (or my use of it) or simply a caching strategy that doesn’t work well when the library is used in this rather unusual and intensive way. Anyway, if you ever try to save a file and the Save dialog doesn’t appear, try copying instead, and relaunch the program.

Next I think I’ll experiment with finding the best haiku based on the parts of speech at the ends of lines. But first, I’d better start working on the thing I’ve plan to do for the six of hearts.

If you’ve found any nice unintentional haiku, or if you can’t run Haiku Detector yourself but have ideas for freely-available texts it could be run on, let me know in the comments.

, , , , , , , , ,

10 Comments