12 October 2012

Markov Chain Text Generator

Yesterday we finished making our Markov chain text generator. In other words, I now have a cool way to track patterns in texts and then create similar patterns.

Our first attempt was this with the text of Emma:

Harriet Smith!--It was a mat to step upon. I shall never forget her look around among my acquaintance, I tremble.

Shakespeare produced the following:

This more then Naturall, if Philosophie could finde it out. Character. Giue thy thoughts no tongue, Nor any vnproportion'd thoughts his Act: Be thou familiar; but by her. His friends, And in this world goes, is to be demanded of a fiery minde, A sauagenes in vnreclaim'd bloud of Man, That swift as Quick-siluer, it courses through The naturall Gates and Allies of the dead, not for euer with thy veyled lids Seeke for thy Betters, take thy Fortune, Thou find'st to be spilt. Vertue or my Plague, be it Hor. So Capitall a Calfe there. 

Harry Potter (can you guess which one?) produced this:

He alone knew exactly who we all want a house-elf called Dobby had been. A burning, prickling feeling in his trunk in the chamber off the beetle and looked over at the wizards on the arrangements for the third task. Followed Cedric at a number three around its neck And Harry heard the word "Firebolt" on each cheek (he felt his face screwed up his cauldron, saw Karkaroff lean forward at once what was coming, the third piece of toast into the kitchen, to me. Table, watching Harry struggle to remove the frog guts from under her wing, and Crookshanks was curled up on Sunday to send me back under the Imperius Curse, forced countless people to whom Harry was sure Cedric would want to work at the World Cup. For beating their team, Gryffindor, in the hospital wing. 

A mixture of Harry Potter and Shakespeare:
Gazed, nonplussed, at Dumbledore, then, in patience our proceeding be. Contents rattled as she fluttered down on a trapeze. Took Diggory much longer and heavier than usual lately. Hat, stretched out his children. Be ill?" said Hermione, looking impressed.

Finally, I took text from my last blog post and put it in to get this:
The good thing about Pair programming is that I picked up a bit of Ruby on Rails over the summer program--the first group ever--at Hackbright, but my foot problems made me need to take the time outside of the U.S., and we both love editing. Really helps you to have a good thing to do, here goes: I'm becoming a web developer in ten weeks, specializing in Python (if you don't know what that means, just call me someone who works with programming computers and internet stuff, and we'll leave it at that). Using the code I can read, I can't figure out how to fix, even after googling it. But when it comes time for me than focusing on the internet as well. Exactly how the spacing works or if I need quickly. Actually aren't that great at writing analytical essays, but you're really interested in computers. Re-do my blog design again--two times in one year, that's a record for me!). Place where I was raised. Way as well. You), but this article makes me see the possibilities for problems. The possibilities--I was in technology clubs all during school, I learned some Visual Basic 6 back in the middle of presentations or put "Meow" at the end of their code--seriously, check out Amazon.com's source code by right-clicking on their page!) So that's what I already know (maybe I will use my new skills to re-do my blog design again--two times in one year, that's a record for me!). To live to me to just up and write some using the code I can tell all the different kinds you can study how to make them do all sorts of cool things?" (Okay, maybe not that part about not being great at analytical essays, but you're really interested in computers. Work with a majority of men since I've had good experiences working with a majority of men since I've had good experiences working with people every minute of 40 hours a week. Right-clicking on their page!) So that's what I read it here). Well. So why encourage a woman to a field that is really hard.

And for my whole blog, this:
Considered Holy back then? Massive DenkmalOne might say that they went off every couple of years. Bracelets and balloon remainders laying around Leipzig, but the troubles with the same time as well. Her holiday be bright with the love between a zucchini and a half pounds of presents people sent with me as we...Thanks for the cake started disappearing and no energy to sustain conflict and lump groups into people as they pass;They are cold, Still, Waiting in the summertime and on and on and off the burnt parts. New look and look them up in an hour late, but this will become passionate about. To very few physical belongings, but I hear it's super hard, but if I should use, written lists of books that will effect others but not least, I just hope that you can to help. It's too bad that they were headed for the raffle at the Christmas celebrations), change[d] the sheets to warm up and drink some water, so after apologizing, I rode past people who aren't so clean or respectable on there. Maybe I could see. To Dave, Mike, Jeff, Sica, and your stomach is full of hardcore hayfever, the next two hours and 15 minutes after we left our stomachs 200 feet in it and made sure I agree with me, when I jump when someone tells me the things that seem normal when you sit in the saga of the moon.) <BR/><BR/>Hope that's stuck in it (hell). Youtube video your brother? Word which was bought out by drinking his Kern's drinks. Had invited her to, and I played in the first one to turn to, what is shown here, which led to an A-.

Maybe most entertaining was our instructor's mix of Kierkegaard and Kim Kardashian (this is worth zooming in on):

KimKierkegaardashian Markov Tweeting 

My favorites: "Bikini shoot from my youth, when a terrible melancholythrew me for a time into sin & debauchery I wanted to capture the blonde look."

And: "Every revelation you make is an illusion; so far, no one has succeeded in knowing you. Your white pumps literally go with any outfit."  How gorgeous! Term='http://schemas.google.com/blogger/2008/kind#comment'/><title type='text'>Well, yes it is sooooooo hard for those to grow a little unfair to the moon, no moon, moon, no moon pattern, but oh well). Paper letters are so many memories from Comparative Literature 2010.  <br></p> <p> <br></p> <p> We also figured out how to make these generated texts post to Twitter automatically . . . but the lovely woman I was programming with posted them on her account (and then promptly deleted them so as to not make her followers think she was crazy.</p> <p> <br></p> <p> My all-time favorite, though, is our teacher's new Twitter feed called "KimKierkegaardashian":</p> <p> <br></p> <p> <a class="twitter-timeline-link" data-blogger-escaped-data-pre-embedded="true" dir="ltr" href="http://t.co/hImiZlLw" style="background-color: white; color: #0084b4; font-family: Georgia, 'Times New Roman', serif; font-size: 22px; line-height: 28px; outline: 0px;">pic.twitter.com/hImiZlLw</a> </p>

1 comment:

  1. I don't remember where I first saw the @KimKierkegaardashian Twitter feed (maybe from you, if you ever posted it on Facebook), but I have a cousin who thinks it's the best thing ever.