Awesome!! Thanks Adam. I always thought Chrome was using Google Translate to detect the language of a page.
Now, I should figure how to use this in my PHP code. Any suggestions? On Sep 13, 11:24 pm, Adam Feldman <[email protected]> wrote: > Hi Karthik, > > We open-sourced the compact language detection library used by the > translation feature in Chrome/Toolbar > -http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/ > > If you need to run Language Detection over a large amount of data that > aren't end-user initiated requests, you should use this library. > > Cheers, > Adam > > On Sep 13, 10:56 am, Karthik <[email protected]> wrote: > > > > > > > > > Sorry, I didn't get that. If you pass multiple q parameters to > > "translate" method that works. But same doesn't work with "detect" > > method. > > > My problem is unique here. I'd like to detect languages of a large > > number of tweets (length <= 140 characters). I don't want to mess with > > the API by calling hundreds of times in a minute (which is equivalent > > to the number of tweets indexed by my application). Batch detection > > would considerably reduce my API usage, but unfortunately its not > > supported :( > > > On Sep 13, 5:05 pm, Jeremy Geerdes <[email protected]> wrote: > > > > You are correct that the API does not support the submission of multiple > > > q parameters. However, you could join your various strings to be > > > translated with some string that you know will not be translated (e.g., > > > HTML in html mode or a new line in text mode) and then split the response > > > on those strings. > > > > Jeremy R. Geerdes > > > Effective website design & development > > > Des Moines, IA > > > > For more information or a project quote:http://jgeerdes.home.mchsi.com > > > [email protected] > > > > If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan > > > Church! > > > > On Sep 13, 2010, at 6:06 AM, Karthik wrote: > > > > > I just tried batch detection with Google Language API and found it > > > > reads only the first 'q' parameter. > > > > > Try: > > > > >http://ajax.googleapis.com/ajax/services/language/detect?v=1.0&q=hell... > > > > > Even the documentation doesn't state explicitly that batch detection > > > > is possible, but wouldn't it be great to offer this feature > > > > considering by the fact that more tougher batch translation is > > > > supported by the API? > > > > > -- > > > > 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]. > > > > For more options, visit this group > > > > athttp://groups.google.com/group/google-ajax-search-api?hl=en. -- 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]. For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
