Elamur Research⌕
☰
home / papers / 2023 / A Computational Analysis of the Voices of Shakespeare's Characters

A Computational Analysis of the Voices of Shakespeare's Characters

Paper · 2023 · Liviu P. Dinu and Ana Sabina Uban

Summary

The paper asks whether characters within one author's work can be told apart computationally, the way authorship attribution separates different writers. Shakespeare's plays are the case study. Each play was split into lines tagged by speaker, and characters below a size threshold were dropped, leaving 50 characters across 32 plays. Short lines were merged into chunks of ten same-speaker lines, and classes were balanced by oversampling. SVMs were trained on several feature sets (all words, chi² k-best, tf-idf content words, function words, character 2–10-grams), along with a one-hidden-layer MLP. The best character accuracy was 50%, against a 2% chance level. Among the SVM features, content words did far better than function words. This suggests the characters differ mainly in what they talk about, not in the unconscious stylistic markers that distinguish authors. To check whether the models were really just recognising the play, the authors ran the same setup on play classification and also classified characters within single plays. Characters stayed separable inside a play, so play identity explains part of the signal but not all of it.

Key points

  • Data: 50 Shakespeare characters from 32 plays, with data points made of 10 concatenated lines; 80/20 train/test split and accuracy averaged per class; vocabulary of 13,559 words.
  • Character accuracy:
    • MLP (1000 hidden units, all words): 50%.
    • SVM with all words: 30%; with content words: 30%.
    • SVM with character n-grams: 18%; with k-best (100): 13%; with function words: 6%.
  • Play classification (chance about 3%): SVM with content words reached 39%, and stopwords alone reached 8%. Removing function words helped for plays.
  • Within-play character classification used SVM with content words on the 4 plays with more than 2 characters. Average accuracy was 58.5%, against a 30% random baseline (Othello 64%, Henry IV 62%, Troilus and Cressida 57%, Antony and Cleopatra 51%).
  • On a 12-character, 4-play set, errors were tallied by type: correct, wrong character from the same play, or wrong character from another play. Cross-play mistakes were frequent.

