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   

Babbliness:    Output length:   

Forasmuch as many have taken nothing: nevertheless at thy house. And after these sayings, he took the cup, and gave to the blind, to set at liberty them that sit in darkness shall be filled, and every mountain and hill shall be born of women there is any resurrection; and they sought means to bring him in a day when the time come when ye shall fear: Fear him, which after he hath found it, he marvelled that he went his way, and communed one with another what they do. And it came to pass, that the beggar died, and was not hid, she came from heaven, strengthening him. And Simeon blessed them, and said, I thank thee, that thy faith hath saved thee; go in peace. And it came to pass, as they went to Jerusalem, and from the very dust from your feet for a spirit hath not where to lay hands on him; and whatsoever thou spendest more, when I am not as other men are, extortioners, unjust, adulterers, or even to all? And the angel departed from him the pound, and give him money. And he came to pass, as they went in to tarry with them. But their eyes were opened, and they went, that he will throughly purge his floor, and will not straightway pull him out on the earth: for the powers of heaven shall be filled, and every mountain and hill shall be filled with madness; and communed with the husks that the light which is within also? But rather seek ye the kingdom of God, and healed him. Then said he to another, What manner of spirit ye are of more value than many sparrows. Also I say unto you, lawyers! for ye shall desire to see him. And he said