09 October 2014

Hackbright Day 8: my mind Blue mist round my soul Feel so suicidal Even hate my rock and roll Wanna die yeah wanna die If I ain’t dead already Ooh girl you

So I went and watched a movie with Colby tonight, so I am super spent. Here's a brief recap.

We spent the first half of the day working on our Markov chain text generator. The next step for us was to put it on twitter. We decided to mash up the Beatles with Jane Austen's Pride and Prejudice. It turns out that mixing up two corpuses (corpi?) is difficult if the writing styles don't overlap, especially if your Markov chains are long. On the other hand, having longer Markov chains tend to create text that makes more sense.

The way we dealt with it was that we first read in the text from Pride and Prejudice, created a dictionary that used tuples as keys and then created a random string. We then used the last word of the Pride and Prejudice random string and used that to be the first element of the key tuple for the Beatles. We created a separate dictionary for the Beatles lyrics and then created a random chain using the seed from the last word of the PP random string. We then figured out where the two random strings met, and then grabbed 70 characters plus and minus around the midpoint. We then evaluated the first part of the string to determine where the first word really started (in case the string we grabbed was only part of the word) and then we made sure that the last word was similarly not cut off. Finally, we worked with the twitter API and didn't actually publish our twitter auth keys to github this time. *HURRAH*.

The twitter account is @heyjaneausten (so like, Hey Jude.. or something).

We talked about classes in the afternoon and I am way too not awake to talk about them right now. And then we used classes to create a game. A very not good game that we'll have all day tomorrow to work on.

No comments: