Peter's Haiku Generator: Background Information
The rules are given below. If you're not familiar with the format, then:
<sentence> = <single sentence>[<conjunction><single sentence>] <single sentence> = [<gerund phrase>]<simple sentence> <simple sentence> = <noun phrase>[<adverb phrase>]<intransitive verb>[<preposition><noun phrase>] <noun phrase><intransitive verb>[<preposition><noun phrase>][<adverb phrase>] [<adverb phrase>]<noun phrase><intransitive verb>[<preposition><noun phrase>] <noun phrase><transitive verb phrase><noun phrase> <noun phrase> = "The "[<adjective phrase>]<improper noun> [<adjective phrase>]<proper noun> "A "[<adjective phrase>]<improper singular noun> <gerund phrase> = [<adverb phrase>]<gerund> <adverb phrase> = [<adverb>]<adverb> <transitive verb phrase> = [<adverb phrase>]<transitive verb> <adjective phrase> = <simple adjective>[" , "<simple adjective>] <simple adjective> = <adjective>[<adjective>] [<adverb>]<adjective>
Note that terms used in defining the rules are based on normal grammatical terms, but don't necessarily have exactly the conventional meanings.
I think the haiku are more successful than the tanka, but it was just a trivial addition to put in the option. The idea for adding the syllabics to the generator came from Jane Dorner, to whom I'm very grateful.
The program allows the user to select from a number of vocabularies. Those available at the moment include:
If you are interested in suggesting a new vocabulary, email me and we can discuss it.
If you wish to examine or make use of the code, please feel free. If you re-use or adapt my code, I would appreciate an acknowledgement. Only click on the following links if you want to load the files directly to examine or download them. You can't run the program by using these links.