Difference between - translator detect vs text analytics detect

Andrius Urbelis 1 Reputation point
2021-10-10T18:45:40.09+00:00

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
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
339 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,861 Reputation points Microsoft Employee
    2021-10-11T12:15:30.69+00:00

    @Andrius Urbelis 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.

    0 comments No comments