Author of the word-famous Infinite Monkeys random poetry generator (formerly at google-code)


Download IM; in the Infinite Monkeys main directory there is a subdirectory called Source. The file that contains the parser is called script.bas, and the other major component to that is the dictionary.bas. Most of the executive functions are actually handled by the dictionary and the parser just sort of calls dictionary functions which basically perform rudimentary sorts for tagnames or verb types or other such niceties. The template aspect of IM was a glitzed up version of a dada generator that was made awhile back, early nineties I think. It allows for a little more refinement in the random aspect of the generator.


A couple areas I wanted to expand into, but it may be that you’re more qualified to take this route.. The stanford part of speech tagger.. If I can run text through that I could create a template without going through the effort of manually transcribing it. Also, I don’t know if you’ve heard of this: But at some point I’d like to create a generator with it. It’s probably the most elaborately conceived database out there.





I have also made several key changes to the original n-gram algorithm which has undoubtedly made it function better. I have added a second n-gram algorithm which produces slightly more repetitive results. The original was coded to be as random as possible. It selects two of each word’s links at random and then roll their weights against each other to determine a winner. The second n-gram algorithm rolls all links of a given n-gram and selects the highest roll.


What do I mean by roll? Well, a link (for instance) of a given n-gram may have a weight of 8. This means that in 8 separate instances the link word follows the n-gram’s text.


Take for instance: The ball is round. The ball is grand. The word the would have a link ball of weight 2. The word ball would have a link is at weight two. The word is would have two links round and grand each of weight 1. So if the word ball had multiple links, the algorithm would run through each of them and select a random number (a single precision float) between 0 and the link’s weight. This (undocumented) algorithm can be accessed inline through parser via #NG2[250] (which would produce an n-gram chain two hundred and fifty n-grams long).




online presence

GnoetryDaily contributor



See Also




No comments yet.



Add Comment

 Your Message
 Enter value ← Have you entered the code number?