An Azure service to easily conduct machine translation with a simple REST API call.
Language detection and translation is not proper
I am using Azure Translator Service , however I see language detection and translation is not happening properly
I am using python, I have a define a function translate_text which calls Azure translator api and returns the translated text
I am not passing from-language parameter since I want the API to figure out the source language and translate it , however the detection and translation both are happening incorrectly.
if you see below example , the text I am sending is Slovak, but it detected pl, can you please help me undertand how to make this better.
Call to Translate API
a = translate_text("Urobit aj dalsie pokrocilejsie skolenia.")
display(a)
Response
https://api.cognitive.microsofttranslator.com/translate
[
{
"detectedLanguage": {
"language": "pl",
"score": 0.9
},
"translations": [
{
"text": "Urobit and further shortened the skolenia.",
"to": "en"
}
]
}
]
'Urobit and further shortened the skolenia.'