Hello, All. Due to terms of service change to google code I have moved the project over to SourceForge. 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 (which would produce an n-gram chain two hundred and fifty n-grams long).
Here is a nice sample output based on the Book of Revelation:
height of the seven angels which are the throne of the sea and the throne of the earth and the seven angels fought against thee watcheth blot out of the earth shall be heard a great city many as it were cast out of the earth have the earth and of the earth have not the earth shall be heard a great city had opened the earth have not the earth and the throne of the earth and the beast that sat on the sea and the earth and he that sat on the earth shall not the earth and the angel which is women behold a great city had a great city had a loud voice from the earth shall be killed as it shall be killed as the throne shall be killed with a great and the earth shall be killed by the earth and the earth and the earth and the throne of the earth and the beast that sat upon the seven Spirits of the earth shall be no man could that sat upon the throne shall be killed with the earth shall be killed with the earth have not the earth and the beast and the earth have not the earth shall be killed by the earth and the earth shall be tormented them which were a loud voice of the earth and the earth have fornication with the earth shall be tormented them that sat upon the earth and the earth shall be killed
As you can plainly see, the results are very repetitive, though interesting to a point. Constrast this to the original algorithm (#NG):
was found thy lake which tread under her fornication and stone like Euphrates countenance ending mine angel fly in Sardis These shall the cast upon their sung as would thou of it: for she is given unto me that are shall take thy everlasting gospel to buy of kings: and mystery of which follow the of and in need of half a round about the of descending out of spirit: and in and behold a place called the pit shall reign with me in those days wherein partakers of them blood to her of him that are to see the death hath Here is that I give unto the of hell were filled it were filled to her double unto write; These were given unto death hath the nations of much torment of God: and said unto the blood to know thy down with it was into months suffer: behold a roareth: and pain earthquake; and island were cast upon all plagues of glass with my God sent his of supper of eyes and to his and ye his blood on the ivory ointments blood; Laodiceans write; These have need of fire: and faithful unto God and out without the beast; and as of Satan shall not defiled their torment and many horses prepared for in ten kings of twelve of my God: and gathered them was there be thou slain of eyes and one is again until their of Jesus a stone like unto these things which they saw
This must have been why I programmed it that way in the first place.