Interesting ideas

  • I1. Rerun the same pipeline on a coarser label that may be confounded with the target (play instead of character) to measure how much the "signal" is really that confound.
  • I2. Split classification errors into "confused with a sibling in the same group" versus "confused with something in another group" to show what structure the model actually learned.
  • I3. Ablate function words against content words to separate style from topic.
  • I4. Treating each speaker's lines as a separate voice suggests speaker profiles as a useful structure in narrative text.
  • I5. Merging short utterances into larger same-speaker chunks makes sparse per-line evidence usable.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (learn): Use this as a negative control in evaluation, e.g. check whether a component's success on a test is explained by document or source identity rather than the intended linguistic skill.
  • I2 (learn): Apply this error taxonomy to parser and frame outputs, e.g. separating wrong label within the same relation family from a wrong family, to target repair rules.
  • I3 (frames): A similar ablation over tree-derived features (syntactic patterns versus lexical heads) could show whether speaker or speech-act cues come from construction or content.
  • I4 (world): Keep per-character speech profiles (topics, typical frames) as entity attributes, so QA on tales can answer "who would say this" or check speaker attribution of quotes.
  • I5 (frames): When attributing quotes or resolving coreference across dialogue, pool evidence across a speaker's consecutive turns instead of deciding line by line.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Liviu P. Dinu and Ana Sabina Uban. 2023. A Computational Analysis of the Voices of Shakespeare's Characters. Proceedings of the 14th International Conference on Recent Advances in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{dinu2023computational,
  title = {{A Computational Analysis of the Voices of Shakespeare's Characters}},
  author = {Liviu P. Dinu and Ana Sabina Uban},
  booktitle = {Proceedings of the 14th International Conference on Recent Advances in Natural Language Processing},
  year = {2023},
  doi = {10.26615/978-954-452-092-2\_033},
  url = {https://doi.org/10.26615/978-954-452-092-2_033}
}

References

20 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Harald Baayen, Hans Van Halteren, and Fiona Tweedie. 1996. Outside the cave of shadows: Using syntactic annotation to enhance authorship attribution. Literary and Linguistic Computing, 11(3):121–132. ↗
  2. JF Burrows. 1987. Computation into criticism: a study of jane austen’s novels andan experiment in method. find
  3. John Burrows and Hugh Craig. 2012. Authors and characters. English studies, 93(3):292–309. ↗
  4. Jonathan Culpeper. 2009. Keyness: Words, parts-of-speech and semantic categories in the character-talk of shakespeare’s romeo and juliet. International Journal of Corpus Linguistics, 14(1):29–59. find
  5. Thomas Corwin Mendenhall. 1901. A menchanical solution of a literary problem. Popular Science Monthly, 60(2). find
  6. Frederick Mosteller and David L Wallace. 1963. Inference in an authorship problem: A comparative study of discrimination methods applied to the authorship of the disputed federalist papers. Journal of the American Statistical Association, 58(302):275–309. find
  7. Grace Muzny, Mark Algee-Hewitt, and Dan Jurafsky. 2017. Dialogism in the novel: A computational model of the dialogic nature of narration and quotations. Digital Scholarship in the Humanities, 32(suppl 2):ii31–ii52. ↗
  8. Eric T Nalisnick and Henry S Baird. 2013. Character-to-character sentiment analysis in shakespeare’s plays. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pages 479–483.
  9. Fiona J Tweedie and R Harald Baayen. 1998. How variable may a constant be? measures of lexical richness in perspective. Computers and the Humanities, 32(5):323–352. ↗
  10. Karina van Dalen-Oskam. 2014. Epistolary voices. the case of elisabeth wolff and agatha deken. Literary and Linguistic Computing, 29(3):443–451. ↗
  11. Anca Dinu, Liviu P Dinu, and Bogdan Dumitru. 2017. On the stylistic evolution from communism to democracy: Solomon marcus study case. In RANLP, pages 201–207. find
  12. Liviu P Dinu, Vlad Niculae, and Octavia-Maria Şulea. 2012. Pastiche detection based on stopword rankings. exposing impersonators of a romanian writer. In Proceedings of the Workshop on Computational Approaches to Deception Detection, pages 72–77. find
  13. Liviu P Dinu and Ana Sabina Uban. 2017. Finding a character’s voice: Stylome classification on literary characters. In Proceedings of the Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature, pages 78–82. find
  14. Liviu P Dinu and Ana Sabina Uban. 2018. Analyzing stylistic variation across different political regimes. In International Conference on Computational Linguistics and Intelligent Text Processing, pages 110– 123. Springer. find
  15. Liviu Petrisor Dinu, Marius Popescu, and Anca Dinu. 2008. Authorship identification of romanian texts with controversial paternity. In LREC. find
  16. Vlado Kešelj, Fuchun Peng, Nick Cercone, and Calvin Thomas. 2003. N-gram-based author profiles for authorship attribution. In Proceedings of the conference pacific association for computational linguistics, PACLING, volume 3, pages 255–264. sn. find
  17. Moshe Koppel and Jonathan Schler. 2003. Exploiting stylistic idiosyncrasies for authorship attribution. In Proceedings of IJCAI’03 Workshop on Computational Approaches to Style Analysis and Synthesis, volume 69, pages 72–80. find
  18. Krishnapriya Vishnubhotla, Adam Hammond, and Graeme Hirst. 2019. Are fictional voices distinguishable? classifying character voices in modern drama. In Proceedings of the 3rd Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature, pages 29–34, Minneapolis, USA. Association for Computational Linguistics. find
  19. Carl Vogel and Gerard Lynch. 2008. Computational stylometry: Who’s in a play? In Verbal and Nonverbal Features of Human-Human and Human-Machine Interaction, pages 169–186. Springer. find
  20. Rene Wellek, Austin Warren, et al. 1956. Theory of literature. Harcourt, Brace New York. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/dinu-2023-computational-analysis-voices-shakespeare-s/