@LucW I think it might be an issue with the character encoding in the first case. From the API perspective there would not be a change with respect to a specific input.
Azure translator: Russian transliteration ignores capital letters
LucW
1
Reputation point
I am using the transliterate API v3.0: (https://api.cognitive.microsofttranslator.com/transliterate?api-version=3.0)
russian word 'Робот' is transliterated into 'abot'. Expected result is 'Rabot'.
code used:
text = 'Робот'
url = 'https://api.cognitive.microsofttranslator.com/transliterate?api-version=3.0'
params = '&language=ru&fromScript=Cyrl&toScript=Latn'
constructed_url = url + params
body = [{
'text': text
}]
translator_key = os.environ['AZURE_TRANSLATOR_KEY']
region = 'eastus'
headers = {
'Ocp-Apim-Subscription-Key': translator_key,
'Ocp-Apim-Subscription-Region': region,
'Content-type': 'application/json',
'X-ClientTraceId': str(uuid.uuid4())
}
request = requests.post(constructed_url, headers=headers, json=body)
response = request.json()
print(response)
Returns: [{'text': 'abot', 'script': 'Latn'}]
1 answer
Sort by: Most helpful
-
romungi-MSFT 45,961 Reputation points Microsoft Employee
2021-01-11T09:16:58.233+00:00