This was originally a project for a data structures and algorithms course.
Input a reasonably long chunk of text and press Babble to get your result. The aim of this simple program is to produce an output that makes semi-grammatical sense at first glance, but doesn't make much logical sense when you actually try reading it. More text is always better; use at least a paragraph for best results. Song lyrics can often produce amusing results.
The "Babbliness" factor determines how closely the output will match the input. Output with a Babbliness value of 5 will not resemble the input very much at all and will probably not make much grammatical sense, while output with a Babbliness value of 1 will make good grammatical sense but possibly be nearly identical to the input text.
Sample inputs: Green Eggs and Ham Goldilocks and the Three Bears Still Alive Declaration of Independence Gospel of Luke Romeo and Juliet
Forasmuch as many have taken nothing: nevertheless at thy word I will not straightway pull him out of the holy angels. But I tell you of a great way off, his father Zacharias was filled with water, and cool my tongue; for I am tormented in this thy brother was dead, and is found. And they did not sow: Wherefore then gavest not thou fear God, seeing thou art tormented. And beside all this, to day and night unto him, Lord, I will give you a mouth and wisdom, which all your adversaries shall not be revealed; neither hid, that shall not live by bread alone, but by every word of God. The law and the rich he hath ten pounds. And he spake by a parable: A sower went out to sow his seed: and as he was come that he might betray him unto them from the east, and from the sepulchre, and found the stone rolled away from the south, and shall condemn it: for they know not what thou sayest. And immediately, while he talked with him began to speak. And he shall rise up in his name was Simeon; and the temple: and when he will return from the hand of him shall be no end. Then said he unto them, When thou makest a dinner or a divider over you? And he laid his hands on him; and whatsoever thou spendest more, when I come seeking fruit on this fig tree, and all the power of the Lord thy God, and you yourselves thrust out. And they said unto him, If thou be willing, remove this cup from me: nevertheless not my will, but thine, be done. And there was delivered unto me; and he die without children, that his brother Philip tetrarch of