Back to Case Studies

Terminology Extraction & Alignment

Bilingual Term Bases and Glossary-Constrained Translation

ProductionMedia, Marketing & Language ServicesMay 2022 – Jun 2023NLP, Knowledge Systems & Generative AI
+4%
Translation quality, blind test
≤ 5 words
Multi-word terms aligned
Any
Target language, via embeddings
Production
Used by the company's linguists

My Role

Role
NLP engineer; built the core
At CHI Software
Team
—
Stage reached
In production
Key decisions
  • Multilingual embeddings to align multi-word term spans
  • Fast n-gram match first, embedding alignment fallback
  • Glossary entries retrieved per segment into LLM prompt

Approach at a Glance

Details
  1. 1Term Extraction
  2. 2Multi-Token Term Alignment
  3. 3Term Base and Reports
  4. 4Platform Integration
  5. 5Glossary-Constrained LLM Translation (2023)

Executive Summary

A terminology service for the linguists of a global language-services company. It finds the key terms in a client's content and works out how each term was translated, producing a bilingual term base automatically. In a second stage, those term bases drive a translator that forces approved terminology into LLM translations.

The heart of the system is a multi-token term aligner. Terms are often several words long, like "data loss prevention policy", and their translation may be split, reordered or inflected. The aligner maps source and translated text into a shared multilingual vector space with mBERT and LASER and finds the exact span that translates each term.

On a blind part of the test corpus, translations made with the tool's term bases were 4% better overall, with larger gains on the terms themselves. The service runs in production on the company's language-AI platform. I built its core technology in 2022, turning an early prototype into a production tool, and in 2023 I added the glossary-constrained translator on top of it. I was an NLP engineer in the company's R&D department.


Client Profile

The company translates large volumes of technical and corporate content for its clients, and terminology is where quality is won or lost. A product name, legal concept or UI term must be translated the same approved way every time, across documents and translators.

Building and keeping those term bases was manual work:

  • Finding the terms: linguists had to read through client content to decide which phrases were terms worth fixing.
  • Finding their translations: for each term, someone had to locate how it had actually been translated in past bilingual content. That is hard when the term spans several words and the target language reorders or inflects it.
  • Using the terms: even with a term base, translations didn't always follow it.

Technical Approach

  1. Term Extraction – Terms are extracted from the source text by combining statistical and linguistic methods:

    • Statistical scoring: TF-IDF against general-language frequency tables, plus RAKE, YAKE and TextRank keyword extraction.
    • POS patterns: part-of-speech combinations that describe how terms are built, such as adjective + noun + noun.
    • Filtering: candidates up to five words long, with lemmatization, minimum frequency and cutoffs, plus named entities and acronyms.
  2. Multi-Token Term Alignment – For each term, the aligner finds its translation in the bilingual text:

    • A fast n-gram matching step finds translations that consistently co-occur with the term.
    • Otherwise, source and target sentences are embedded with mBERT, XLM-R or LASER into one multilingual vector space, and word-level alignment maps the term's tokens to the matching span in the translation.
    • The target language is detected automatically, and LASER-based fuzzy matching scores how closely a candidate matches.
  3. Term Base and Reports – The result is a bilingual term base plus an Excel report that linguists review and approve.

  4. Platform Integration – The service runs as a worker on the company's language-AI platform, processing jobs from a queue on GPU nodes in Kubernetes on Azure, with a playground interface for linguists.

  5. Glossary-Constrained LLM Translation (2023) – Once LLMs became usable, I added a translator on top of the term bases:

    • Approved glossary entries are stored in Qdrant.
    • For each segment, the entries relevant to its words are retrieved.
    • They are passed to GPT-3.5 (Azure OpenAI, through LangChain) as required terminology.
    • The translation comes back together with the glossary entries used, so linguists can check them.

Business Outcome

Linguists got term bases built automatically from the client's own content, with each term already matched to its translation, instead of compiling them by hand. On a blind test set, translations made with these term bases improved 4% in overall quality, with larger gains on the terms themselves.

The 2023 stage carried the same term bases into LLM translation, so approved terminology is enforced at the moment of translation. Both parts run in production on the company's language-AI platform.

Technologies

NLPTerm ExtractionPOS PatternsTF-IDFmBERTXLM-RLASERWord AlignmentAzure OpenAI (GPT-3.5)LangChainQdrantKubernetes

Planning something similar?

Tell me about it on a short call. New projects can start within 2 weeks