DH 2026

Daejeon, July 27–31

Wed, July 2916:30–18:00S020105
Long Paper

Multilingual Alignments of Multiple Text Witnesses

Janis Dähne
Martin-Luther-Universität Halle-Wittenberg, Germany · janis.daehne@informatik.uni-halle.de
Jörg Ritter
Martin-Luther-Universität Halle-Wittenberg, Germany · joerg.ritter@informatik.uni-halle.de

Abstract

In this paper we present a method for computing alignments of multiple, i.e. two or more, text witnesses across different languages. Such a tool is needed in translational studies and related research settings involving a source text and its various translations or transcreations, e.g., “The Metamorphosis” from Franz Kafka, “Alice's Adventures in Wonderland” from Lewis Carroll, different Hannah Arendt texts (“Rahel Varnhagen: The Life of a Jewess”, “Organized Guilt and Universal Responsibility”) or biblical texts.In contrast to other tools, our approach takes all relations between all possible witnesses into account. Our approach can also identify and resolve (small) transpositions and classify them into three different special cases.

Introduction

Text alignments are valuable across a wide range of humanities disciplines. They enable the identification of similarities and differences between textual witnesses, support the reconstruction of a work’s genesis, and facilitate research in translation studies, including analyses of omitted content, altered passages, and linguistic variation. The results of such alignments are often displayed in a synoptic view.

To be interpretable in this format, the alignment must satisfy certain properties. Most importantly, it must preserve the order of tokens (e.g., sentences or passages) in each textual witness and avoid transpositions. A transposition occurs when the sequence of two or more sentences differs between witnesses, which can pose problems for the synoptic representation.

Numerous tools are available for computing alignments of textual witnesses. These tools can be differentiated along several dimensions, but two properties are particularly relevant for our purposes. The first is the number of witnesses that the tool can align, and the second is whether it supports alignment across different languages or is restricted to monolingual texts. Furthermore, many-to-many alignments (n-to-m alignments) should be supported, allowing one or more sentences in one text witness to be matched to one or more sentences in the other text witness, as longer sentences are often split into several smaller sentences during translation, or vice versa. In the following, we examine several alignment tools described in the literature and evaluate them with respect to these two criteria.

CollateX (Haentjens Dekker et al. 2015) ist a well known tool that supports every step of the alignment process and provides several algorithms for aligning textual witnesses, including Dekker, Needleman–Wunsch, and MEDITE. It allows the alignment of multiple witnesses but does not support cross-lingual alignment. Notably, CollateX is also capable of detecting transpositions.

LERA (Pöckelmann et al. 2023) is an interactive environment that likewise supports all steps of the alignment workflow. It can handle multiple textual witnesses and visualizes the alignment results in a synoptic view. The system permits manual corrections to address poorly aligned segments or segmentation errors. However, similar to CollateX, it is restricted to monolingual texts. In addition to producing the alignment, LERA can detect and report transpositions.

VecAlign (Thompson et al. 2019), SentAlign (Steingrímsson et al. 2023) and CrocoAlign (Molfese et al. 2024) are specifically designed to align two textual versions written in different languages. They do so by leveraging multilingual sentence embedding models such as LASER (Artetxe et al. 2019) and LaBSE (Feng et al. 2022), which generate embeddings for sentences in the languages they were trained on. Similarity between sentences is primarily measured using cosine similarity, with tool-specific modifications applied. Unlike the tools discussed above, however, these methods support n-to-m alignments.

Among the tools discussed above, none can compute alignments across multiple textual witnesses in different languages. To the best of our knowledge, no existing tool currently provides this capability.

In this paper, we present an approach that enables the alignment of multiple text witnesses in different languages by leveraging, combining, and refining existing methods. During the development of this approach, we identified distinct special cases of transpositions that require differentiation and targeted handling.

The Approach

To develop such an approach, we began by observing that many of the necessary components already exist in current tools; they only require adaptation and integration. VecAlign performs well for multilingual alignment but is limited to two textual witnesses. In contrast, LERA can align multiple witnesses, but only when they are written in the same language. The data structure that enables LERA to handle more than two witnesses is a graph known as the Chain Graph. Importantly, this structure is not intrinsically language-dependent, it tracks which segments should be aligned and determines whether aligning two segments would introduce a transposition.

The graph contains nodes representing segments (sentences or text passages), and directed edges between nodes (the chains) preserve the order of tokens within each text witness. Aligning two segments of two different text witnesses is represented by inserting an undirected edge between the two respective nodes of these two text witnesses. In this graph, detecting a transposition is equivalent to identifying a cycle, thus, the graph must remain acyclic. The core of our approach builds on LERA’s Chain Graph, with major modifications and extensions.

These extensions were necessary because VecAlign and other multilingual alignment tools generate n-to-m relations between sentences, which LERA cannot process. To address this limitation, we extended the Chain Graph to accept and correctly handle n-to-m edges or rather the corresponding edges. In this representation, each edge specifies that the associated segments should be aligned.

