Custom Translator not working properly in some cases

Akhil Sai 5 Reputation points
2023-12-12T16:13:20.18+00:00

I was using custom translator, but the translation is different from that which is defined in dictionary in few cases.

[Details]

Subscription : S1

Region : US West

API Endpoint : https://api.cognitive.microsofttranslator.com/translate/?api- version=3.0&category=XXX&from=en&to=es&allowFallback=false

Training type : Dictionary-only Training

Trained dictionary type : Phrase Dictionary

Language pair : English - Spanish (Espanol)

Data in phrase dictionary

English Spanish
Cat Cat
Dog Dog
Bat Bat
Ball Ball

Below mentioned are few scenarios where it isn't working.

  1. request : "Cat" response : "Gato" (default translation response) ❌ expected response : "Cat"
  2. request : "Dog" response : "Perro" (default translation response) ❌ expected response : "Dog"
  3. same issue for "Bat" and "Ball"

BUT, when my request is a sentence instead of a word, it seems to be working fine ???

  1. request : "I need a Cat." response : "Necesito un Cat." ✅ expected response : "Necesito un Cat."
  2. request : "I need a Dog." response : "Necesito un Dog." ✅ expected response : "Necesito un Dog."

AND, I came across this unique scenario

  1. request : "I have a Cat." response : "Tengo un gato." (default translation response) ❌ expected response : "Tengo un Cat."
  2. request : "I have a Dog." esponse : "Tengo un Dog." ✅ expected response : "Tengo un Dog."
  3. I got correct responses for "Bat" and "Ball" sentences. ✅

I have tried with other words as well, but didn't get expected translation response (when the request is just a word). I got correct responses when I used those words in a sentence as mentioned above.

Is it that single word translations are not supported ?

And for the word "Cat", Even when I used it in a sentence I got default translation in few cases as mentioned above.

Could you please help.

Thank You.

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
358 questions
{count} vote