EPIC
USE CASE · PARALLEL DATA · EPIC QUALITY ESTIMATION
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.
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.
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.
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+
Web crawlers capture text indiscriminately. Before running high-level ML classifiers, the raw dataset required aggressive text repair to remove structural artifacts:
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.
Automated fixes stripped residual HTML tags (<br>, <div>), decoded character entities (&, "), resolved Mojibake encoding corruptions, and repaired orphaned or mismatched quotation marks.
For languages like Montenegrin or Serbian, character-set fixes were necessary to normalize script usage and replace accidentally swapped Cyrillic characters in Latin texts.
Once text encoding was sanitized, candidate pairs entered a strict filtering pipeline designed to eliminate structural noise.
1
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
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
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).
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.
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.
Filtering Stage
Metric / Method Applied
Primary Objective
Alignment
Gale-Church DP Aligner
Break paragraph chunks into clean sentence pairs
Sanitization
Regex, Encoding Normalization
Remove HTML, fix broken UTF-8, fix script mix-ups, discard URL segments, email segments and pairs with large length differences
Compliance
Regex + NER + LLM Check
Remove segments with structured PII & private individual names
Domain ID
EurLex-BERT + English Seeds
Isolate Legal & Administrative register
Quality Gate
TAUS EPIC (QE v3) Model
Catch mistranslations, and low-adequacy pairs
THE RESULT
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):
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.
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.
Boosting TM Quality: Achieving Excellence with TAUS OPTMIZE
How quality estimation cleans translation memories for better MT training.
Read more →
Unlocking Efficiency: Leveraging EPIC API to Optimize MT Workflows
MotionPoint determined whether MTQE models could be used to remove human post-editing from certain MT workflows.
Read more →
How Milengo Saved Up to 50% on Time and Costs with TAUS EPIC API
Integrating EPIC with their TMS let Milengo lock high-scoring segments and skip post-editing.
Read more →
Whether you need domain-specific training data or quality scores at scale, we’ll show you what’s possible with your own content.
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.