Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
“A Quaint and Curious Volume of Forgotten Lore,” or an Exercise in Digital Humanities
1. “A Quaint and Curious Volume of
Forgotten Lore,” or an Exercise in
Digital Humanities
Dmitry Zinoviev (Math & Computer Science)
Fall 2018
2. 2
Digital Humanities (DH) incorporate the
methodologies from traditional humanities
disciplines...
...such as history, philosophy, linguistics, literature,
theater, art, archaeology, music, and cultural studies…
...and integrate them with computing-oriented
tools…
...hypertext and hypermedia, data visualization,
information retrieval, digital mapping, digital
archives, digital publishing, complex network
analysis, media analysis, data mining, statistics, and
text mining.
3. 3
Source and Goals
● Source: Loss of Breath.
The Unfinished Life and
Death of Edgar Allan
Poe, a play in two acts for
puppets and masks by
Wesley Savick
● Goals: Apply DH
methods to the text of the
play to extract and rank
characters, their
interactions, and
collaborations
4. 4
Start with the “Raw” Text
SKELETON
...a willful, if not futile, consolation.
And yet, even so, our sky,
Once so clear and blue,
Darkened...
=THE MASQUE OF THE RED DEATH=
Part One
DUCHESS OF FLOUNCE
The "Red Death" had long devastated the country.
DUKE OF BOUNCE
No pestilence had ever been so fatal...
5. 5
Annotate Text
SKELETON
...a willful, if not futile, consolation.
And yet, even so, our sky,
Once so clear and blue,
Darkened...
=THE MASQUE OF THE RED DEATH=
Part One
DUCHESS OF FLOUNCE
The "Red Death" had long devastated the country.
DUKE OF BOUNCE
No pestilence had ever been so fatal...
Character
New scene (end of any interaction)
Character
Character
Interaction
6. 6
Python Script (“Darkness there and nothing
more...”)
from collections import Counter
import networkx as nx, community
with open("LOB TEXT.txt", encoding="latin-1") as infile:
text = infile.read()
text = text[text.index("revision =") + len("revision ="):
text.index("=END OF PLAY=")]
lines = [line for line in map(str.strip, text.split("n")) if line]
# Locate characters and scene/act boundaries
lines = [line if not (line.startswith("=") and line.endswith("=")) else "$" for line in lines]
synonyms = {'DUKE' : 'DUKE OF BOUNCE', 'DUCHESS' : 'DUCHESS OF FLOUNCE', 'EDGAR' : 'POE',}
chars = [synonyms.get(line, line) for line in lines if line.isupper() or line=='$']
G = nx.DiGraph([(*edge, {'weight': w}) for edge, w in Counter(zip(chars, chars[1:])).items()])
G.remove_nodes_from(['$', 'É?'])
nx.set_node_attributes(G, dict(G.in_degree(weight='weight')), "speak")
nx.set_node_attributes(G, nx.betweenness_centrality(G), "betw")
nx.set_node_attributes(G, community.best_partition(nx.Graph(G)), "part")
nx.write_graphml(G, "characters.graphml")
7. 7
Identify Interacting Characters
BARKER
SKELETON
MRS POE
MUDDY
VIRGINIA
POE
LACK O' BREATH
V/O
COACH DRIVER
THIRD GENTLEMAN
SECOND GENTLEMAN
FIRST GENTLEMAN
CROW LANDLORD
SURGEON
GUARD ONE
GUARD TWO
PRISONER
SHADOW
PROSPERO
DUCHESS OF FLOUNCE
DUKE OF BOUNCE
ENSEMBLE
ENSEMBLE SOLO
BUFFOONS
ALL
BALLET DANCERS
IMPROVISATORI
MUSICIANS
BEAUTIES
SOMMELIERS
BUFFOON
SOMMELIER
DUKE AND DUCHESS
BALLET DANCER
TBA
WAKI CHORUS
SH'TE
CROW
8. 8
Identify Interactions
BARKER
SKELETON
MRS POE
MUDDY
VIRGINIA
POE
LACK O' BREATH
V/O
COACH DRIVER
THIRD GENTLEMAN
SECOND GENTLEMAN
FIRST GENTLEMAN
CROW LANDLORD
SURGEON
GUARD ONE
GUARD TWO
PRISONER
SHADOW
PROSPERO
DUCHESS OF FLOUNCE
DUKE OF BOUNCE
ENSEMBLE
ENSEMBLE SOLO
BUFFOONS
ALL
BALLET DANCERS
IMPROVISATORI
MUSICIANS
BEAUTIES
SOMMELIERS
BUFFOON
SOMMELIER
DUKE AND DUCHESS
BALLET DANCER
TBA
WAKI CHORUS
SH'TE
CROW
The thicker = the stronger
9. 9
Calculate Contributions
BARKER
SKELETON
MRS POE
MUDDY
VIRGINIA
POE
LACK O' BREATH
V/O
COACH DRIVER
THIRD GENTLEMAN
SECOND GENTLEMAN
FIRST GENTLEMAN
CROW LANDLORD
SURGEON
GUARD ONE
GUARD TWO
PRISONER
SHADOW
PROSPERO
DUCHESS OF FLOUNCE
DUKE OF BOUNCE
ENSEMBLE
ENSEMBLE SOLO
BUFFOONS
ALL
BALLET DANCERS
IMPROVISATORI
MUSICIANS
BEAUTIES
SOMMELIERS
BUFFOON
SOMMELIER
DUKE AND DUCHESS
BALLET DANCER
TBA
WAKI CHORUS
SH'TE
CROW
The bigger = the louder
10. 10
Detect Communities (Clusters)
BARKER
SKELETON
MRS POE
MUDDY
VIRGINIA
POE
LACK O' BREATH
V/O
COACH DRIVER
THIRD GENTLEMAN
SECOND GENTLEMAN
FIRST GENTLEMAN
CROW LANDLORD
SURGEON
GUARD ONE
GUARD TWO
PRISONER
SHADOW
PROSPERO
DUCHESS OF FLOUNCE
DUKE OF BOUNCE
ENSEMBLE
ENSEMBLE SOLO
BUFFOONS
ALL
BALLET DANCERS
IMPROVISATORI
MUSICIANS
BEAUTIES
SOMMELIERS
BUFFOON
SOMMELIER
DUKE AND DUCHESS
BALLET DANCER
TBA
WAKI CHORUS
SH'TE
CROW
Clusters = separate major story
lines
11. 11
Compute Betweenness Centrality
BARKER
SKELETON
MRS POE
MUDDY
VIRGINIA
POE
LACK O' BREATH
V/O
COACH DRIVER
THIRD GENTLEMAN
SECOND GENTLEMAN
FIRST GENTLEMAN
CROW LANDLORD
SURGEON
GUARD ONE
GUARD TWO
PRISONER
SHADOW
PROSPERO
DUCHESS OF FLOUNCE
DUKE OF BOUNCE
ENSEMBLE
ENSEMBLE SOLO
BUFFOONS
ALL
BALLET DANCERS
IMPROVISATORI
MUSICIANS
BEAUTIES
SOMMELIERS
BUFFOON
SOMMELIER
DUKE AND DUCHESS
BALLET DANCER
TBA
WAKI CHORUS
SH'TE
CROW
“Central” = “essential”
12. 12
Results
● Five story lines:
– The “Waki / Sh’te /
Chorus” line
– The “Prospero” line
– The “Skeleton” line
– The “V/O” line (what’s V/
O?)
– The “Duke of Bounce”
line
● The lines are loosely
connected (but the first
line is quite isolated)
● Could estimate the
dynamics of switching
from one line to another
(but didn’t)