Desdemona

9
Have you network’d tonight, Desdemona? Using Network Science to Analyze Scripts

Transcript of Desdemona

Have you network’d tonight, Desdemona?

Using Network Science to Analyze Scripts

Why Not Just Read the Script?● One picture is worth 1,000 words (use network as a

navigational chart)a. Othello (W.Shakespeare): 28,000 wordsb. War and Peace (L.Tolstoy): 587,000 wordsc. A la Recherche du Temps Perdu (M.Proust): 1,267,000 words

● The script may be in Chinese, Arabic or Russian--and you still want to know who is the main character...

● ...which may not be clear even if the script is in English! (Hint: it’s Iago!)

Use social network analysis (SNA).

Not Invented HereT.Eliassi-Rad and M.Gupte, “Measuring Tie Strength in Implicit Social Networks,” Proceedings of the 4th ACM International Conference on Web Science (WebSci'12), Evanston, IL, June 2012.

Co-OccurrenceTwo characters are connected if they occur in the same scene. Co-occurrences can be traced by hand (for Othello) or using a computer program.

1. Get a good electronic source, ideally with character names and act/scene boundaries properly designated; say, this

2. Write a computer program to extract the information

Python Code Sample# Import all required modulesimport bs4 as bs, re, urllib.request, networkx as nxfrom networkx.algorithms import bipartite

# Use this free and well-structured electronic textURL = 'http://shakespeare.mit.edu/othello/full.html'

# Download the text and "cook" a "soup"soup = bs.BeautifulSoup(urllib.request.urlopen(URL), 'html5lib') ….

Save the Network into a File & Load into Gephi● Gephi is a “Microsoft Draw” for SNA.● Can be used to create networks by hand, but much more

efficient for processing previously constructed networks.● Display the network, but also calculate centralities--

they may tell us what the story is about

Note to self: ask RC if have more time, and switch to Gephi if affirmative

Hope It Worked!

How about War & Peace?

Take Home MessageDigital Humanities = Digital + Humanities

Take both!