Language Detection APi

83 views
Skip to first unread message

Stu

unread,
Oct 30, 2010, 4:29:21 PM10/30/10
to Google AJAX APIs
Hi there,
We would like to use the Language Detection API to determine the
language of some data in our database. This will not be at the time
that it is collected, so it will be performed in a server-side loop
and be relatively automatic. This, however, would breach Google's TOU
because it's not directly from an end-user action.

My question is this: Has anyone entered into discussions with Google
before about different use of their APIs from normal? If so, how
would one go about contacting them?

Many Thanks,
Stuart

Jeremy Geerdes

unread,
Oct 30, 2010, 8:50:15 PM10/30/10
to google-ajax...@googlegroups.com
The TOS are written in such a way that you can't use an application that submits automated requests in any way. All requests must be triggered by end-user action. To answer you questions directly, I have heard of a number of people who have at least attempted to request an exception from that portion of the TOS. For obvious reasons, Google does not publicize whether or not any of those requests have been granted. The only thing I can tell you is that there are a number of members from the dev team which monitor this group and, if they believe that your project merits an exception, they will contact you with information about who to contact, etc. So the best I can suggest is that you post here a more detailed description of your project, who it's for, and any other information which would be pertinent to their considerations. But to be honest, I wouldn't hold your breath.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
jrge...@gmail.com

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

> --
> You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
> To post to this group, send email to google-ajax...@googlegroups.com.
> To unsubscribe from this group, send email to google-ajax-searc...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
>

Adam Feldman

unread,
Oct 31, 2010, 9:22:58 AM10/31/10
to Google AJAX APIs
Hi Stu,

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. It's
fairly comparable to the detection portion of the Language API, so you
should get similar results.

Cheers,
Adam

On Oct 30, 8:50 pm, Jeremy Geerdes <jrgeer...@gmail.com> wrote:
> The TOS are written in such a way that you can't use an application that submits automated requests in any way. All requests must be triggered by end-user action. To answer you questions directly, I have heard of a number of people who have at least attempted to request an exception from that portion of the TOS. For obvious reasons, Google does not publicize whether or not any of those requests have been granted. The only thing I can tell you is that there are a number of members from the dev team which monitor this group and, if they believe that your project merits an exception, they will contact you with information about who to contact, etc. So the best I can suggest is that you post here a more detailed description of your project, who it's for, and any other information which would be pertinent to their considerations. But to be honest, I wouldn't hold your breath.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
> jrgeer...@gmail.com

Stu

unread,
Oct 31, 2010, 10:54:13 AM10/31/10
to Google AJAX APIs
Jeremy and Adam, thanks very much for your replies!

Adam, this seems great! I'll try to delve into the library to
understand it a bit better. I assume it works on some form of trained
model to determine the language of some text? Does the library
include a trained model, or would we need to train it ourselves?

Many Thanks (this is very helpful!)

S.

On Oct 31, 1:22 pm, Adam Feldman <adam.feld...@google.com> wrote:
> Hi Stu,
>
> 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/

Stu

unread,
Oct 31, 2010, 1:07:13 PM10/31/10
to Google AJAX APIs
Also, whilst we're at it.. I've downloaded the full Chromium source
using gclient.

I think the right step is for me to try to make a project of some sort
using gyp? When I try to build with gyp there is the following error
and stack trace:

stuart@mercury:~/chromium/src/third_party/cld$ gyp
Traceback (most recent call last):
File "/usr/bin/gyp", line 18, in <module>
sys.exit(gyp.main(sys.argv[1:]))
File "/usr/lib/pymodules/python2.6/gyp/__init__.py", line 445, in
main
options.circular_check)
File "/usr/lib/pymodules/python2.6/gyp/__init__.py", line 84, in
Load
depth, generator_input_info, check, circular_check)
File "/usr/lib/pymodules/python2.6/gyp/input.py", line 2148, in Load
depth, check)
File "/usr/lib/pymodules/python2.6/gyp/input.py", line 380, in
LoadTargetBuildFile
build_file_path)
File "/usr/lib/pymodules/python2.6/gyp/input.py", line 967, in
ProcessVariablesAndConditionsInDict
build_file)
File "/usr/lib/pymodules/python2.6/gyp/input.py", line 982, in
ProcessVariablesAndConditionsInList
ProcessVariablesAndConditionsInDict(item, is_late, variables,
build_file)
File "/usr/lib/pymodules/python2.6/gyp/input.py", line 896, in
ProcessVariablesAndConditionsInDict
expanded = ExpandVariables(value, is_late, variables, build_file)
File "/usr/lib/pymodules/python2.6/gyp/input.py", line 666, in
ExpandVariables
' in ' + build_file
KeyError: 'Undefined variable library in cld.gyp while trying to load
cld.gyp'


Thanks,
S.

Adam Feldman

unread,
Nov 4, 2010, 1:09:32 AM11/4/10
to Google AJAX APIs
Hi Stu,

Sorry for the delayed response, but I've dug into this a little.
Unfortunately, what I found is that, while this library *has* been
open sourced, it's part of Chromium, so it's going to take a little
work to get it into a state that can be used directly. Worse, there
doesn't seem to be any documentation, and it's a little outside my
area of expertise to try to support.

If you do manage to get it working, please do report back here. In
the mean time, I'll try to find someone here who can write up some
docs or provide a little support, but I can't make any promises.
Until I have more information, I won't be pointing any new people at
it anymore.

Again, sorry for the difficulties.

Adam

Stu

unread,
Nov 5, 2010, 4:39:17 AM11/5/10
to Google AJAX APIs
Hi Adam,
Not to worry, thanks for the time you've invested in looking into this
for me. So far I've managed to run GYP on the whole of the Chromium
source. When this is done on Windows it generates lots of VS solution
files with the dependencies set up. There is one present for the CLD
which I can build with the default settings. What I actually need is
for this to be compiled to a linux shared library...but I'm having
some trouble GYPing Chromium under Linux. I'm going to have a play
with both the Windows version and Linux and I'll report back.

For reference, here's a thread about the gyp issue:
http://groups.google.com/group/gyp-developer/browse_thread/thread/7e2e50fc84fe793

If someone does manage to write some (even brief) docs, this would be
super helpful!

Thanks,
S.
Reply all
Reply to author
Forward
0 new messages