For numeric written in words, Google Translator is providing wrong text while translating from English to Arabic language

292 views
Skip to first unread message

Jaswant Singh

unread,
Feb 2, 2022, 3:08:26 AM2/2/22
to Google Cloud Translation API
Hi Team,

For numeric written in words, Google Translator is providing wrong text while translating from English to Arabic language

 Below are the example of the same. Could you please provide us the solution.

 Sample 1

INVOICE VALUE SAR 1,204.69

Amount In Words : SAUDI RIYALS ONE THOUSAND TWO HUNDRED FOUR AND HALALA SIXTY NINE ONLY

Arabic Translation

المبلغ بالكلمات :ألف ريال وأربعون ريال سعودي وهلا تسعة وستون فقط

Reverse English translation

The amount in words: one thousand riyals and forty Saudi riyals, and it is only sixty-nine

 Sample 2

 INVOICE VALUE SAR 1,511.78

Amount In Words : SAUDI RIYALS ONE THOUSAND FIVE HUNDRED ELEVEN AND HALALA SEVENTY EIGHT ONLY

Arabic Translation

المبلغ بكلمات: ألف وخمسمائة ريال سعودي وهلا ثمانية وسبعون فقط

Or

المبلغ بالكلمات :ريال سعودي ألف وخمسمائة وواحد وثمانية وسبعون فقط

Reverse English translation

The amount in words: one thousand five hundred Saudi riyals, and it is only seventy-eight

Note-We are using paid service of Google Translator API.

Regards,

Jaswant

Carlos Clement Bellido

unread,
Feb 2, 2022, 11:46:44 AM2/2/22
to Google Cloud Translation API

Hi! 


From what I understand you, texts with written numbers are providing bad translation results when trying to translate from English to Arabic. I’m going to focus on sample 1. For this sample, the translation API tries to translate the number 1,204.69 in words, but you’re feeding the API with “SAUDI RIYALS ONE THOUSAND TWO HUNDRED FOUR AND HALALA SIXTY NINE ONLY” and in this phrase the number 1,204.69 is not present, it is written like “ONE THOUSAND TWO HUNDRED FOUR AND HALALA SIXTY NINE” when it should be “ONE THOUSAND TWO HUNDRED FOUR AND SIXTY NINE”. When written correctly, is the translation ok?

Jaswant Singh

unread,
Feb 3, 2022, 1:05:53 AM2/3/22
to Google Cloud Translation API
Thanks Team for replying.

We are using words to words translation from English to Arabic by Google Translation API (Numeric value we shown for example only).

So if you see in below example we have words written like "SAUDI RIYALS ONE THOUSAND TWO HUNDRED FOUR AND HALALA SIXTY NINE ONLY" (1204.69) in English and when we translate it in Arabic using google translator api its do wrong translation. For verification we can do reverse translation from Arabic to English and its display words very wrong (shown in red-1040.69  ..some weird value).

So when our middle east customer see this value they are confuse as we we are giving them invoice in Arabic

Note-Saudi Riyal is their currency (like we have Dollar) and Halala is their decimal currency (like we have cents)

 Sample 1

Amount In Words : SAUDI RIYALS ONE THOUSAND TWO HUNDRED FOUR AND HALALA SIXTY NINE ONLY

Arabic Translation

المبلغ بالكلمات :ألف ريال وأربعون ريال سعودي وهلا تسعة وستون فقط

Reverse English translation

The amount in words: one thousand riyals and forty Saudi riyals, and it is only sixty-nine

Could you please help us on the same. We are using paid api of google translator. We can provide subscription id also separately

Regards,
Jaswant

Carlos Clement Bellido

unread,
Feb 3, 2022, 10:59:32 AM2/3/22
to Google Cloud Translation API

Hello,

Thanks to you for the explanation, I didn’t know about Halala being the subdivision of the Saudi Riyals.

