locilre ([info]locilre) wrote in [info]lojban,
@ 2007-09-03 11:56:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current music:Phuture 2000 (Radio Edit) - Carl Cox

Haiku Space
While I was having my morning coffee, I wondered if the lojban haiku-space was map-able. That is, how long would it take to have a program generate every possible lojban haiku, and then check it for grammatical correctness?



(Post a new comment)


[info]pne
2007-09-03 04:19 pm UTC (link)
That is, how long would it take to have a program generate every possible lojban haiku, and then check it for grammatical correctness?

Obviously this is only possible if you exclude fu'ivla, since they are not generatable.

However, you could generate all lujvo of up to seven syllables (in which list I'd include all gismu as a kind of degenerate lujvo consisting only of the long-form rafsi of one gismu) and combine those with the list of all cmavo and see what you come up with.

Generating all possible permutations of those sets of words and checking them for grammatical correctness would probably take approximately forever.

(Reply to this)(Thread)


[info]locilre
2007-09-03 04:51 pm UTC (link)
Yea - I'm guessing forever would be a reasonably good estimate. I think if we excluded a number of pathological cases such as all the seventeen syllable numbers, or strings, since that would account for a chunk of haiku space we could bring that time period down to the age of the universe :P

(Reply to this)(Parent)


[info]eienmeru
2007-09-03 04:27 pm UTC (link)
This is a curious idea. If I were a stronger Perlist, I might try it.

(Reply to this)(Thread)


[info]locilre
2007-09-03 04:51 pm UTC (link)
You're a curious idea, [info]eienmeru. Yeah this would take a little perl, some and some ingenuity.

(Reply to this)(Parent)


(Anonymous)
2007-09-03 04:54 pm UTC (link)
Problem 1: define Haiku. I've seen various ways of defining Haiku and that was just the number of syllables in each line. I think that we'd want each line to be a new sentence, but this might be disputed.

Problem 2: number the syllables of every word. For simplicity we can exclude loan-words. If we're going for 5-7-5 Haiku then we can stop forming compound words after 7 syllables. Since we're looking at the entire haiku-space then we will have a lot of nonsensical words, but from what I recall about haiku this won't be unusual.

Problem 3: take these words and form all possible sentences of length 5, 7, and 5. If we're starting lines 2 and 3 with .i then we must force this. Check that all sentences parse with jbofi'e, or a relative, perhaps. Then take all these sentences and arrange into all 5-7-5 haiku.

At least it's a finite space!

mu'o mi'e .cmacis.

(Reply to this)(Thread)


(Anonymous)
2007-09-09 04:27 pm UTC (link)
I've got through a few hurdles: I have python code that'll sometimes produce a good haiku. Now I just need the parser to split these into good haiku and bad haiku. Code follows. Needs cmavo.txt and gismu.txt which are just the cmavo and gismu lists with only the words (no definitions) and only containing gismu in the gismu list and only 3 or 4 letter cmavo in the cmavo list.

.u'u I'm a lousy coder.

http://pastie.caboo.se/95485

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…