{"id":18432,"date":"2019-04-18T14:24:31","date_gmt":"2019-04-18T12:24:31","guid":{"rendered":"https:\/\/blog.trifork.com\/?p=18432"},"modified":"2019-04-18T14:24:31","modified_gmt":"2019-04-18T12:24:31","slug":"game-of-thrones-network-science","status":"publish","type":"post","link":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/","title":{"rendered":"Game of Thrones Network Science"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"221\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221.png\" alt=\"\" class=\"wp-image-18525\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221.png 1024w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-300x65.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-768x166.png 768w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1536x332.png 1536w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-2048x443.png 2048w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1920x415.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p title=\"Not sure if you'd still want that nowadays however...\"><strong><em>\u201cDid you know? You are just six handshakes away from meeting the President of the USA.\u201d<\/em><\/strong><\/p>\n\n\n\n<p>I am not sure when I first heard this statement, but it sure is a captivating premise. I have heard it many times since, cited as a fun-fact at family birthdays by semi-knowledgeable uncles or as super inspirational introductory quotes for blog posts. This phenomenon, more formally known as the <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Six_degrees_of_separation\" target=\"_blank\">six degrees of separation<\/a> finds its origins in the perennial <a href=\"http:\/\/smg.media.mit.edu\/library\/milgram.smallworld.pdf\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Small World<\/a> experiments by Stanley Milgram. While the first accounts of systemic analysis of social networks (also dubbed network science) go much further back, Milgram\u2019s study serves as a quintessential example of the field.<\/p>\n\n\n\n<p>In this blog post, we will present a high-level overview of our paper on the automated extraction of social networks from novels: <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"http:\/\/peerj.com\/articles\/cs-189\" target=\"_blank\">http:\/\/peerj.com\/articles\/cs-189<\/a>. In a social network, persons are represented by nodes, and the connections or interactions are represented by edges. Although traditionally used in social studies, the analysis of social networks is now being widely used in fields such as: <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.researchgate.net\/profile\/Paul_Duijn\/publication\/264726951_Lecture_Notes_in_Social_Networks\/links\/572b18ec08ae057b0a092b55.pdf\" target=\"_blank\">law enforcement<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/arxiv.org\/pdf\/1104.3904.pdf\" target=\"_blank\">fraud prevention<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.researchgate.net\/profile\/Dinesh_Tyagi2\/post\/How_to_define_the_social_network_mining\/attachment\/59d623646cda7b8083a1dfb8\/AS%3A329729715523586%401455625098873\/download\/social+network+mining.pdf\" target=\"_blank\">advertisement<\/a> and <a href=\"https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2010\/01\/kdd10_influence_revised.pdf\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">marketing<\/a>. Ask any sales person or  journalist: knowing who is interacting with whom is important.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What<\/h3>\n\n\n\n<p>Unfortunately, knowledge about one&#8217;s social network is not always readily available to us. While it is relatively simple to get a social network from online platforms such as Facebook or LinkedIn, the vast majority of information is hidden. Despite the unimpeded growth of (big) data storage and usage, 80% of all data is still estimated to be <a href=\"https:\/\/en.wikipedia.org\/wiki\/Unstructured_data\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">unstructured<\/a>. Until recently, these untapped sources of information, in the form of texts, images and video or audio streams, were mostly gathering dust in data silos. <br \/><\/p>\n\n\n\n<p>With the advent of Machine Learning, leveraging such sources of data is becoming increasingly attainable. Advancements in the field of Machine Learning are pushing the envelope in all of these tasks, but we will focus on the subfield of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Natural_language_processing\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Natural Language Processing<\/a> (NLP). Among others, NLP practitioners work on the automated understanding of written text. In the rest of this blog, we will explain how one could extract social networks from text by using Natural Language Processing techniques on Game of Thrones. But why? <del>Because Game of Thrones is awesome.<\/del><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why<\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-683x1024.jpg\" alt=\"\" class=\"wp-image-18494\" width=\"172\" height=\"257\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-683x1024.jpg 683w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-200x300.jpg 200w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-768x1152.jpg 768w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-1024x1536.jpg 1024w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-1365x2048.jpg 1365w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-853x1280.jpg 853w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/patrick-tomasso-71909-unsplash2-e1554990679499-scaled.jpg 1707w\" sizes=\"auto, (max-width: 172px) 100vw, 172px\" \/><\/figure><\/div>\n\n\n\n<p>In 2002, The Boston Globe presented the results of an extensive <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.bostonglobe.com\/news\/special-reports\/2002\/01\/06\/church-allowed-abuse-priest-for-years\/cSHfGkTIrAT25qKGvBuDNM\/story.html\" target=\"_blank\">investigation<\/a> that led to the prosecutions of five priests and brought the sexual abuse of minors by Catholic clergy into the international <a href=\"https:\/\/en.wikipedia.org\/wiki\/Spotlight_(film)\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">spotlight<\/a>. Their work unveiled that one of the cardinals of the Catholic Archdiocese of Boston, systematically covered for the offending priests, by moving those priests accused of child molestation from parish to parish. Because of the scope of this widespread wrongdoing, the research team spent months going through mountains of church documents, internal depositions and extensive personnel files.<br \/><\/p>\n\n\n\n<p>More recently, an unknown source leaked 11.5 million documents that would later be known as the <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Panama_Papers\" target=\"_blank\">Panama Papers<\/a>. These documents describe the tax evasion, fraud and kleptocracy of a great number of celebrities, wealthy individuals and high-ranking political figures. The unparalleled scale of these terabytes of unstructured data (e.g. emails, PDFs) prompted a collaboration of journalists and computer scientists, and promoted the usage of technologies such as <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/neo4j.com\/\" target=\"_blank\">Neo4J<\/a><strong> <\/strong>and <a href=\"https:\/\/linkurio.us\/\">Linkuri<\/a><a href=\"https:\/\/linkurio.us\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"o (opens in a new tab)\">o<\/a><a href=\"https:\/\/linkurio.us\/\">us<\/a> to explore the interactions in the data.<br \/><\/p>\n\n\n\n<p>Clearly, the above two use cases present a problem. The information we are looking for is locked away in free text. We might be interested in which priests interacted with aforementioned cardinal or which government official talked to which known money launderer. Manually extracting useful information from these heaps of unstructured data can prove to be a tedious and labourious process. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How<\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405-819x1024.jpg\" alt=\"\" class=\"wp-image-18555\" width=\"145\" height=\"181\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405-819x1024.jpg 819w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405-240x300.jpg 240w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405-768x960.jpg 768w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405-1229x1536.jpg 1229w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405-1638x2048.jpg 1638w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405-1024x1280.jpg 1024w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/Game-of-Thrones1-e1554996479405.jpg 1728w\" sizes=\"auto, (max-width: 145px) 100vw, 145px\" \/><\/figure><\/div>\n\n\n\n<p>To explain how we approach this problem, I will use an example that is hopefully familiar to most of you. We will be using the first novel in the A Song of Ice and Fire book series by George R.R. Martin: <strong>A Game of Thrones<\/strong>. With 400+ named characters over the span of approximately 700 pages, there is a lot of information to be gained. If you still have not read\/watched anything Game of Thrones, <a href=\"https:\/\/media.giphy.com\/media\/Ob7p7lDT99cd2\/giphy.gif\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">check this<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Named Entities<\/strong><\/h4>\n\n\n\n<p>To gain an understanding of who is interacting with whom, we would first need to identify characters in this raw text. In NLP, characters are typically a subdivision of what is known as <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Named_entity\" target=\"_blank\">Named Entities<\/a>. Named Entities can be anything ranging from corporations to cities, from characters to currencies, or as a linguist might say, a <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Proper_noun\" target=\"_blank\">proper noun<\/a>. To put it crudely, if it has a capital letter at the beginning of the word, we want to know about it (at least, in English). Now, extracting Named Entities is traditionally done by firstly performing <a href=\"https:\/\/en.wikipedia.org\/wiki\/Part_of_speech\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Part-of-Speech<\/a>-tagging. Basically, this technique attempts to classify the word form of each word, i.e.: nouns, verbs, prepositions etc. This captures the syntactic and semantic meaning of the sentence which in turn should help figuring out if a word is indeed a Named Entity. There are plenty of open source, off-the-shelf tools that we can use to identify such words.<br \/><\/p>\n\n\n\n<p>For the sake of simplicity, let us assume that we have successfully identified all Named Entities in our text. Could we now start creating a social network of character interactions? Well, if we define that two characters occurring in the same sentence constitutes an \u2018interaction\u2019, we could. However, if we would start creating our character interactions at this point, we would be left with a very sparse graph. In normal discourse, characters are not all that frequently mentioned by their names. In fact, about \u00be of character references in novels are mentioned in the form of anaphoric pronouns such as:<em> he, him, his, she, her <\/em>and <em>hers<\/em>. This means that we would be missing out on ~75% of our interaction data!<br \/><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Anaphora Resolution<\/strong><\/h4>\n\n\n\n<p>Luckily for us, this problem is not new, and there are several studies that show how to accomplish this. Some of the Machine Learning features to such an <a href=\"https:\/\/www.mitpressjournals.org\/doi\/pdfplus\/10.1162\/089120101753342653\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">approach<\/a> include: 1) <em>the antecedent part-of-speech<\/em>, &nbsp;2) <em>whether if the pronoun and antecedent appear in the same quotation scope<\/em>, 3) <em>pronoun and antecedent agree for gender<\/em>, and 4) <em>the word distance between the pronoun and antecedent<\/em>. With this information, we can train a model to help out with the following (personal favourite) excerpt:<br \/><\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>   1. Bran thought about it. <br \/>   2. <em>\u201cCan a man still be brave if he\u2019s afraid?\u201d<\/em><br \/>   3. <em>\u201cThat is the only time a man can be brave,\u201d<\/em> Ned told him.<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>In the last sentence, we see <em>Ned<\/em> and <em>him.<\/em> By resolving the anaphoric pronoun of <em>him<\/em> to <em>Bran<\/em>, we would know that <em>Ned<\/em> and <em>Bran<\/em> interact in this sentence. Now, for those of you still paying attention, in the second sentence, <em>he <\/em>cannot and should not be resolved to any character. It refers to <em>a man<\/em>, which makes <em>he <\/em>a generic pronoun. Resolving these properly is still quite difficult and is therefore left out of the scope of this experiment. <br \/><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Character Clustering<\/strong><\/h4>\n\n\n\n<p>Phew, nearly there. We have a way to identify persons and a way to identify pronouns referring to these persons. Are we done yet? Well, almost. While we have indeed established a way of identifying persons, we haven\u2019t yet touched the concept of a character. For example, while <em>Tyrion<\/em>, <em>Tyrion Lannister<\/em>, <em>Lord Tyrion<\/em>, <em>The Hand of the King<\/em>, and <em>The Imp<\/em>, would all be correct identifications of a person, we wouldn\u2019t have any way of knowing that these references belong to the same character. So we will need to do some clustering before we can create a social network that does the novel justice. We can cluster some of these with relative ease, using permutations of the names, but the latter two nicknames look nothing like the character\u2019s actual name. This problem is similar to that of the generic pronouns (<em>a man<\/em>) and is therefore not included in this scope.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Results<\/h3>\n\n\n\n<p>Now, why did we go through all of this trouble again? We are looking to create a social network of character interactions, so that we can get some information about the contents at a glance. We now know which of the characters occur in which sentences, so we can figure out when characters co-occur. We can represent characters by nodes and interaction by weighted edges between those nodes and we would have a network. So, let\u2019s just do that!<br \/><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/ZhlnL_-Y9Hor3rDZjXw_KFL4-NL1vylAxLntReoKAsl1uSlVwgvKpD_c1UaqeASSDeNK3bE7kh9tHTMcbTvNGbqS7bX6TpXqlZMKc1YXWGzlfnVhxeWHG2eJ16sFQZVgktvDXRDd\" alt=\"A technically correct representation of the network.\" \/><figcaption><br \/>Figure 1<em>. A technically correct network visualisation of A Game of Thrones.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Well, maybe we jumped the gun on that one. After all, our primary goal was to have a visualisation that helps its user to quickly obtain basic information that would otherwise take a lot of reading. Clearly, the type of visualisation we make depends heavily on the goal that we have. If we were just interested in the key-players, a simple bar-chart with character counts would have sufficed. However, in our case, we would like to know who is interacting with whom, which makes a network a logical choice. But, given that us humans can only take in so much information at a time, we can help guide our brains by reducing some of the noise. With a <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Force-directed_graph_drawing\" target=\"_blank\">Force Directed<\/a><strong> <\/strong>drawing algorithm, node and edge scaling and some more visual sugar, we can quickly generate something that actually looks useful. In fact, I\u2019ve included an interactive visualisation below that allows for even more exploratory flexibility, be sure to check it out in <a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/got\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"full size (opens in a new tab)\">full size<\/a>!<br \/><\/p>\n\n\n\n<div id=\"niels\">\n\n\n<div class=\"main\" id=\"main\">\n\t<div>\n\t\t<h1><span class=\"GOT\">Game <font size=\"-0.25\">of<\/font> Thrones<\/span><\/h1>\n\t<\/div>\n\n\n\nvar clientwidth= document.getElementById(&#8220;niels&#8221;).clientWidth;\nvar margin = {top: -20, right: -20, bottom: -20, left: -20},\n    width = clientwidth &#8211; margin.left &#8211; margin.right,\n    height = window.innerHeight * 0.85 &#8211; margin.top &#8211; margin.bottom;\n\nvar min_zoom = 0.3;\nvar max_zoom = 5;\nvar scale = 0.75;\n\nvar transform = d3.zoomIdentity.translate(-50, 150).scale(scale);\n\nvar zoom = d3.zoom()\n            .scaleExtent([min_zoom, max_zoom])\n            .on(&#8220;zoom&#8221;, handleZoom)\n\nfunction handleZoom(){\n  if (container) {\n    container.attr(&#8220;transform&#8221;, d3.event.transform);\n  }\n};\n\nvar svg = d3.select(&#8220;#main&#8221;).append(&#8220;svg&#8221;)\n    .attr(&#8220;width&#8221;, width + margin.left + margin.right)\n    .attr(&#8220;height&#8221;, height + margin.top + margin.bottom)\n    .call(zoom)\n    .call(zoom.transform, transform)\n    .on(&#8220;dblclick.zoom&#8221;, null)\n    .append(&#8220;g&#8221;);\n\nvar color = d3.scaleOrdinal(d3.schemeCategory20);\n\nvar simulation = d3.forceSimulation()\n    .force(&#8220;link&#8221;, d3.forceLink())\n    .force(&#8220;charge&#8221;, d3.forceManyBody().strength([-120]).distanceMax([500]))\n    .force(&#8220;center&#8221;, d3.forceCenter(width \/ 2, height \/ 2));\n\nvar container = svg.append(&#8216;g&#8217;)\n  \t.attr(&#8220;transform&#8221;, transform);    \/\/ Applies initial transform\n\nvar toggle = 0;\n\nd3.json(&#8220;\/wp-content\/uploads\/got\/network.json&#8221;, function(error, graph) {\n    if (error) throw error;\n\n    function getNodeIndex(id) {\n        for (var i = 0; i = threshold) {newData.push(d); };\n        });\n\n        link = link.data(newData, function(d) {return d.source + &#8216;, &#8216; + d.target;});\n        link.exit().remove();\n        var linkEnter = link.enter()\n                        .append(&#8216;line&#8217;)\n                        .attr(&#8216;class&#8217;, &#8216;link&#8217;)\n                        .style(&#8220;stroke-width&#8221;, function (d) { return degreeSize(d.weight) })\n                        .style(&#8220;stroke-opacity&#8221;, function (d) {return d.weight \/ 20});\n\n        link = linkEnter.merge(link);\n\n        node = node.data(graph.nodes);\n\n        simulation\n            .nodes(graph.nodes)\n            .on(&#8216;tick&#8217;, ticked)\n            .force(&#8220;link&#8221;)\n            .links(newData);\n\n        simulation.alphaTarget(0.1).restart();\n    }\n\n    redraw(2)\n});\n\nfunction dragstarted(d) {\n    if (!d3.event.active) simulation.alphaTarget(0.3).restart();\n    d.fx = d.x;\n    d.fy = d.y;\n}\n\nfunction dragged(d) {\n    d.fx = d3.event.x;\n    d.fy = d3.event.y;\n}\n\nfunction dragended(d) {\n    if (!d3.event.active) simulation.alphaTarget(0);\n    d.fx = null;\n    d.fy = null;\n}\n\nfunction zoomed() {\n    container.attr(&#8220;transform&#8221;, &#8220;translate(&#8221; + d3.event.transform.x + &#8220;, &#8221; + d3.event.transform.y + &#8220;) scale(&#8221; + d3.event.transform.k + &#8220;)&#8221;);\n}\n\n\n<\/div>\n<\/div>\n\n\n\n<p style=\"text-align:right\"><strong><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/got\/\" target=\"_blank\">Check out the full-screen&nbsp;visualisation<\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Observations<\/strong><\/h3>\n\n\n\n<p>So what can we gather from this? The first thing that stands out is the large supercluster that basically contains all the key players. Only one other cluster can be found that is far from this supercluster, and that one is centered around <em>Dany<\/em>, <em>Jorah Mormont<\/em>, and <em>Khal Drogo<\/em>. This is reflective of their role in the narrative, all of them being on an entirely different continent. <em>Jon Snow <\/em>is in this narrative too, as a major character, but he does not interact with a large part of this supercluster, which is why he is rightly positioned at the edge of the network. Lastly, note the node of <em>Ned Stark<\/em>. From this network, he truly seems like the main character of the story; smack in the middle and strongly connected to most major characters. His centrality underpins the shock of many fans when he met his untimely demise in only the first novel of the series. <br \/><\/p>\n\n\n\n<p>Clearly, we are imposing prior knowledge onto this graph, but we hope you see the value in such a visualisation. Applying a technique like this to large corpora of text, such as in our introductory criminal examples, could help steer the investigatory team in the right direction.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusions<\/h3>\n\n\n\n<p>In this blog post, we have explored how to get critical information on social structures from unstructured text. Our goal was to leverage Machine Learning techniques to automatically harvest character relationships, and visualise those in such a way that we can extract sensible, albeit general, information with a cursory glance. <\/p>\n\n\n\n<p>For a more in-depth explanation, have a look at the accompanying paper: <a href=\"http:\/\/peerj.com\/articles\/cs-189\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">http:\/\/peerj.com\/articles\/cs-189<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Further reading<\/h3>\n\n\n\n<p>If you are still up for more, have a look at these papers:<br \/><a href=\"http:\/\/www.aclweb.org\/anthology\/I13-1171\">Automatic Extraction of Social Networks from Literary Text <\/a><br \/><a href=\"http:\/\/www.aclweb.org\/anthology\/P14-1035\">A Bayesian Mixed Effects Model of Literary Character<\/a> <br \/><a href=\"http:\/\/www.aclweb.org\/anthology\/W14-0905\">Structure-based Clustering of Novels<\/a>  <br \/><\/p>\n\n\n\n<p style=\"text-align:left\"><strong>Trifork<\/strong> <br \/>Read what else Trifork is doing with Machine Learning on our website: <br \/><a href=\"https:\/\/trifork.com\/machine-learning\/\">https:\/\/trifork.com\/machine-learning\/<\/a><\/p>\n\n\n\n<p><br \/><\/p>\n\n\n\n<p><br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cDid you know? You are just six handshakes away from meeting the President of the USA.\u201d I am not sure when I first heard this statement, but it sure is a captivating premise. I have heard it many times since, cited as a fun-fact at family birthdays by semi-knowledgeable uncles or as super inspirational introductory [&hellip;]<\/p>\n","protected":false},"author":86,"featured_media":18594,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[112],"tags":[492,451,493],"class_list":["post-18432","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence-machine-learning","tag-game-of-thrones","tag-natural-language-processing","tag-social-networks"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Game of Thrones Network Science - Trifork Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Game of Thrones Network Science - Trifork Blog\" \/>\n<meta property=\"og:description\" content=\"\u201cDid you know? You are just six handshakes away from meeting the President of the USA.\u201d I am not sure when I first heard this statement, but it sure is a captivating premise. I have heard it many times since, cited as a fun-fact at family birthdays by semi-knowledgeable uncles or as super inspirational introductory [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/\" \/>\n<meta property=\"og:site_name\" content=\"Trifork Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-18T12:24:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1378\" \/>\n\t<meta property=\"og:image:height\" content=\"522\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Niels Dekker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Niels Dekker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/\",\"url\":\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/\",\"name\":\"Game of Thrones Network Science - Trifork Blog\",\"isPartOf\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png\",\"datePublished\":\"2019-04-18T12:24:31+00:00\",\"author\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/5828bb5274a83af6eb49bca688ebd7b0\"},\"breadcrumb\":{\"@id\":\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#primaryimage\",\"url\":\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png\",\"contentUrl\":\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png\",\"width\":1378,\"height\":522},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trifork.nl\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Game of Thrones Network Science\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trifork.nl\/blog\/#website\",\"url\":\"https:\/\/trifork.nl\/blog\/\",\"name\":\"Trifork Blog\",\"description\":\"Keep updated on the technical solutions Trifork is working on!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trifork.nl\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/5828bb5274a83af6eb49bca688ebd7b0\",\"name\":\"Niels Dekker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/276b628f1151ee33cfd1e2e241b6ca1b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/276b628f1151ee33cfd1e2e241b6ca1b?s=96&d=mm&r=g\",\"caption\":\"Niels Dekker\"},\"url\":\"https:\/\/trifork.nl\/blog\/author\/nielsd\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Game of Thrones Network Science - Trifork Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/","og_locale":"en_US","og_type":"article","og_title":"Game of Thrones Network Science - Trifork Blog","og_description":"\u201cDid you know? You are just six handshakes away from meeting the President of the USA.\u201d I am not sure when I first heard this statement, but it sure is a captivating premise. I have heard it many times since, cited as a fun-fact at family birthdays by semi-knowledgeable uncles or as super inspirational introductory [&hellip;]","og_url":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/","og_site_name":"Trifork Blog","article_published_time":"2019-04-18T12:24:31+00:00","og_image":[{"width":1378,"height":522,"url":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png","type":"image\/png"}],"author":"Niels Dekker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Niels Dekker","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/","url":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/","name":"Game of Thrones Network Science - Trifork Blog","isPartOf":{"@id":"https:\/\/trifork.nl\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#primaryimage"},"image":{"@id":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#primaryimage"},"thumbnailUrl":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png","datePublished":"2019-04-18T12:24:31+00:00","author":{"@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/5828bb5274a83af6eb49bca688ebd7b0"},"breadcrumb":{"@id":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#primaryimage","url":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png","contentUrl":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2019\/04\/separation-1-1024x221-2.png","width":1378,"height":522},{"@type":"BreadcrumbList","@id":"https:\/\/trifork.nl\/blog\/game-of-thrones-network-science\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trifork.nl\/blog\/"},{"@type":"ListItem","position":2,"name":"Game of Thrones Network Science"}]},{"@type":"WebSite","@id":"https:\/\/trifork.nl\/blog\/#website","url":"https:\/\/trifork.nl\/blog\/","name":"Trifork Blog","description":"Keep updated on the technical solutions Trifork is working on!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trifork.nl\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/5828bb5274a83af6eb49bca688ebd7b0","name":"Niels Dekker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/276b628f1151ee33cfd1e2e241b6ca1b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/276b628f1151ee33cfd1e2e241b6ca1b?s=96&d=mm&r=g","caption":"Niels Dekker"},"url":"https:\/\/trifork.nl\/blog\/author\/nielsd\/"}]}},"_links":{"self":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/18432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/comments?post=18432"}],"version-history":[{"count":0,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/18432\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media\/18594"}],"wp:attachment":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media?parent=18432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/categories?post=18432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/tags?post=18432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}