WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.61k stars 1.02k forks source link

Add glossary support for ModernMT #9881

Closed urbalazs closed 1 month ago

urbalazs commented 1 year ago

Describe the problem

ModernMT has glossaries request parameter to use glossaries for the translation of the input texts. It works fine if I call the API directly from command line, but Weblate doesn't honor this parameter. It would be nice to add an optional support for it.

Describe the solution you'd like

Describe alternatives you've considered

No response

Screenshots

No response

Additional context

From the ModernMT documentation:

Glossaries This parameter is a string, consisting of a list of memory ids separated by a comma, that denotes the glossaries to be used during the translation. Therefore, when included, it indicates that the glossary entries contained in the specified memories are to be used. If a non-existent memory is provided, it will be ignored.

Context vector The context vector is the object which leverages ModernMT adaptation during the translation. It consists of a list of memories, each one with a corresponding weight. The higher the weight is, the more the memory content will influence the translation result. This is an example of a context vector: 37787:0.457,37784:0.2. It contains the memory 37787 with a weight of 0.457, and the memory 37784 with a weight of 0.2.

nijel commented 1 year ago

Related to https://github.com/WeblateOrg/weblate/issues/7086

github-actions[bot] commented 1 year ago

This issue has been added to the backlog. It is not scheduled on the Weblate roadmap, but it eventually might be implemented.

In case you need this feature soon, please consider helping or push it by funding the development.

gersona commented 1 month ago

for the sake of clarity, you want to have a field where we can provide context vectors or glossary IDs that will be included in ALL translation requests ?

nijel commented 1 month ago

I understand it that way, I'd avoid doing something more complex for now.

github-actions[bot] commented 1 month ago

Thank you for your report; the issue you have reported has just been fixed.