Hi Jeremy, These are user requests so I don't have control over what text or how many words are entered. It would be helpful if the erorr returned was along the lines of "text to short to detect language" or do what Translate v1 does and say "could not reliably detect langauge" rather than "bad language pair" which is a different error, and one that I handle diffefently in my app.
cheers Joe On Sep 29, 10:06 pm, Jeremy Geerdes <[email protected]> wrote: > It's not really a language detection problem. The issue is that the machine > translation is really not optimized for single word translations, especially > when it has to detect the source language. There are simply too many > variables for the system to make an accurate detection. And if you run a > number of tests on single words - or even short strings - you'll find that > the accuracy is actually rather poor. In fact, there is a threshold of about > three words. With *phrases* of at least three words, accuracy jumps > dramatically, but one- and two-word strings are really, really hit and miss. > Try sending translation requests in phrases of at least three words. > > Jeremy R. Geerdes > Generally Cool Guy > Des Moines, IA > > For more information or a project quote: > [email protected] > > If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan > Church! > > On Sep 28, 2011, at 8:36 PM, Joe Lipson wrote: > > > > > Hi, > > > I'm using the v2 Translate API REST interface > > > A problem that's cropping up is that when I let the API auto detect > > the source language, sometimes I get back the response "Bad language > > pair: {0}". It seems to occur dependent on the query string. > > > e.g. this request gives a bad language pair error: > > >https://www.googleapis.com/language/translate/v2?key=my-key&target=es... > > > Just change the query and this does not > > >https://www.googleapis.com/language/translate/v2?key=my-key&target=es... > > > I'm thinking it's a language detection problem, but just being > > reported as a bad language pair? > > > cheers > > > Joe > > > -- > > You received this message because you are subscribed to the Google > > Groups "Google AJAX APIs" group. > > To post to this group, send email to > > [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > To view this message on the web, visit > >http://groups.google.com/group/google-ajax-search-api?hl=en_US > > For more options, visit this group at > >http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en- Hide > >quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] To view this message on the web, visit http://groups.google.com/group/google-ajax-search-api?hl=en_US For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
