TartuNLP / translation-api

A REST API for neural machine translation
https://translate.ut.ee
MIT License
9 stars 2 forks source link

Can you please add supported language code to the get v2 config rest api? #2

Closed Romick2005 closed 1 month ago

Romick2005 commented 1 month ago

Currently https://api.tartunlp.ai/translation/docs#/v2/get_config_v2_get returns only language pairs.

{
  "xml_support": true,
  "domains": [
    {
      "name": "General",
      "code": "general",
      "languages": [...]
    },
    {
      "name": "Legal",
      "code": "legal",
      "languages": [
        "est-eng",
        "eng-est",
        "ger-est",
        "rus-est",
        "est-ger",
        "est-rus"
      ]
    }
  ]
}

Would be great to have languageCodes also as a field. Similar to this list

Romick2005 commented 1 month ago

Is it possible to have eng-ukr as supported language translation, but do not have ukr-eng for example?

liisaratsep commented 1 month ago

Hi, can you elaborate a bit on the use case for this request? We accept standard 2-letter and 3-letter ISO language code formats, there are even libraries to automatically convert these. The mapping in our config file is to handle internal workflows when processing the request, it is not really informative to the end user.

Is it possible to have eng-ukr as supported language translation, but do not have ukr-eng for example?

Yes, only specific combinations (and directions) may be available in some cases which is why they are specified all separately in such a long list.