views:

132

answers:

2

Hi,

I'm using the Google Translate API.

In some languages, if there is no matching translation, the service returns the same word I sent. This way I know there was no translation.

The problem is with languages where the result is a phonetic word. It happens with languages that have different letters from English.

How can I know for sure if the service found or did not found the translation for my word?

A: 

example :

take 2 languages, first english and other a language where the letters are not english letters like arabic, japanise etc.

now, if you write some letters in arabic with no meaning, you will get some result in english.

the question is how can i know the service found a real translation for the word or is just return me phonetically result.

hope im clear here.

navo
A: 
  1. check if the result is the same word as the input because 99% of the time languages do not have the exact same orthography (spelling or characters if you will) for the same word. An example against this argument is cognates court court English French if you will but this is an exception that is insignificant and your just going to have to deal with exceptions with natural languages.
  2. if you are translating from a language that does not use the roman alphabet and you are getting roman alphabet output you probably are getting a phonetic representation of the word. Japanese doesn't use tone so that's not a problem and languages that do use tone such as Chinese which uses pinyin with tone marks, I do believe that tone marks are actually independent from the phonetic markers such as a, b, c, and then tone 1, 2, 3, 4 are ontop of that but not the same unit.

Just two ideas.

Sam