Anthology of Computers and the Humanities · Volume 3

Embedded in the Labyrinth: Investigating Latin Word Senses through Transformer-Based Contextual Embeddings and Attention

Vojtěch Kaše1 ORCID , Sarah Lang2 ORCID and Petr Pavlas1 ORCID

  • 1 Institute of Philosophy, Czech Academy of Sciences, Prague, Czech Republic
  • 2 Max Planck Institute for the History of Science, Berlin, Germany

Permanent Link: https://doi.org/10.63744/FuaAvdPMdtwW

Published: 21 November 2025

Keywords: labyrinth, keyword-in-context, computational Latin philology, contextual word embeddings, automatic word sense disambiguation, word sense induction, semantic change detection, metaphor detection

Abstract

This paper explores how transformer-based models can enhance historical keyword-in-context studies through automatic word sense disambiguation (WSD). Using the Latin term labyrinthus as a case study, we analyze its contextual meanings across time and genre within the GreLa corpus. A Large language model provides preliminary sense labels, which we use to evaluate 64 embedding variants—contextual, attention-based, and co-occurrence-based—derived from XLM-R and Latin BERT. Our results show that combining embedding types yields the best performance. We also illustrate how attention-based embeddings capture meaningful diachronic patterns, offering promising directions for future research on semantic change and metaphor in historical texts.