With these components in place, the general workflow of our approach is as follows:

  • Compute pairwise alignments of the textual witnesses using VecAlign (or another multilingual aligner). For n text witnesses, this yields at most pairwise alignments.
  • Collect all edges generated by these pairwise alignments into a global list and sort them by similarity, rounded to two decimal places.
  • Insert edges into the Chain Graph in descending order of similarity.
    • Edges that would introduce a cycle, i.e., transpositions, are rejected and stored separately.
  • Reattempt insertion of rejected edges once all remaining edges have been processed (if requested by the user).

Although this workflow appears straightforward, several complications arise in practice. For n-to-m alignments, segments within a single text witness may be merged into a single alignment row in one pairwise alignment, while those same segments may remain separate in another alignment pair. To ensure consistency across text witnesses, segments must sometimes be merged to harmonize conflicting alignment structures. Once segments are merged, the corresponding transposition edges may become obsolete, since the previously conflicting segments no longer exist as separate units. Because we limit the number of segments that can be merged, the order in which edges are inserted becomes critical. Consequently, we process transposition edges last.

This issue is manageable when pairwise alignments share only a single text witness. However, when combining all possible alignment pairs, additional challenges emerge that relate directly to the different special cases of transpositions we identified. Identifying these cases allows us to handle them in different ways, which was not possible before with the original Chain Graph from LERA.

Special Cases of Transpositions

The first special case is not a genuine transposition but arises from the mechanism by which transpositions are detected. When the insertion of a new edge introduces a cycle, then this indicates a potential transposition. However, there is a particular scenario in which all segments in an alignment row are already connected, and a new edge would link the segments of the first and last text witnesses, thus closing a cycle. Since all of these segments will ultimately appear in the same alignment row, this situation does not constitute a true transposition. Nevertheless, because the Chain Graph must remain acyclic to enable reliable transposition detection, the newly introduced edge cannot be inserted. In such cases, we simply discard the edge.

The second special case arises when two or more segments are already aligned and should be placed in the same alignment row, but an additional edge aligns a predecessor or successor of one segment with an already aligned segment from another text witness. This configuration forms a triangular pattern that introduces a cycle. To resolve this, all segments between the predecessor (or successor) and the aligned segment within the same witness must be merged. Because this procedure can potentially produce large merged segments, we impose a user-defined limit on the maximum number of segments that may be merged. Similar to the first case, this situation does not constitute a genuine transposition in the usual sense, as no crossing edges indicate a reordered segment. Instead, it reflects that a segment was split apart in one text witness.

The final special case corresponds to classical transpositions. Here, two or more segments are already aligned and should appear in the same alignment row, but an additional edge aligns a predecessor (or successor) in one text witness to a successor (or predecessor) in another text witness. In the graph, this configuration resembles a rotated “Z”: the newly inserted edge crosses the previously aligned segments, completing a cycle (see Fig. 1 for illustration). A transposition can be resolved by merging the segments (nodes) along the cycle for each text witness. As with the previous case, we apply the user-defined threshold to limit the maximum number of segments that may be merged. If this limit is exceeded, the edge is discarded.

Transpositions are collected and processed separately, allowing the user to choose whether to resolve them automatically or to exclude them from the final alignment.In an interactive environment, it would also be possible to enable user-driven decisions for each individual transposition. Notably, the automatic resolution of transpositions was not part of the original Chain Graph, which instead rejected any edge introducing a transposition.

We performed experiments using the texts mentioned in the abstract, and the results are encouraging. We plan to extend our experiments and evaluations and to conduct a more systematic assessment as part of the COMUTE project (Balck et al. 2025). After the computation of all pairwise alignments, the runtime of our approach was consistently below one second across all tests, including the resolution of transpositions.The text “Alice's Adventures in Wonderland” has approximately 1500 sentences in each text witness and “Rahel Varnhagen” contains an average of 5000 sentences across three witnesses. Because qualitative evaluation of alignment quality remains challenging, we provide an excerpt of one of our alignment results in Table 1 for illustrative purposes.

Figure Neue Idee
Figure 1. Example for the third special case in “Alice's Adventures in Wonderland” where a cycle exists and the edges do not cross each other. The vertical edges with one horizontal edge build the rotated “Z” shape. To resolve this special case, we need to merge the two Spanish sentences and the four English sentences. The translations are given in square brackets.

Table 1. Excerpt of the calculated alignment result of “Alice's Adventures in Wonderland” with four different text witnesses in four different languages. The big bullets (●) separates the sentences (automatically detected by spaCy). The maximal n-to-m edge detected by VecAlign in this example was 1-to-3. The other merging of sentences, as e.g., the 3-to-6 and 6-to-4 alignment in the first row, comes from our approach.

