{"id":92411,"date":"2019-04-23T18:54:12","date_gmt":"2019-04-23T18:54:12","guid":{"rendered":"https:\/\/news.microsoft.com\/?p=432496"},"modified":"2019-04-23T18:54:12","modified_gmt":"2019-04-23T18:54:12","slug":"breaking-bard-using-ai-to-unlock-shakespeares-greatest-works","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2019\/04\/23\/breaking-bard-using-ai-to-unlock-shakespeares-greatest-works\/","title":{"rendered":"Breaking Bard: Using AI to unlock Shakespeare\u2019s greatest works"},"content":{"rendered":"<p>Spoiler alert: At the end of Romeo and Juliet, they both die.<\/p>\n<p>OK, as spoilers go, it\u2019s not big. Most people have read the play, watched one of the famous films or sat through countless school lessons devoted to <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/William_Shakespeare\" target=\"_blank\" rel=\"noopener noreferrer\">William Shakespeare<\/a><\/strong> and his work. They know it doesn\u2019t end well for Verona\u2019s most famous couple.<\/p>\n<p>In fact, the challenge is finding something no one knows about the world-famous, 300-year-old play. That\u2019s where artificial intelligence can help.<\/p>\n<p><strong><a href=\"https:\/\/www.linkedin.com\/in\/philipdavidharvey\/\" target=\"_blank\" rel=\"noopener noreferrer\">Phil Harvey<\/a><\/strong>, a Cloud Solution Architect at Microsoft in the UK, used the company\u2019s <strong><a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/cognitive-services\/text-analytics\/\" target=\"_blank\" rel=\"noopener noreferrer\">Text Analytics API<\/a><\/strong> on 19 of The Bard\u2019s plays. The API, which is available to anyone as part of Microsoft\u2019s Azure Cognitive Services, can be used to identify sentiment and topics in text, as well as pick out key phrases and entities. This API is one of several Natural Language Processing (NLP) tools available on <strong><a href=\"https:\/\/azure.microsoft.com\/en-us\/\" target=\"_blank\" rel=\"noopener noreferrer\">Azure<\/a><\/strong>.<\/p>\n<p>By creating a series of colourful, <strong><a href=\"https:\/\/powerbi.microsoft.com\/en-us\/\" target=\"_blank\" rel=\"noopener noreferrer\">Power BI<\/a><\/strong> graphs (below) showing how negative (red) or positive (green) the language used by The Bard\u2019s characters was, he hoped to shine a new light on some of the greatest pieces of literature, as well as make them more accessible to people who worry the plays are too complex to easily understand.<\/p>\n<div class=\"has-embed\"><button class=\"cookie-consent-btn\">Click here to load media<\/button><\/div>\n<p>Harvey said: \u201cPeople can see entire plotlines just by looking at my graphs on language sentiment. Because visual examples are much easier to absorb, it makes Shakespeare and his plays more accessible. Reading language from the 16th and 17th centuries can be challenging, so this is a quick way of showing them what Shakespeare is trying to do.<\/p>\n<p>\u201cIt\u2019s a great example of data giving us new things to know and new ways of knowing it; it\u2019s a fundamental change to how we process the world around us. We can now pick up Shakespeare, turn it into a data set and process it with algorithms in a new way to learn something I didn\u2019t know before.\u201d<\/p>\n<p>What Harvey\u2019s graphs reveal is that Romeo struggles with more extreme emotions than Juliet. Love has a much greater effect on him challenging stereotypes of the time that women \u2013 the fairer sex \u2013 were more prone to the highs and lows of relationships.<\/p>\n<p>\u201cIt\u2019s interesting to see that the male lead is the one with more extreme emotions,\u201d Harvey added. \u201cThe longest lines, both positive and negative, are spoken by him. Juliet is steadier; she is positive and negative but not extreme in what she says. Romeo is a fellow of more extreme emotion, he\u2019s bouncing around all over the place.<\/p>\n<p>\u201c<strong><a href=\"https:\/\/www.rsc.org.uk\/macbeth\/\" target=\"_blank\" rel=\"noopener noreferrer\">Macbeth<\/a><\/strong> is also interesting because there are these two peaks of emotion, and Shakespeare uses the wives at these points to turn the story. I also looked at Helena and Hermia in <strong><a href=\"https:\/\/www.rsc.org.uk\/a-midsummer-nights-dream\/\" target=\"_blank\" rel=\"noopener noreferrer\">A Midsummer Night\u2019s Dream<\/a><\/strong>, because they have a crossed-over love story. They are both positive at the start but then they find out something and it gets negative towards the end.\u201d<\/p>\n<figure id=\"attachment_74802\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2019\/04\/breaking-bard-using-ai-to-unlock-shakespeares-greatest-works.jpg\">&lt;img data-attachment-id=&quot;74802&quot; data-permalink=&quot;https:\/\/news.microsoft.com\/en-gb\/2019\/04\/23\/breaking-bard-using-microsoft-ai-to-unlock-shakespeares-greatest-works\/ancient-architecture-art-189532\/&quot; data-orig-file=&quot;http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2019\/04\/breaking-bard-using-ai-to-unlock-shakespeares-greatest-works.jpg&quot; data-orig-size=&quot;6000,3376&quot; data-comments-opened=&quot;1&quot; data-image-meta=&quot;{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}&quot; data-image-title=&quot;ancient-architecture-art-189532&quot; data-image-description=&quot;<\/p>\n<p>statue of William Shakespeare<\/p>\n<p> &#8221; data-medium-file=&#8221;https:\/\/3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com\/wp-content\/uploads\/prod\/sites\/68\/2019\/04\/ancient-architecture-art-189532-300&#215;169.jpg&#8221; data-large-file=&#8221;http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2019\/04\/breaking-bard-using-ai-to-unlock-shakespeares-greatest-works.jpg&#8221; class=&#8221;wp-image-74802 size-full&#8221; src=&#8221;http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2019\/04\/breaking-bard-using-ai-to-unlock-shakespeares-greatest-works.jpg&#8221; alt=&#8221;statue of William Shakespeare&#8221; width=&#8221;6000&#8243; height=&#8221;3376&#8243; srcset=&#8221;http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2019\/04\/breaking-bard-using-ai-to-unlock-shakespeares-greatest-works.jpg 6000w, https:\/\/3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com\/wp-content\/uploads\/prod\/sites\/68\/2019\/04\/ancient-architecture-art-189532-300&#215;169.jpg 300w, https:\/\/3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com\/wp-content\/uploads\/prod\/sites\/68\/2019\/04\/ancient-architecture-art-189532-768&#215;432.jpg 768w&#8221; sizes=&#8221;(max-width: 6000px) 100vw, 6000px&#8221;&gt;<\/a><figcaption class=\"wp-caption-text\">The project required AI working alongside humans to truly understand and fully appreciate Shakespeare\u2019s plays<\/figcaption><\/figure>\n<p>His Shakespeare graphs are the final step in a long process. After downloading a text file of The Bard\u2019s plays from the internet, Harvey had to process the data to prepare it for Microsoft\u2019s AI algorithms. He removed all the stage directions, keeping the act and scene numbers, the characters\u2019 names and what they said. He then uploaded the text to Microsoft Cognitive Services API, a set of tools that can be used in apps, websites and bots to see, hear, speak, understand and interpret users through natural methods of communication.<\/p>\n<p>The Text Analytics API is pre-trained with an extensive body of text with sentiment associations. The model uses a combination of techniques during text analysis, including text processing, part-of-speech analysis, word placement and word associations.<\/p>\n<p>After scanning the Shakespeare plays, Microsoft\u2019s NLP tool gave the lines of dialogue a score between zero and one \u2013 scores close to one indicated a positive sentiment, and scores close to zero indicated a negative sentiment.<\/p>\n<p>However, before you start imagining a world in which only robots read books before telling humans the gist of what happened, Harvey discovered some unexpected challenges with his test.<\/p>\n<p>While the AI system worked well for Shakespeare plays that contained straightforward plots and dialogue, it struggled to determine if more nuanced speech was positive or negative. The algorithm couldn\u2019t work out whether Hamlet\u2019s mad ravings were real or imagined, whether characters were being deceptive or telling the truth. That meant that the AI labelled events as positive when they negative, and vice-versa. The AI believed <strong><a href=\"https:\/\/www.rsc.org.uk\/the-comedy-of-errors\/\" target=\"_blank\" rel=\"noopener noreferrer\">The Comedy of Errors<\/a><\/strong> was a tragedy because of the physical, slapstick moments in the play.<\/p>\n<blockquote>\n<h3><strong><span><a href=\"https:\/\/azure.microsoft.com\/en-gb\/\" target=\"_blank\" rel=\"noopener noreferrer\">Everything you need to know about Microsoft\u2019s cloud<\/a><\/span><\/strong><\/h3>\n<p><a href=\"https:\/\/azure.microsoft.com\/en-gb\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"36755\" data-permalink=\"https:\/\/news.microsoft.com\/en-gb\/2016\/12\/28\/36740\/cloudnnew\/\" data-orig-file=\"https:\/\/3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com\/wp-content\/uploads\/sites\/68\/2016\/12\/cloudnnew.jpg\" data-orig-size=\"4570,3066\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;5.6&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;NIKON D7000&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1459709483&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;120&quot;,&quot;iso&quot;:&quot;100&quot;,&quot;shutter_speed&quot;:&quot;0.003125&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cloudnnew\" data-image-description data-medium-file=\"https:\/\/3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com\/wp-content\/uploads\/sites\/68\/2016\/12\/cloudnnew-300x201.jpg\" data-large-file=\"https:\/\/3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com\/wp-content\/uploads\/sites\/68\/2016\/12\/cloudnnew-1600x1073.jpg\" class=\"alignnone size-full wp-image-36755\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2019\/04\/breaking-bard-using-ai-to-unlock-shakespeares-greatest-works-1.jpg\" alt width=\"4570\" height=\"3066\"><\/a><\/p>\n<\/blockquote>\n<p>Harvey realised that the parts of the plays that dealt with what truly makes us unique as humans \u2013 joking, elation, lying, double meanings, subterfuge, sarcasm \u2013 could only be noticed and interpreted by human readers. His project required <strong><a href=\"https:\/\/www.microsoft.com\/en-us\/ai\" target=\"_blank\" rel=\"noopener noreferrer\">AI<\/a><\/strong> working alongside humans to truly understand and fully appreciate Shakespeare.<\/p>\n<p>Harvey insists that his experiments with Shakespeare\u2019s plays are just a starting point but that the same combination of AI and humans can eventually be extended to companies and their staff, too.<\/p>\n<p>\u201cTake the example of customers phoning their energy company,\u201d he said. \u201cWith Microsoft\u2019s NLP tools, you could see if conversations that happen after 5pm are more negative than those that happen at 9am, and deploy staff accordingly. You could also see if a call centre worker turns conversations negative, even if they start out positive, and work with that person to ensure that doesn\u2019t happen in the future.<\/p>\n<p>\u201cIt can help companies engage with data in a different way and assist them with everyday tasks.\u201d<\/p>\n<p>Harvey also said journalists could use the tool to see how readers are responding to their articles, or social media experts would get an idea of how consumers viewed their brand.<\/p>\n<p>For now, Harvey is concentrating on the Classics and is turning his attention to <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Charles_Dickens\" target=\"_blank\" rel=\"noopener noreferrer\">Charles Dickens<\/a><\/strong>, if he can persuade the V&amp;A in London to let him study some of their manuscripts.<\/p>\n<p>\u201cIn the V&amp;A manuscripts, you can see where Dickens has crossed out words. I would love to train a custom vision model on that to get a page by page view of his changes. I could then look at a published copy of the text and see which parts of the book he worked on most; maybe that part went well but he had trouble with this bit. Dickens\u2019s work was serialised in newspapers, so we might be able to deduce whether he was receiving feedback from editors that we didn\u2019t know about. I think that\u2019s amazing.\u201d<\/p>\n<p class=\"tag-list\">Tags: <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/ai\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;AI&quot;\">AI<\/a>, <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/azure\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;Azure&quot;\">Azure<\/a>, <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/hamlet\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;Hamlet&quot;\">Hamlet<\/a>, <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/macbeth\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;Macbeth&quot;\">Macbeth<\/a>, <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/microsoft\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;microsoft&quot;\">microsoft<\/a>, <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/power-bi\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;power BI&quot;\">power BI<\/a>, <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/romeo-juliet\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;Romeo &amp; Juliet&quot;\">Romeo &amp; Juliet<\/a>, <a href=\"https:\/\/news.microsoft.com\/en-gb\/tag\/shakespeare\/\" rel=\"tag\" aria-label=\"Find more content related to &quot;Shakespeare&quot;\">Shakespeare<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spoiler alert: At the end of Romeo and Juliet, they both die. OK, as spoilers go, it\u2019s not big. Most people have read the play, watched one of the famous films or sat through countless school lessons devoted to William Shakespeare and his work. They know it doesn\u2019t end well for Verona\u2019s most famous couple. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":92412,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[135,50],"class_list":["post-92411","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-news","tag-artificial-intelligence","tag-recent-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/92411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=92411"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/92411\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/92412"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=92411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=92411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=92411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}