Fine-tuning a model based on the Transformer architecture for normalizing a corpus of medieval texts in German from the 14th-15th centuries from the Order of Prussia.
- Authors: Kotov A.S.1
-
Affiliations:
- Issue: No 3 (2025)
- Pages: 128-140
- Section: Articles
- URL: https://journals.rcsi.science/2585-7797/article/view/361947
- DOI: https://doi.org/10.7256/2585-7797.2025.4.75275
- EDN: https://elibrary.ru/XOHQXO
- ID: 361947
Cite item
Full Text
Abstract
The article is dedicated to the methods of automatic normalization of texts in Middle High German and Early New High German for the application of NLP in medieval history research. It provides an overview of existing approaches to the automatic normalization of historical texts in German. The problems of normalizing medieval German texts are identified: the peculiarities of using substitution dictionaries and replacement rules. The limitations of these approaches and the necessity of considering the goals of normalization are described. Neural language models are defined as the most promising for automatic normalization. The study compares the effectiveness of existing neural language models (NMT) with respect to texts in Middle High German and Early New High German. It demonstrates the low effectiveness of using NMT trained on texts from the New and Modern eras. Based on reviews presented in the literature, it asserts the need to prepare NMT according to specific goals and corpora. For the normalization of texts from the 14th-15th centuries created in monastic Prussia, a neural language model based on the Transformer architecture (BART) was further trained, and its effectiveness was presented in comparison with other models. The model was trained on a custom dataset of word pairs: original-normalized, consisting of 6,570 pairs. The conditions for retraining the model were: Epoch = 28; Batch = 50. For normalizing a corpus of texts in three historical forms of the German language, the DTAEC Type Normalizer model was chosen. The effectiveness of the retrained model's normalization was compared with existing models trained on German texts from the New and Modern eras based on the metrics of Accuracy, Accuracy OOV, CER, and Levenshtein distance. The retrained model shows significant effectiveness compared to other models. One normalized sentence using the model is proposed for review, and a comparison with a benchmark is conducted. Instances of "hallucinations" in the retrained model were identified. With an Accuracy OOV of 89.6, using this method is considered promising. However, the identified shortcomings in text normalization indicate the necessity of employing additional normalization methods, such as lemmatization.
References
Burch Th. Infrastrukturprojekte zur digitalen Lexikographie. Vorgestellt am Beispiel des Zentrums für Historische Lexikographie // Digitale Mediävistik. Perspektiven der Digital Humanities für die Altgermanistik / Hrsg. Gabriel Lienert, Elisabeth Hamm, Joachim Hausmann, Albrecht Viehhauser. Oldenburg, 2022. (BmE Themenheft 12). S. 97-108. Acten der Ständetage Preußens unter der Herrschaft des Deutschen Ordens / Hrsg. von M. Toeppen. Bd. I-V. Leipzig, 1878–1886. Ehrismann O., Rmange H. Mittelhochdeutsch: Eine Einfürung in das Studium der deutschen Sprachgeschichte. Tübingen, 1976. S. 28-29. Primavesi O., Bleuler A.K. Einleitung: Lachmanns Programm einer historischen Textkritik und seine Wirkung // Lachmanns Erbe. Editionsmethoden in klassischer Philologie und germanistischer Mediävistik. Berlin, 2022. S. 11-107. Kragl F. Normalmittelhochdeutsch. Theorieentwurf einer gelebten praxis // Zeitschrift für Deutsches Altertum und Deutsche Literatur. 2015. Т. 144, № 1. S. 1-27. Atzenhofer-Baumgartner F., Kovacs T. Is text normalization relevant for classifying medieval charters? // Antonacopoulos A., et al. Linking Theory and Practice of Digital Libraries. TPDL 2024. Lecture Notes in Computer Science. V. 15178. Springer, Cham, 2024. P. 126-127. Kragl F. Normalmittelhochdeutsch. Theorieentwurf einer gelebten praxis // Zeitschrift für Deutsches Altertum und Deutsche Literatur. 2015. Т. 144, № 1. S. 26. Ehrismann O., Rmange H. Mittelhochdeutsch: Eine Einfürung in das Studium der deutschen Sprachgeschichte. Tübingen, 1976. S. 45-48. Fix H. Automatische Normalisierung – Vorarbeit zur Lemmatisierung eines diplomatischen altisländischen Textes // Maschinelle Verarbeitung altdeutscher Texte. Beiträge zum dritten Symposion, Тübingen, 17–19. Februar 1977. Ed. by Paul Sappler, Erich Straßner. Тübingen, 1980. S. 92-100. Bollmann M. A Large-Scale Comparison of Historical Text Normalization Systems // Proceedings of NAACL-HLT. Minneapolis, 2019. P. 3885. Bawden R., Poinhos J., Kogkitsidou E., Gambette Ph., Sagot B., Gabay S. Automatic Normalisation of Early Modern French // Proceedings of the 13th Conference on Language Resources and Evaluation (LREC 2022). Marseille, 2022. P. 3354. Korchagina N. Normalizing Medieval German Texts: from rules to deep learning // Proceedings of the NoDaLiDa 2017 Workshop on Processing Historical Language. Gothenburg, 2017. P. 16. Bollmann M. A Large-Scale Comparison of Historical Text Normalization Systems // Proceedings of NAACL-HLT. Minneapolis, 2019. P. 3893. Korchagina N. Normalizing Medieval German Texts: from rules to deep learning // Proceedings of the NoDaLiDa 2017 Workshop on Processing Historical Language. Gothenburg, 2017. P. 15. Bollmann M. A Large-Scale Comparison of Historical Text Normalization Systems // Proceedings of NAACL-HLT. Minneapolis, 2019. P. 3886-3887. Fix H. Automatische Normalisierung – Vorarbeit zur Lemmatisierung eines diplomatischen altisländischen Textes // Maschinelle Verarbeitung altdeutscher Texte. Beiträge zum dritten Symposion, Тübingen, 17–19. Februar 1977. Ed. by Paul Sappler, Erich Straßner. Тübingen, 1980. S. 92-100. Rayson P., Archer D., Smith N. VARD versus Word: A comparison of the UCREL variant detector and modern spell checkers on English historical corpora // Proceedings of the Corpus Linguistics Conference CL2005. Birmingham, 2005. URL: https://eprints.lancs.ac.uk/id/eprint/12686/ (дата обращения: 02.08.2025). Gotscharek A., Reffle U., Ringsltetter C., Schulz K.U., Neumann A. Towards information retrieval on historical document collections: The role of matching procedures and special lexica // International Journal on Document Analysis and Recognition. 2011. Т. 14, № 2. P. 159-171. doi: 10.1007/s10032-010-0132-6 EDN: GWJMQK. Korchagina N. Normalizing Medieval German Texts: from rules to deep learning // Proceedings of the NoDaLiDa 2017 Workshop on Processing Historical Language. Gothenburg, 2017. P. 12-17. Bollmann M., Bingel J., Søgaard A. Learning attention for historical text normalization by learning to pronounce // Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics. V. 1. Vancouver, 2017. P. 332-344. Tang G., Cap F., Pettersson E., Nivre J. An Evaluation of Neural Machine Translation Models on Historical Spelling Normalization // Proceedings of the 27th International Conference on Computational Linguistics. Santa Fe, 2018. P. 1320-1331. Wu L., Cheng S., Wang M., Li L. Language Tags Matter for Zero-Shot Neural Machine Translation // Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021. С. 3001-3007. URL: https://aclanthology.org/2021.findings-acl.264.pdf Bollmann M. A Large-Scale Comparison of Historical Text Normalization Systems // Proceedings of NAACL-HLT. Minneapolis, 2019. P. 3889. Bollmann M. A Large-Scale Comparison of Historical Text Normalization Systems // Proceedings of NAACL-HLT. Minneapolis, 2019. P. 3887. Bawden R., Poinhos J., Kogkitsidou E., Gambette Ph., Sagot B., Gabay S. Automatic Normalisation of Early Modern French // Proceedings of the 13th Conference on Language Resources and Evaluation (LREC 2022). Marseille, 2022. P. 3355-3356. Ehrmanntraut A. Historical German Text Normalization Using Type-and Token-Based Language Modeling // arXiv:2409.02841v2 [cs.CL]. 25 Feb 2025. P. 11-27. URL: https://arxiv.org/abs/2409.02841 (дата обращения: 02.08.2025). Jurish B., Ast H. Using an Alignment-based Lexicon for Canonicalization of Historical Text // Historical Corpora: Challenges and Perspectives. V. 5. Тübingen, 2015. P. 197-208. Atzenhofer-Baumgartner F., Kovacs T. Is text normalization relevant for classifying medieval charters? // Antonacopoulos A., et al. Linking Theory and Practice of Digital Libraries. TPDL 2024. Lecture Notes in Computer Science. V. 15178. Springer, Cham, 2024. P. 130-131. Fix H. Automatische Normalisierung – Vorarbeit zur Lemmatisierung eines diplomatischen altisländischen Textes // Maschinelle Verarbeitung altdeutscher Texte. Beiträge zum dritten Symposion, Тübingen, 17.-19. Februar 1977. Ed. by Paul Sappler, Erich Straßner. Тübingen, 1980. S. 92-100. Acten der Ständetage Preußens unter der Herrschaft des Deutschen Ordens / Hrsg. von M. Toeppen. Bd. III. Leipzig, 1882. S. 635.
Supplementary files