I reproduced and I can see this behavior in the translation, but I don’t think the phrase “SAUDI RIYALS ONE THOUSAND TWO HUNDRED FOUR AND HALALA SIXTY NINE ONLY” has too much sense in English; I would say that “SR 1204.69” should be “parsed” as “ONE THOUSAND TWO HUNDRED FOUR AND SIXTY NINE SAUDI RIYALS” or “ONE THOUSAND TWO HUNDRED FOUR SAUDI RIYALS AND SIXTY NINE HALALA”. Is there any reason to put the currency before the quantity? Moreover, if you test with “ONE THOUSAND TWO HUNDRED FOUR SAUDI RIYALS AND SIXTY NINE HALALA ONLY” is ok?

Jaswant Singh

unread,
Feb 4, 2022, 2:28:46 AM2/4/22
to Google Cloud Translation API
Thanks Team for Reply,

As you suggested we rephrase it and tried by placing currency in last:

ONE THOUSAND TWO HUNDRED FOUR SAUDI RIYALS AND SIXTY NINE HALALA

When we translate it to Arabic:

ألفان ومائتان وأربعون ريال سعودي وتسعة وستون هللة

For verification purpose we translate back from Arabic to English

Two thousand two hundred and forty Saudi riyals and sixty-nine halalas

If we see in this text still it translate very wrong (2240.69).

Could you please help us on the same. We are using paid api of google translator. We can provide subscription id also separately

Regards,
Jaswant


Carlos Clement Bellido

unread,
Feb 4, 2022, 10:53:35 AM2/4/22
to Google Cloud Translation API

Hello,

The error in the translation from Arabic to English doesn’t necessarily mean that the translation from English to Arabic is incorrect. Do you have any “method” to confirm that “ألفان ومائتان وأربعون ريال سعودي وتسعة وستون هللة” is indeed correctly translated? Somebody who speaks Arabic can confirm it.

Regarding the translate-back, I personally don’t recommend it to ensure the correct translation since it could cause misunderstandings.

Additionally, this behavior doesn’t seem to be directly related to your specific Translate API (and remember not to share any credentials or project IDs).

Jigar Gamar

unread,
Feb 5, 2022, 1:01:49 PM2/5/22
to Google Cloud Translation API
بناءً على ما أفهمه ، فإن النصوص ذات الأرقام المكتوبة تقدم نتائج ترجمة سيئة عند محاولة الترجمة من الإنجليزية إلى العربية. سأركز على النموذج 1. بالنسبة إلى هذا النموذج ، تحاول واجهة برمجة تطبيقات الترجمة ترجمة الرقم 1204.69 بالكلمات ، لكنك تقوم بتغذية API بـ "واحد ألفين وأربعين ريال سعودي وهلالا تسعة وستين فقط" وفي هذه العبارة رقم 1،204.69 غير موجودة ، مكتوبة مثل "واحد ألفين وأربعة وأربعين وهالا تسعة وستين" عندما يجب أن تكون "ألفًا ومئتان وأربعة وتسعة وستون". عند كتابتها بشكل صحيح ، هل الترجمة جيدة؟
إظهار النص المقتبس

--
You received this message because you are subscribed to the Google Groups "Google Cloud Translation API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-translate...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-translate-api/9e23b1d4-d6a8-4027-b6df-b0c2ebae7c11n%40googlegroups.com.

Carlos Clement Bellido

unread,
Feb 7, 2022, 7:03:30 AM2/7/22
to Google Cloud Translation API

Hello,

I translated the answer and seems to contribute to this thread. Nevertheless, please, remember that this forums are meant to be in English only, that's why I would like to summarize what I understood from the translation:

Texts with typed numbers give poor translation results when trying to translate from English to Arabic. For the Model 1, the translation API is trying to translate the number 1204.69 in words, but you're feeding the API with "SAUDI RIYALS ONE THOUSAND TWO HUNDRED FOUR AND HALALA SIXTY NINE ONLY", and this statement is wrong, it should be “ONE THOUSAND TWO HUNDRED FOUR AND SIXTY NINE”. When written correctly, is the translation good?

Reply all
Reply to author
Forward
0 new messages