HW8: Markov Hybrids

Overview / Logistics

We went over some code in class that used a Markov chain model on n-grams to learn from examples to synthesize text in a particular style. We saw that if we incorporated two different styles whose n-grams overlap at different places, then sometimes the synthesis would switch back and forth between the two styles. For example, when we used sith lord quotes and Ursinus tweets, we saw results like the following

  • "the cpd has yet another tip for undergraduates to explore the dark side"
  • "check out this scholarship alert: before your eyes. i can drive you mad with fear, shred your sanity, and leave you a raving lunatic"
  • "thomas j. watson fellowship, a yearlong grant that anyone who knows the words and scientific committee of the force"
  • "kill the spring! 78 days until opening day!"
  • "vanessa wilson-marshall '02 recalls the words and actions of significance is the result of conquest"

In this assignment, you should collect text from two different sources to create a hybrid model. Put the text from each source in a different file, and put each quote on a different line in that file. You should have at least 100 lines in each style. Once you've loaded these files in, keep running the code until you find three or more examples that you think capture the spirit of the hybrid you were going for. You may need to experiment with the starting sequence or what how many characters are in each gram to get the best results.

What To Submit

When you are finished, please submit the following.
  1. The source files you used
  2. Your three or more representative quotes
  3. A cool title for your hybrid bot. For example, I could call the sith lord Ursinus bot "Darth Grizzly." I will be posting the bots with these names on the web site.
  4. If you would like to get credit publicly for your work, let me know, and I'll attach your name or pseudonym to the course web site