Changelog microsoft translator API

Victor Monsalve 1 Reputation point
2021-01-28T12:02:07.75+00:00

Hi, I'm having problems to find the releases and changelog information of the Microsoft Translator API.

I have some chatbots using this solution and we have discovered one change that is causing issues:

As per the documentation the /detect endpoint must return a payload like
[
{
"alternatives": [
{
"isTranslationSupported": true,
"isTransliterationSupported": false,
"language": "nl",
"score": 0.92
},
{
"isTranslationSupported": true,
"isTransliterationSupported": false,
"language": "sk",
"score": 0.77
}
],
"isTranslationSupported": true,
"isTransliterationSupported": false,
"language": "de",
"score": 1.0
}
]

I confirmed it was like that at the time I developed my chatbots and I was using the "alternatives" object to take some decisions.

Now my chatbots are failing since couple days ago (by what I detected since last monitor I did was on Nov 2020) and after some debug I found that the payload now are coming as:

[
{
"language": "es",
"score": 1.0,
"isTranslationSupported": true,
"isTransliterationSupported": false
}
]

Can anyone help me to find the proper changelog or explain me why this is coming without the "alternatives" now?

--- edit ---
curl --location --request POST 'https://api.cognitive.microsofttranslator.com/detect?api-version=3.0&textType=html' \
--header 'Ocp-Apim-Subscription-Key: XXXX' \
--header 'Content-type: application/json' \
--data-raw '[{ "text": "this must be detected as english" }]
'

Azure Translator
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
352 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. romungi-MSFT 42,966 Reputation points Microsoft Employee
    2021-01-28T17:14:42.807+00:00

    @Victor Monsalve The updates to Microsoft translator are documented in the blog posts from the team here. With respect to the response from the API v3.0 the alternatives are still part of the response but I think that is only returned if the score is not absolute i.e <1.0 when the model detects that it could be a different language other than the one identified as most probable because alternatives is an array of all other languages with lower scores if the model detects them. The current API reference page still mentions alternatives as the possible value in responses.

    I am also curious to check what is the sentence/text passed in the first scenario in the response from couple of months ago?

    0 comments No comments

  2. Victor Monsalve 1 Reputation point
    2021-01-29T15:44:49.71+00:00

    Hey, thanks @romungi-MSFT I will take a look at that blog,

    So I was receiving the alternatives every single time, now I'm not able to reproduce any scenario where I could get a score < 1, even with very ambiguous words like "hotel" which is correct for spanish and english, now I just get the english language in the payload. below you can see some samples.
    Also, can you please provide me an utterance that shows a primary score below 1 so I can see what you are saying?

    {"text":"como ingreso a concur?","timestamp":"2020-08-31T17:11:29.796Z"}
    {"response":[{"language":"es","score":0.75,"isTranslationSupported":true,"isTransliterationSupported":false,"alternatives":[{"language":"en","score":0.75,"isTranslationSupported":true,"isTransliterationSupported":false}]}],"timestamp":"2020-08-31T17:11:29.838Z"}

    {"text":"how do I login into concur?","timestamp":"2020-08-31T17:13:51.254Z"}
    {"response":[{"language":"en","score":1,"isTranslationSupported":true,"isTransliterationSupported":false,"alternatives":[{"language":"nl","score":1,"isTranslationSupported":true,"isTransliterationSupported":false},{"language":"pt","score":0.83,"isTranslationSupported":true,"isTransliterationSupported":false}]}],"timestamp":"2020-08-31T17:13:51.280Z"}

    0 comments No comments