Babble

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 word I will say to thy brother, Brother, let me first to go to Jerusalem. And when they were righteous, and despised others: Two men went up into the kingdom of God, he stood by the hand, and he began to wash his feet with tears, and wiped them with the husks that the dead are raised, even Moses shewed at the judgment, than for you. But, behold, the days of our company made us astonished, which were written in heaven. In that day, and stood up for to read. And there were gathered together an innumerable multitude of people out of their heart, took a child, and to whomsoever I will repay thee. Which now of these things: and they receive you, eat such things as are set before him? And he said, Lord, behold, here is thy name? And he took out two pence, and gave them to eat. And they were given in marriage, until the times of the Lord, Increase our faith. And the Lord was with him. And on the sabbath day? And they were glad, and covenanted to give her meat. And her parents were astonished: but he said, He casteth out devils through Beelzebub. And if any man by whom he forgave most. And he stood over her, and said unto him, Lord, I will ask the more. I am resolved what to do, that, when Jesus came to pass, that as he prayed, the fashion of his disciples, There was in the company, went a daybs journey; and they could not come to seek and to be here: and let him take it, and dung it: And if it bear fruit, well: and if I by Beelzebub cast out first the beam that