{"id":900,"date":"2008-11-14T23:35:35","date_gmt":"2008-11-15T03:35:35","guid":{"rendered":"http:\/\/www.shakespeareteacher.com\/blog\/?p=900"},"modified":"2017-08-18T15:24:25","modified_gmt":"2017-08-18T20:24:25","slug":"a-chain","status":"publish","type":"post","link":"https:\/\/www.shakespeareteacher.com\/blog\/archives\/900","title":{"rendered":"A Chain!"},"content":{"rendered":"<p>Via the <a href=\"http:\/\/blog.shakespearegeek.com\/2008\/10\/computer-generated-alternate-hamlet.html\" target=\"_blank\">Shakespeare Geek<\/a>, we find a website that uses a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Markov_chain\" target=\"_blank\">Markov chain<\/a> to generate an alternate version of <em>Hamlet<\/em>. <a href=\"http:\/\/www.figmentengine.com\/markovShakespeare\/\" target=\"_blank\">Check it out!<\/a><\/p>\n<p>From what I can tell, the site works from a table of which words follow other words in the play, and how often. It then constructs a chain by looking at the last word (or few words) that were entered, and choosing a random word of those that actually follow that word (or few words) in the play.<\/p>\n<p>For example, one place in the play has &#8220;Alas! poor Yorick. I knew him, Horatio.&#8221; Another part of the play has &#8220;I knew your father.&#8221; The Markov chain might generate &#8220;Alas! poor Yorick. I knew&#8230;&#8221; and then, only looking at the last two words &#8220;I knew&#8221; might follow up with &#8220;your father.&#8221; The final result would be &#8220;Alas! poor Yorick. I knew your father.&#8221;<\/p>\n<p>This is a favorite <a href=\"http:\/\/blog.figmentengine.com\/2008\/10\/hamlet-using-markov-chain.html\" target=\"_blank\">example<\/a> provided by the author, but there are a lot of funny possibilities. You can keep refreshing the page to get a new randomly-generated <em>Hamlet<\/em>.<\/p>\n<blockquote><p>Thanks, Rosencrantz and Guildenstern are dead:<br \/>\nEre I could accuse me of the courtier, cousin, and with a look so piteous in purport<br \/>\nAs I perceived it, if I gall him slightly,<br \/>\nWhips out his rapier, cries, &#8216;A rat, a touch,<br \/>\nThe queen desires you to remain<br \/>\nHere is your only jig-maker. What it should be old as I will be laid to us, till I know not&#8211;lost all my best obey you, and, at a shot<br \/>\nSo art thou to me all the battlements their ordnance fire: proclaim no shame<br \/>\nWhen Roscius was an actor in Rome,&#8211;<br \/>\nAs of a dear father murder&#8217;d,<br \/>\nWith mirth in funeral and with a crafty madness, like the herald Mercury<br \/>\nNew-lighted on a roar? Not one now o&#8217;er<br \/>\nThe triumph of his own scandal.<\/p><\/blockquote>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Via the Shakespeare Geek, we find a website that uses a Markov chain to generate an alternate version of Hamlet. Check it out! From what I can tell, the site works from a table of which words follow other words in the play, and how often. It then constructs a chain by looking at the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91,12,45,3,110,13],"tags":[],"class_list":["post-900","post","type-post","status-publish","format-standard","hentry","category-hamlet","category-humor","category-math","category-shakespeare","category-shout-out","category-technology"],"_links":{"self":[{"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/posts\/900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/comments?post=900"}],"version-history":[{"count":5,"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/posts\/900\/revisions"}],"predecessor-version":[{"id":6363,"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/posts\/900\/revisions\/6363"}],"wp:attachment":[{"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/media?parent=900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/categories?post=900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shakespeareteacher.com\/blog\/wp-json\/wp\/v2\/tags?post=900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}