question

AndriusUrbelis-2710 avatar image
0 Votes"
AndriusUrbelis-2710 asked romungi-MSFT edited

Difference between - translator detect vs text analytics detect

Hi,

I can see Translator and Text Analytics have Detect method. Would you know which one is recommended to use, are they the same? Which one is more reliable?

Thank you,

Andrius

azure-translator
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AndriusUrbelis-2710 Did you get a chance to check the below response?

0 Votes 0 ·

1 Answer

romungi-MSFT avatar image
0 Votes"
romungi-MSFT answered romungi-MSFT edited

@AndriusUrbelis-2710 The detect method or API in both the case are used to detect the language passed in the request. Both of them have the same functionality but in different contexts as the response includes the detected language but the translator detect API provides the language detected and the ability of the translator API to translate/transliterate to other languages.

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

Detect response from text analytics API simply provides the detected language and the score.

 {
  "documents": [{
  "id": "1",
  "detectedLanguage": {
  "name": "English",
  "iso6391Name": "en",
  "confidenceScore": 1
  },
  "warnings": []
  }
  ],
  "errors": [],
  "modelVersion": "2020-04-01"
 }

The usage of both these APIs are primarily for scenarios to detect the language and perform other operations like translate, transliterate or provide entititles, keyphrases in the text. In some of the APIs of both these services the language is also auto-detected.

If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.