Hostname: page-component-74656f9884-rngvg Total loading time: 0 Render date: 2026-11-05T11:58:23.538Z Has data issue: false hasContentIssue false

ALMA: Automated alignment of ancient texts using linguistic and semantic analysis

Published online by Cambridge University Press:  10 August 2026

Sophie Robert-Hayek*
Affiliation:
Sens, Texte, Informatique et Histoire (STIH), Sorbonne Université , France
Andrew Hardwick
Affiliation:
Écritures, Université de Lorraine , France
Davide D’Amico
Affiliation:
Écritures, Université de Lorraine , France
Frédérique Rey
Affiliation:
Humboldt-Universität zu Berlin , Germany
*
Corresponding author: Sophie Robert-Hayek; Email: sophie.robert@sorbonne-universite.fr
Rights & Permissions [Opens in a new window]

Abstract

Textual criticism, the task of reconstructing a text as close as possible to its original form based on multiple ancient copies, is a central concern of philologists studying ancient literature. After identifying and cataloging the available manuscripts, scholars align the texts to produce a list of variants, a process known as collation. Automating this task has been one of the earliest areas of interest for applying computational methods to the humanities. Most current approaches rely on sequence alignment algorithms, originally developed for bioinformatics. However, recent advances in monolingual and multilingual neural alignment, capable of modeling semantic, syntactic, and grammatical relationships, remain largely underutilized in this field. In this article, we introduce Alignment and Learning for Manuscript Analysis (ALMA). This new pipeline integrates lexical, grammatical, and semantic analysis to perform automatic textual alignment. We evaluate ALMA against three established alignment methods, each representing a different paradigm, on four manuscripts of the Gospel of John, two in Latin and two in Greek. ALMA achieves mean alignment scores of 94.12 percent (Latin) and 95.77 percent (Greek), significantly outperforming all baseline methods: alignment scores are improved over a deep-learning-only approach by 1.93 percent and 1.09 percent, over a grammar-based approach by 23.39 percent and 10.14 percent, and over a sequence alignment method by 38.57 percent and 13.39 percent, respectively, for Latin and Greek. Notably, in this study, ALMA is the only approach to achieve a median alignment score of 100 percent on both datasets. These results highlight ALMA’s substantial potential for advancing computational approaches for textual collation and more generally for computational philology.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Figure 1. Example of an alignment matrix of John 1:5 in Codex Corbeiensis Secundus (reference witness) and Codex Palatinus (compared witness).

Figure 1

Figure 2. Integration of ALMA within the editorial workflow.Figure 2 long description.

Figure 2

Figure 3. Overview of the multi-stage ALMA matching pipeline.Figure 3 long description.

Figure 3

Table 1. Characteristics of the monolingual gold-standard alignment.Table 1 long description.

Figure 4

Table 2. Summary of tested hyperparameters for each algorithm.Table 2 long description.

Figure 5

Table 3. Size of the fine-tuning corpus and elapsed training time for each model in Latin and Greek.Table 3 long description.

Figure 6

Table 4. Impact of model fine-tuning in Latin and in Greek, ranked by AS score within each language.Table 4 long description.

Figure 7

Figure 4. Impact of hyperparameters on AS. The impact of hyperparameters has been measured on the fine-tuned model.Figure 4 long description.

Figure 8

Table 5. Experimental protocol for the evaluation of the components of the ALMA pipeline.Table 5 long description.

Figure 9

Table 6. Results of the ablation study.Table 6 long description.

Figure 10

Table 7. Mean performance scores on Latin.Table 7 long description.

Figure 11

Table 8. Mean performance scores on Greek (sorted by AS per model class).Table 8 long description.

Figure 12

Figure 5. Statistical distribution of the AS at the verse level for the best-performing hyperparameterization of each algorithm.Figure 5 long description.

Figure 13

Table 9. Token alignments detected by ALMA and SimAlign on case 1 (Latin).Table 9 long description.

Figure 14

Table 10. Token alignments detected by ALMA and SimAlign on case 1 (Greek).Table 10 long description.

Figure 15

Table 11. Token alignments detected by ALMA and SimAlign on case 2.Table 11 long description.

Figure 16

Figure 6. Statistical distribution of AS for ALMA with the best-performing configuration.Figure 6 long description.

Figure 17

Table 12. Characteristics of lower-quartile subset (at or below Q1$Q_1$) for Latin and Greek and of the complete datasets.Table 12 long description.

Figure 18

Figure 7. Evolution of the AS for ALMA with the best-performing configuration as a function of differing token count.Figure 7 long description.

Figure 19

Table 13. Token alignments detected by ALMA.Table 13 long description.

Figure 20

Table 14. Token alignments detected by ALMA.Table 14 long description.

Figure 21

Table 15. Execution time per algorithm with the best hyperparameters per algorithm class for aligning 10 tokens.Table 15 long description.

Figure 22

Figure A1. Step 1 – Lemma matching. Three pairs resolved via shared lemma: sum↔$\leftrightarrow $sum, hoc↔$\leftrightarrow $huius (both forms of hic), and mundo↔$\leftrightarrow $mundi (both forms of mundus). Lumen and in remain unmatched (dashed).Figure A1 long description.

Figure 23

Figure A2. Step 2 – Semantic similarity scores. For lumen (row 1), the highest score is 0.727$0.727$ against lux (col. 1, teal), committing the pair lumen↔$\leftrightarrow $lux. For in (row 3), no score crosses the disambiguation threshold; in remains unmatched. Locked rows (Step 1 matches) are grayed and not acted upon.Figure A2 long description.

Figure 24

Figure A3. Step 3 – POS matching. No ambiguity to resolv. No new pairs are found. The matrix is unchanged from Step 2. In (row 3) remains unmatched.Figure A3 long description.

Figure 25

Figure A4. Step 4 – Dependency matching. Syntactic dependency relations find no additional candidates. The matrix is unchanged from Steps 1 and 2. In (row 3) remains unmatched.Figure A4 long description.

Figure 26

Figure A5. Final matrix A∈{0,1}5×4$A\in \{0,1\}^{5\times 4}$. Four of five token pairs are aligned: lumen↔$\leftrightarrow $lux (semantic), sum↔$\leftrightarrow $sum, hoc↔$\leftrightarrow $huius, and mundo↔$\leftrightarrow $mundi (all lemma). The preposition in has no counterpart in manuscript 1 and remains definitively unmatched, reflecting a genuine lexical addition in manuscript 2.Figure A5 long description.

Submit a response

Rapid Responses

No Rapid Responses have been published for this article.