TL;DR
This paper introduces BabyLemmatizer models for lemmatizing and POS-tagging three ancient Egyptian languages: Earlier Egyptian, Demotic, and Coptic. Achieving impressive accuracies (up to 99% for lemmatization and 98% for POS-tagging), these models offer a significant advancement for digital humanities research on these historically rich but computationally challenging languages.
What Problem Does This Paper Address?
Ancient Egyptian languages, particularly Demotic and Earlier Egyptian, present unique challenges for computational linguistic analysis. Their complex writing systems, extensive morphology, and high degree of ambiguity in word forms make traditional NLP techniques struggle. Specifically, lemmatization (reducing words to their dictionary form) and POS-tagging (assigning grammatical categories) are difficult because many word forms are short and can have multiple meanings or grammatical functions. This ambiguity hinders effective digital searching and quantitative analysis of these historical texts. The authors aim to bridge this gap by developing neural models capable of accurately processing these languages, making them more accessible for scholarly research.
Methods
The core of this work is the application and adaptation of BabyLemmatizer, a neural network-based pipeline originally designed for cuneiform languages. BabyLemmatizer employs a deep attentional encoder-decoder architecture, treating lemmatization and POS-tagging as machine translation tasks. For the Egyptian languages, they adapted the tokenizer to handle alphabetic scripts and explored different input encodings, including transliteration and, for Earlier Egyptian, a concatenation of hieroglyphs and transliteration. A key methodological innovation for handling ambiguity in Demotic and Earlier Egyptian was the compression of lemma identifiers. Instead of using long, arbitrary integer sequences, they mapped them to shorter, frequency-based numbers, which significantly improved the accuracy of lemmatization, especially for out-of-vocabulary (OOV) words.
Datasets
The study utilizes three primary datasets:
- Earlier Egyptian Dataset (TLA-Egy 2024): Derived from the Thesaurus Linguae Aegyptiae (TLA) corpus, comprising approximately 12,773 sentences and 70,267 tokens from the Old and Middle Egyptian periods.
- Demotic Dataset (TLA-Dem 2024): Also from the TLA corpus, this dataset includes 13,383 sentences and 117,314 tokens, representing the Demotic language.
- Coptic Dataset: Sourced from the Coptic Scriptorium project, this corpus contains 515,142 tokens and spans various Christian literary and biblical texts.
These datasets are notable for being curated and annotated by trained Egyptologists, ensuring high-quality linguistic information.
Key Insights and Ideas
- Neural models can handle ancient language ambiguity: The success of BabyLemmatizer demonstrates that neural approaches, with appropriate adaptations, can effectively tackle the inherent ambiguity in languages like Demotic and Earlier Egyptian, which have historically posed significant challenges.
- Identifier compression is crucial for OOV words: Compressing lemma identifiers, rather than using raw integer IDs, dramatically improved lemmatization accuracy for out-of-vocabulary words, suggesting that simpler, frequency-based representations are more robust for unseen forms.
- Hieroglyphic input offers marginal benefits: While concatenating hieroglyphs with transliteration for Earlier Egyptian showed some promise, particularly for OOV words, it did not significantly improve overall accuracy, possibly due to the small corpus size and the complexity of the hieroglyphic script itself.
- Dataset size and complexity matter: The performance differences across languages highlight the impact of dataset size and linguistic complexity. Coptic, with a larger corpus and less inherent ambiguity in its script, yielded higher accuracy compared to Demotic and Earlier Egyptian.
Key Results
The models achieved impressive results across the three languages:
- Earlier Egyptian: 86% lemmatization accuracy, 89% XPOS-tagging accuracy.
- Demotic: 91% lemmatization accuracy, 95% XPOS-tagging accuracy.
- Coptic: 99% lemmatization accuracy, 98% XPOS-tagging accuracy.
These accuracies represent a significant improvement over previous methods, especially for Demotic and Earlier Egyptian, where neural lemmatization had not been attempted before. The OOV lemmatization accuracy was particularly boosted by the identifier compression technique.
Limitations and Future Work
The authors acknowledge that the small corpus size for Earlier Egyptian is a significant limitation, likely contributing to the lower performance compared to Demotic and Coptic. They hypothesize that the proportionally higher number of word form types in the Earlier Egyptian corpus also plays a role. Future work could involve expanding these datasets and exploring more advanced techniques to further mitigate the impact of ambiguity and limited data. The availability of the models on Hugging Face suggests a path towards broader adoption and further refinement by the research community.
Summary updated