A data science and machine learning approach to continuous analysis of Shakespeare's plays
A data science and machine learning approach to continuous analysis of Shakespeare's plays
Charles F. Swisher,L. Shamir
2023 · DOI: 10.46298/jdmdh.10829
Journal of Data Mining and Digital Humanities · 5 Citations
TLDR
Applying machine learning to make a stylometric prediction of the year of the play shows a Pearson correlation of 0.71 between the actual and predicted year, indicating that Shakespeare's writing style as reflected by the quantitative measurements changed over time.
Abstract
The availability of quantitative text analysis methods has provided new ways
of analyzing literature in a manner that was not available in thepre-information era. Here we apply comprehensive machine learning analysis tothe work of William Shakespeare. The analysis shows clear changes in the styleof writing over time, with the most significant changes in the sentence length,frequency of adjectives and adverbs, and the sentiments expressed in the text.Applying machine learning to make a stylometric prediction of the year of theplay shows a Pearson correlation of 0.71 between the actual and predicted year,indicating that Shakespeare's writing style as reflected by the quantitativemeasurements changed over time. Additionally, it shows that the stylometrics ofsome of the plays is more similar to plays written either before or after theyear they were written. For instance, Romeo and Juliet is dated 1596, but ismore similar in stylometrics to plays written by Shakespeare after 1600. Thesource code for the analysis is available for free download.