-
Type:
New Feature
-
Resolution: Unresolved
-
None
-
Affects Version/s: None
-
Component/s: translate5 AI
-
High
-
None
-
None
-
Emptyshow more show less
Problem
When suitable termCollections are assigned to a task, the relevant terms should be sent directly to PONS with the translation request, rather than relying only on glossaries maintained on the PONS side. The terminology lives in translate5; PONS supports inline glossary_terms in its translation requests exactly for this case.
Complete termCollections must not be continuously synchronised to PONS and complete terminology databases must not be sent with every request - the agreed approach is to search in translate5 and send only the terms relevant to the segments of the request.
Solution
The PONS connector implements SupportsTerminologyContext (context-provider architecture). For every request - batch chunk, single editor query, and the segment-based paths in general:
- The shared TerminologyContextProvider searches the assigned termCollections and selects only terms relevant to the source text of the segments at hand (existing TermTagger-based term detection, same mechanism the AI resources use)
- The injected terms are converted to glossary_terms[] entries with source and target
- Duplicate source/target pairs are removed across the request (PONS applies glossary_terms globally per request, not per segment)
- The term order is deterministic (stable sort), so identical input produces identical requests
Resource priority (as described by PONS - glossary ids and inline glossary terms are additive):
- If relevant translate5 terms exist, they are sent as glossary_terms
- The PONS-side glossary ids from the automatic resource selection are still attached additionally
- If no local terms exist, the PONS glossary fallback remains as the only terminology source
If no terminology context is available at all (no termCollections assigned, provider disabled), the request is simply sent without glossary_terms - requests without terminology remain valid. The PONS quality-estimation/APE requests and ordinary MT requests without terminology are unaffected.