icon epic arrow
icon epic arrow

USE CASE · PARALLEL DATA · EPIC QUALITY ESTIMATION

From Web-Crawled Noise to MT Gold: The Engineering Behind Specialized Corpora

Public parallel data is rarely ready for machine translation. Here is how we transformed over 640 million raw web segments into domain-aligned training data across seven languages.

Contact us
icon epic arrow
icon epic arrow

THE CHALLENGE

In the machine translation (MT) community, open-source web repositories like OPUS seem like a big head start. On paper, billions of parallel sentence pairs are sitting ready for download. But if you have ever tried fine-tuning a neural machine translation (NMT) model or large language model (LLM) on raw web-crawled data, especially for highly regulated, high-stakes domains, you quickly run into an important reality.

Publicly available data is rarely ready to use out-of-the-box

Between pulling raw parallel files off the web and feeding a clean dataset into a model training pipeline sits an immense amount of engineering, filtering, and curation.

icon epic arrow
icon epic arrow

THE PROJECT

TAUS and partners were tasked with expanding translation coverage for seven languages: Albanian, Bosnian, Macedonian, Montenegrin, Romanian, Serbian, and Ukrainian. The primary focus was isolating high-quality content within the Legal and Administrative domains to support expanding MT tools.

Out of more than 646 million raw candidate sentence pairs collected, less than half survived structural and quality filters, and only a fraction met the strict threshold for high-quality, in-domain, legal-grade compliance.

Here is what it actually takes to bridge the gap between web-crawled data and MT-ready corpora.

LANGUAGES

Albanian, Bosnian, Macedonian, Montenegrin, Romanian, Serbian, Ukrainian

DOMAINS

Legal and Administrative

RAW CANDIDATE SENTENCE PAIRS

646 million+

icon epic arrow
icon epic arrow

Phase 1: Cosmetic Sanitization and Structural Realignment

Web crawlers capture text indiscriminately. Before running high-level ML classifiers, the raw dataset required aggressive text repair to remove structural artifacts:

Paragraph Splitting & Dynamic Realignment

Web crawlers often group full paragraphs as single parallel units. Retaining paragraph-block translations dilutes sentence-level translation memories and makes it more difficult to determine the segment’s quality. We ran paragraph-length heuristics, split sentences using language-specific abbreviation lists (to prevent splitting on mid-sentence legal citations), and realigned segments using Gale-Church dynamic programming aligners.

Cosmetic Text Repair

Automated fixes stripped residual HTML tags (<br>, <div>), decoded character entities (&amp;, &quot;), resolved Mojibake encoding corruptions, and repaired orphaned or mismatched quotation marks.

Script Corrections

For languages like Montenegrin or Serbian, character-set fixes were necessary to normalize script usage and replace accidentally swapped Cyrillic characters in Latin texts.

icon epic arrow
icon epic arrow

Phase 2: Heavy-Duty Structural and Compliance Filtering

Once text encoding was sanitized, candidate pairs entered a strict filtering pipeline designed to eliminate structural noise.

1

Custom Language Identification (LangID)

Generic language identifiers routinely fail on closely related languages. Standard models struggle to differentiate between Bosnian, Croatian, Montenegrin, and Serbian (BCMS) due to high mutual intelligibility. To prevent cross-contamination, we implemented a custom LangID approach tailored to language-specific orthographic markers and script variations with a wider context window for easier classification.

2

Extreme Length Ratio & Garbage Removal

If an English source sentence contains 10 words while its target counterpart contains 120 words, the pair is almost certainly an alignment failure. We systematically dropped extreme length outliers, along with structural garbage like standalone email addresses, raw URLs, single-character tokens, and repeated n-gram loops.

3

Privacy & PII Compliance

To comply with GDPR and contractual directives, personal data could not remain in the training corpus. We deployed a three-tiered PII detection pipeline:

