Logo

Literature@Spectalizer

How the alignment works

Each book here is fetched from Wikisource twice: once in its original language, once in a translation. Both texts are split into sentences, and every sentence is turned into a vector by a multilingual sentence-embedding model, so that sentences with similar meaning end up with similar vectors regardless of language.

Translators rarely map sentences one-to-one: they merge, split, reorder, and sometimes drop them, and footnotes or introductions add text that has no counterpart at all. So instead of pairing sentence 1 with sentence 1, we search for the highest-scoring path through every possible pairing of source and translated sentences, using a dynamic-time-warping style algorithm. That path is then grouped into paragraph-sized “beads” (one or more sentences per side) for comfortable side-by-side reading.

The process is entirely automatic, so it is occasionally wrong: a heavily rewritten passage or a stray footnote can throw off a match.

I wrote about this general method in more detail, with nicer pictures, in “Bringing Chekhov closer with automatically matched translations”.