2006-02-13

Not long is how long that this rhyme took me

Update: The first generation of this program is now obsolete.

So, I wrote a program called Ranyoushuu that writes semi-random waka according to a style it learnt from reading the entire Manyoushuu. It produces remarkably believable lines, given that all it knows is:

  • The chance each character has of being the very first character in a waka
  • The chance each character has of following any other given character, within a ku
  • The chance each character has of being the first character in a ku (except the first ku), given the last character of the previous ku
  • The chance each character has of being the second-last character in a waka, given the third-last character. (New!)
  • The chance each character has of being the very last character in a waka, given the second-last character.

Knowing these things, of course, we can produce the Most Likely Waka -- the Pythagorean (and Platonic!) Ideal of the waka, the sequence of Most Likely Characters produced when we ignore meaning entirely. And it is:

あらなくも
あらなくものの
あらなくも
あらなくものの
あらなくものを

Relentless, machine-like negativity, with a twist of wist at the end: waka, I unmask thee!

Popularity factor: 10

Anonymous:

Very cute idea! :)

The colour of the "ranyoushuu" header doesn't display correctly in my browser, because you forgot the hash sign in front of the hex tripplet. It should be '#FFDDD9' not 'FFDDD9', and so on.

(See http://www.w3.org/TR/CSS1#color-units for details)


Matt:

Fixed! Thanks.


IbaDaiRon:

Curses!

OK, then ... on to Version 3.0 of WakaBot (which was the in-progress Version 2.0 of Borgesian Tanka).

(sigh)


Nathan:

http://www5.ocn.ne.jp/~sanai/column/04haiku.html


amida:

Matt- Is this what is known as a Markov Chain?


Matt:

After looking up "Markov Chain" in Wikipedia, I think so. The character at waka position P+1 is dependent only on the character at waka position P. (The only other ingredients are the rules [structure of a waka, observed distributions of characters in the Manyoushuu itself] and a random number.)

Put another way, it only has a one-step memory: once character P+1 is determined, character P is immediately forgotten and is not taken into account in any way when determining character P+2.


Matt:

Nathan: thanks! Interesting...

IDR: Don't worry, the holy grail of semi-random Waka that incorporate actual kanji remains untouched!


language:

Could you provide a translation for those of us playing along at home without actual knowledge of Japanese?


Matt:

"aranaku ni" is a common ending of MYS waka meaning "alas, there isn't any [something]" or "if only there was [something]", etc. "aranaku mo" might mean something like "even though there isn't [something]" or "there really isn't [something]", I suppose. "mono no" means "but..." and "mono wo" means "[it is this way] but if only it were..." (all of these are totally subject to context, of course.)

I don't think you can parse that poem into something sensible, but the repeated variations on "there isn't" struck me as amusing.


language:

Domo arigato gozaimashita!

Comment season is closed.