Regex Rules: Scanned for structured PII (phone numbers, personal identification codes, physical addresses).

Named Entity Recognition (NER): Identified person names across the source text, since English has plenty of strong NER models. If named entities appear in the target and not the source, then the pair is not an accurate translation, and would be picked up by our later quality checks.

LLM Disambiguation: When person names were flagged, lightweight LLM passes verified whether the name belonged to a private individual (flagged for removal) or a public/historical figure (retained for context).

icon epic arrow
icon epic arrow

Phase 3: Domain Alignment—The “English Source” Shortcut

Mining specialized Legal & Administrative parallel data across seven languages already presents a major challenge. However, building separate, high-accuracy domain classifiers for multiple low-resource languages is another issue entirely.

Similarly to how we handled NER, we bypassed this bottleneck by exploiting the core linguistic asymmetry: the source side is high-resource English.

Instead of training complex multilingual models from scratch for every target language, we leveraged a high-quality English legal reference corpus (including Eur-Lex and other administrative texts):

A domain-specific BERT classifier was pretrained on English Eur-Lex data.

Candidate parallel segments were mapped into cross-lingual semantic embedding spaces (using TAUS Matching Data techniques and semantic similarity).

By evaluating the English source segment against the legal/admin reference baseline, we derived semantic confidence scores for both the legal and administrative domains.

This allowed us to isolate authentic legal and administrative content across all seven target languages cleanly, without generating synthetic text or diluting domain rigor.

icon epic arrow
icon epic arrow

Phase 4: Reference-Free Quality Estimation (QE) at Scale

Traditional evaluation metrics like BLEU or chrF require a ground-truth reference translation. When evaluating hundreds of millions of unverified web segments, reference translations do not exist.

To filter out mistranslations and subtle alignment errors, we deployed TAUS EPIC (Quality Estimation v3). Rather than applying rigid, global cutoffs, QE thresholds were calibrated independently for each of the seven languages against human-annotated spot-checks. This ensured that low-quality translations could be discarded while protecting genuine regional terminology and legal phrasing. All data was provided with these QE scores and suggested score thresholds for filtering. This way, the user could decide whether to only use the highest quality data, or to expand into larger quantities of varying quality.

icon epic arrow
icon epic arrow

THE RESULT

The Impact: High-Quality Data vs. Raw Volume

To verify whether this extensive processing actually translates to better translation models, fine-tuning experiments were conducted using Meta's NLLB-200 base model.

Fine-tuning on the clean, QE-filtered legal data produced massive performance leaps across all seven target languages in the Legal & Administrative Domain, averaging an increase of +12.29 BLEU (from an average baseline of 43.90 to 56.20):

sacrebleu-nllb200-base-vs-finetuned

Qualitative analysis revealed that these gains were not just stylistic: clean domain data stopped the base model from hallucinating generic filler phrases on complex legal clauses and preserved critical dates, numerical values, and legal case citations.

KEY TAKEAWAY FOR MT PRACTITIONERS

More data is not better data. Crawling millions of sentence pairs from public web sources is only step zero.

If your target downstream application requires precision, domain alignment, and institutional compliance, the real work lies in the middle: aggressive sanitization, intelligent domain mining via source-side embeddings, and reference-free quality estimation at scale.

icon epic arrow
icon-cta-badge-data

Better Data. Better Translations.

Whether you need domain-specific training data or quality scores at scale, we’ll show you what’s possible with your own content.

Talk to our team
icon epic arrow
icon epic arrow

Frequently Asked Questions

If you have more questions, we’re here to help support@taus.net

Open web repositories such as OPUS hold billions of sentence pairs, but web crawlers capture text indiscriminately. Raw files contain whole paragraphs aligned as single units, leftover HTML, broken encoding, mixed scripts, text in the wrong language, and personal data. In this project, less than half of the 646 million raw candidate pairs survived structural and quality filters, and only a fraction met the threshold for high-quality, in-domain legal content.