DEENESFR
Chor.CHORUSCORORefrain.
»Wau! wau! Wau!« ● »Hier, du kannst ihn ein Weilchen warten, wenn du willst!« sagte die Herzogin zu Alice, indem sie ihr das Kind zuwarf. »Ich muß mich zurecht machen, um mit der Königin Krocket zu spielen, « damit rannte sie aus dem Zimmer.'Wow! wow! Wow!' ● 'Here! you may nurse it a bit, if you like!' the Duchess said to Alice, flinging the baby at her as she spoke. ● 'I must go and get ready to play croquet with the Queen,' and she hurried out of the room.¡Gua! ● ¡Gua! ● ¡Gua! --¡Ea! ● ¡Ahora puedes mecerlo un poco tú, si quieres! --dijo la Duquesa al concluir la canción, mientras le arrojaba el bebé por el aire--. ● Yo tengo que ir a arreglarme para jugar al croquet con la Reina. ● Y la Duquesa salió apresuradamente de la habitación.« Brou, Brou, Brou ! » (bis.) ● « Tenez, vous pouvez le dorloter si vous voulez ! » dit la Duchesse à Alice : et à ces mots elle lui jeta le bébé. ● « Il faut que j’aille m’apprêter pour aller jouer au croquet avec la Reine. » ● Et elle se précipita hors de la chambre.
Die Köchin warf ihr eine Bratpfanne nach; aber sie verfehlte sie noch eben.The cook threw a frying-pan after her as she went out, but it just missed her.La cocinera le tiró una sartén en el último instante, pero no la alcanzó.La cuisinière lui lança une poêle comme elle s’en allait, mais elle la manqua tout juste.
Alice hatte das Kind mit Mühe und Not aufgefangen, da es ein kleines unförmiges Wesen war, das seine Arme und Beinchen nach allen Seiten ausstreckte, »gerade wie ein Seestern,« dachte Alice.Alice caught the baby with some difficulty, as it was a queer- shaped little creature, and held out its arms and legs in all directions, 'just like a star-fish,' thought Alice.Alicia cogió al niño en brazos con cierta dificultad, pues se trataba de una criaturita de forma extraña y que forcejeaba con brazos y piernas en todas direcciones, «como una estrella de mar», pensó Alicia.Alice eut de la peine à attraper le bébé. ● C’était un petit être d’une forme étrange qui tenait ses bras et ses jambes étendus dans toutes les directions ; « Tout comme une étoile de mer, » pensait Alice.

Conclusion

In this paper, we presented a method for computing alignments of multiple textual witnesses across different languages. Our approach leverages, combines, and extends existing methods: those capable of aligning multiple text witnesses in a single language, and those designed for alignments across languages but limited to two text witnesses. At its core, the method is based on an extended and optimized graph structure adapted from LERA, called Chain Graph. By integrating an arbitrary number of pairwise multilingual alignments (or all), such as those produced by VecAlign, into, we obtain a unified alignment that reveals relationships among textual witnesses that would remain undetected when considering only adjacent or pairwise alignments. The approach will be integrated into the LERA platformhttps://lera.uzi.uni-halle.de in the near future, making it available to Humanities scholars.

References
  1. Artetxe, M., & Schwenk, H. (2019). Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond. Transactions of the association for computational linguistics, 7, 597-610. https://doi.org/10.1162/tacl_a_00288
  2. Balck, S., Dähne, J., Etling, F., Fischer, F., Frenzel, S., Grote, B., Hesse, S., Molitor, P., Pöckelmann, M., Ritter, J., Singh, Y., & Stede, M. (2025) Collation of Multilingual Versions of a Text: Necessity, Approach, Challenges. Long Paper at the Digital Humanities 2025 (DH2025), July 14-18, 2025, Lisbon, Portugal.
  3. Feng, F., Yang, Y., Cer, D., Arivazhagan, N., & Wang, W. (2022, May). Language-agnostic BERT sentence embedding. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) (pp. 878-891). https://doi.org/10.18653/v1/2022.acl-long.62
  4. Haentjens Dekker, R., Van Hulle, D., Middell, G., Neyt, V., & Van Zundert, J. (2015). Computer-supported collation of modern manuscripts: CollateX and the Beckett Digital Manuscript Project. Digital Scholarship in the Humanities, 30(3), 452-470. https://doi.org/10.1093/llc/fqu007
  5. Molfese, F. M., Bejgu, A. S., Tedeschi, S., Conia, S., & Navigli, R. (2024, March). Crocoalign: A cross-lingual, context-aware and fully-neural sentence alignment system for long texts. In Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers) (pp. 2209-2220). https://doi.org/10.18653/v1/2024.eacl-long.135
  6. Pöckelmann, M., Medek, A., Ritter, J., & Molitor, P. (2023). LERA—an interactive platform for synoptical representations of multiple text witnesses. Digital Scholarship in the Humanities, 38(1), 330-346. https://doi.org/10.1093/llc/fqac021
  7. Steingrímsson, S., Loftsson, H., & Way, A. (2023). SentAlign: Accurate and scalable sentence alignment. arXiv preprint arXiv:2311.08982. https://doi.org/10.18653/v1/2023.emnlp-demo.22
  8. Thompson, B., & Koehn, P. (2019, November). Vecalign: Improved sentence alignment in linear time and space. In Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP) (pp. 1342-1348). https://doi.org/10.18653/v1/D19-1136