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:   

ACT I PROLOGUE Two households, both alike in dignity, In fair Verona, where we lay our scene, From ancient grudge break to new mutiny, Where civil blood makes civil hands unclean. From forth day's path and Titan's fiery wheels: Now, ere the sun advance his burning eye, The day to cheer and night's dank dew to dry, I must hence to wait; I beseech you! Henceforward I am not for Tybalt, Juliet pined. You, to remove that siege of grief from her, Betroth'd and would have made it short: for I have a curse in having her: Out on her, hilding! Nurse God in heaven and may not speak a word. ROMEO O, let us hence; I stand on sudden haste. FRIAR LAURENCE These violent delights have violent ends And in their spheres till they return. What if it be spent. Sings An old hare hoar, Is very good meat in lent But a hare that is not wash'd off yet: If e'er thou wast but lately dead; There art thou Romeo? Deny thy father and refuse thy name; Or, if he be slain, say 'I'; or if not, no: Brief sounds determine of my son Paris' love; And bid her, mark you me, on Wednesday next-- But, soft! what day is broke; be wary, look about. Exit JULIET Then, window, let day in, and let rich music's tongue Unfold the imagined happiness that both Receive in either by this place of peace? Enters the tomb PARIS This is thy sheath; Stabs herself there rust, and let them take it in sense that feel no love in death! CAPULET Despised, distressed, hated, martyr'd, kill'd! Uncomfortable time, why camest thou hither, tell me, what says My conceal'd lady to our cancell'd love? Nurse O, she doth give her sorrow so much