In Part I of this series, I showed how to get the Victorian masterpiece, A Dictionary of Greek and Roman Biography and Mythology by William Smith, LLD, ed. In Part II I’m going to explore it, but not in an archaic, linear fashion. It’s 2017–we can do better.
I wanted to move beyond mere word counts, and a sentiment analysis makes little sense in this context. And so after perusing several entries, I was struck by the image of the network. A network is an abstraction, a visual representation of connections both explicit and implicit. Networks are interesting (and very, very slippery) because their cumulative effect is impossible to pin down; if I see a basketball, a volleyball, a baseball, and a volleyball together, I might think “talent”, “hard work”, “achievement”. But someone else could view the same cluster of objects and think “absurdity”, “waste of time”, and “barbarism”. Our experience shapes our perception of networks.
Which brings us to our dictionary–I want to depict networks of entries around certain subjects like “the Peloponnesian War”, “Heresy”, or even individuals like “Achilles”. Then I want to see and feel now the cumulative effect of these networks complements or clashes with any preconceived notions. The code below gets us there.
A brief explanation: the function
subject_network first filters all entries containing a regex of the subject input. Stop words are removed, and the 25 top occurring entries. A binary correlation is then calculated between the words, with the option of isolating correlations to subject. Then the correlation is plotted as a network.
Hannibal and Scipio, the two great generals of the Punic Wars, are in the center of the action. The network is built out by other important generals, consuls, and statesmen. Cumulative Effect: Hmmm, generals and senators…but what is the connection to Plautus the comedian and Romulus? As I’ve since learned, Plautus’ plays can be read as commentary on the Second Punic War. And Romulus is connected to the historian Dionysius, whose major work attempts to justify Roman dominance up to the First Punic War. He popularized the myth of Romulus for the people.
The Athens network is a role call of the great philosophers, heroes, lawmakers, generals, historians, and playwrights of the Classical Period. Cumulative Effect: None.
center_subject = TRUE, you can center the network on the given subject. Here Achilles is enmeshed with the gods and heroes from the Trojan War. Cumulative Effect: None. Achilles was an A-list celeb among gods and humans.
The code in this post owes much to David Robinson’s fascinating work on the Stack Overflow surveys.