Document Aligner
What this does
Take a document and its translation — two texts that say the same thing in two languages — and line them up sentence by sentence. The result is a set of aligned pairs you can correct, export as TMX, add to the CAT tool's translation memory, or open directly as a CAT editor project. Everything runs in this browser; no file is sent anywhere, nothing needs an account.
How to use it: paste the source text on the left and the translation on the right (or drop a .txt file into each side), pick the two languages, press Align documents. Check the low-confidence rows first — use Merge, Split, Target ↑/↓, Delete, or edit the text directly. Then download the TMX or send the pairs to the CAT tool.
Your documents
Paste both documents above, or load the sample to see how alignment works.
Aligned pairs
No alignment yet.
Add to CAT TM appends the pairs to the translation memory the CAT tool already saved in this browser (it needs a saved CAT project first — open the CAT tool and confirm one segment — and it skips pairs already in the TM). Open in the CAT editor replaces the CAT grid with the aligned pairs, exactly like Paste import does; use “Reset document” on the CAT page to get the example project back.
| # | Source | Target | Confidence | Correct the alignment |
|---|---|---|---|---|
| No alignment yet — paste both documents and press “Align documents”, or load the sample. | ||||
How alignment works — stated honestly
This is a heuristic aligner, not a neural one. It splits each document into sentences (paragraph breaks are hard boundaries; abbreviations such as Mr., Dr., e.g. and U.S. do not split a sentence), then aligns the two sentence lists with dynamic programming in the style of Gale & Church (1993) length-based alignment: allowed moves are 1–1, 1–0, 0–1, 2–1, 1–2 and 2–2. A pairing's cost comes from the length model (how far the two sides' lengths are from the median sentence-length ratio between the two documents — medians, not totals, so one large unmatched chunk cannot poison the ratio — variance 6.8 per source character) minus a bonus for shared anchors — identical numbers, URLs, email addresses and identical words of 3+ letters. An unmatched sentence costs 0.5 + 0.03 × its length in characters — short sentences are cheap to drop, long ones expensive — a length-scaled heuristic, not a measured probability. A second-opinion rescue then re-tiles any suspicious window (a matched pair at confidence 0.30 or below) and keeps the new tiling only when it produces a genuinely good pair (confidence 0.45 or above), costs no more than 1.0 above the current tiling, and improves the matched mean confidence by at least 0.08. Multi-sentence pairings carry a small prior penalty (0.6 for 2–1/1–2, 1.2 for 2–2), which prefers one-to-one alignment unless the length evidence for the merge is strong.
Confidence (0.05–0.99) is a stated blend — 60% length-model probability, 40% anchor overlap (0.5 neutral when neither side has anchors) — not a measured probability. Unmatched rows score 0.05. A manual correction is never overruled by the score: edit a row, merge, split, or move a target sentence, and the confidence is recomputed for that row only as a guide.
Limits: plain text only (.txt/.md files, or pasted text) — formatted files (.docx/.pdf/…) are not parsed here; use Document Intelligence on the CAT page for those, then paste the extracted text. Sentence-level only: it cannot align inside a sentence, and it cannot fix translations that reorder sentences far apart (moves cover at most 2 sentences on either side). Quotation marks directly after a full stop can keep two sentences joined; abbreviations outside the built-in list can split one sentence in two — both are correctable in the table above.
Original LinguaEmpire content; no competitor text, code, logo or design is copied on this page.