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:   

This was a triumph. I'm making a note here: HUGE SUCCESS. It's hard to overstate my satisfaction. Aperture Science We do what we must because we can. For the good of all of us. Except the ones who are still alive. And when you're dead I will be still alive. I'm doing Science and I'm still alive. Go ahead and leave me. I think I prefer to stay inside. Maybe you'll find someone else to help you. Maybe Black Mesa THAT WAS A JOKE. HAHA. FAT CHANCE. Anyway, this cake is great. It's so delicious and moist. Look at me still talking when there's Science to do. When I look out there, it makes me GLaD I'm not you. I've experiments to run. There is research to be done. On the people who are still alive. And when you're dead I will be still alive. I'm doing Science and I'm still alive. And believe me I am still alive. While you're dying I'll be still alive. And believe me I am still alive. And believe me I am still alive. Go ahead and leave me. I think I prefer to stay inside. Maybe you'll find someone else to help you. Maybe Black Mesa THAT WAS A JOKE. HAHA. FAT CHANCE. Anyway, this cake is great. It's so delicious and moist. Look at me still talking when there's Science to do. When I look out there, it makes me GLaD I'm not you. I've experiments to run. There is research to be done. On the people who are still alive. STILL ALIVE I'm making a note here: HUGE SUCCESS. It's hard to overstate my satisfaction. Aperture Science We do what we must because we can. For the people who are still alive. I'm not even angry. I'm being so sincere right