Azure translator: Russian transliteration ignores capital letters

LucW 1 Reputation point
2021-01-09T12:53:44.417+00:00

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'}]

Azure Translator
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
393 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,833 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 45,961 Reputation points Microsoft Employee
    2021-01-11T09:16:58.233+00:00

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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.