Gossamer Forum
Home : General : Internet Technologies :

Google API - signup so confusing!!!

Quote Reply
Google API - signup so confusing!!!
Hi,

I just went to signup for an API key on Google (http://code.google.com/apis/) - for the Net::Google::Spelling perl module. I'm trying to write a spell checker plugin, that integrates with Google's API.

I've searches for the last 45 minutes on their site - trying to find out where I can get an API for that section - but everywhere I go, is just a dead end :/

Can anyone please point me in the right direction? Its driving me mad Pirate

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google API - signup so confusing!!! In reply to
If you have signed up, can't you just download the module?

http://search.cpan.org/~bstilwell/Net-Google-1.0.1/lib/Net/Google/Spelling.pm
Quote Reply
Re: [Wychwood] Google API - signup so confusing!!! In reply to
Hi,

Yeah, but its one API key per domain - and I only have an API key for Ultranerds at the moment. I'm trying to get one for another site, but can't find the page :(

Trying to use my API key from Ultranerds just gives an error:

/usr/bin/perl Build --makefile_env_macros 1 test
t/000-key.........#
# The Google API web service requires that you provide create a Google Account and obtain a license key
# This key is then passed with each request you make to the Google servers.
# If you do not already have a Google Account, you can sign up for one here:
# http://www.google.com/apis/
#
# Please enter your Google API key:
ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg
t/000-key.........ok
t/001-search......ok 1/5Exception from service object: Invalid authorization key: ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg at /usr/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 3412
t/001-search......ok
t/002-spelling....ok 1/5Exception from service object: Invalid authorization key: ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg at /usr/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 3412

# Failed test 'The correct spelling of 'neu yirk citee' is 'new york city''
t/002-spelling....NOK 5/5# at t/002-spelling.t line 42.
# got: undef
# expected: 'new york city'
# Looks like you failed 1 test of 5.
t/002-spelling....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 5
Failed 1/5 tests, 80.00% okay
t/003-cache.......ok 1/5Exception from service object: Invalid authorization key: ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg at /usr/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 3412


Real PITA :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google API - signup so confusing!!! In reply to
Andy,

According to this: http://code.google.com/apis/soapsearch/ and what I see from module source.

I think key for this api http://code.google.com/...axsearch/signup.html will do the job :\

Just my 2c

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [eupos] Google API - signup so confusing!!! In reply to
Hi,

Thanks, still no joy though :(

Quote:
ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg
t/000-key.........ok
t/001-search......ok 4/5Exception from service object: Invalid authorization key: ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg at /usr/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 3412
t/001-search......ok
t/002-spelling....ok 4/5Exception from service object: Invalid authorization key: ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg at /usr/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 3412

# Failed test 'The correct spelling of 'neu yirk citee' is 'new york city''
# at t/002-spelling.t line 42.
# got: undef
# expected: 'new york city'
t/002-spelling....NOK 5/5# Looks like you failed 1 test of 5.
t/002-spelling....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 5
Failed 1/5 tests, 80.00% okay
t/003-cache.......ok 1/5Exception from service object: Invalid authorization key: ABQIAAAA80paa3FVspgMFqLCIjvIahRh-Q_sYP6N0TW9O8hXuvDNc0udlxT717plUuRysh0_vdbEqm5OnyfOjg at /usr/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 3412
Use of uninitialized value in length at t/003-cache.t line 42.

(that API key is from the signup page you gave).

This is getting quite annoying Unsure

TIA for any ideas.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google API - signup so confusing!!! In reply to
Hello again,

I've looked deep in this module and from this I think the support for Google SOAP Search API refers to Spell API too Frown

I think if you have an existing domain key for SOAP Search API, you can test this on that domain.

I know this won't help much but will make situation more clear.

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [eupos] Google API - signup so confusing!!! In reply to
Hi,

Yeah, that's what I was thinking :/

I wish they still had a generic API key for things like Google Search, Google PR, etc Unimpressed

I've posted something on the Google support forums, to see if anyone can shed any light :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [eupos] Google API - signup so confusing!!! In reply to
Hi,

Darn, they've changed their site around again :(

I think I'm gonna give up with the Net::Google::Spelling module. It will probably work really good - but without the "API Key", its useless :(

Does anyone know of a good spell checker module? I've tried Text::ASpell - but configuring the dictionaries seems a right mission. I spent over 3 hours just looking over the documentation, and still am no where nearer to getting a dictionary setup :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google API - signup so confusing!!! In reply to
Hi,

For anyone interested, I finally managed to get a pretty comprehensive spell checker working with Lingua::Ispell. Here is the process for installing it, in case anyone wants to (requires you to be logged in as root)

...run each line as a seperate command!

Code:
perl -MCPAN -e 'install Lingua::Ispell'
wget http://www.lasr.cs.ucla.edu/geoff/tars/ispell-3.3.02.tar.gz
gzip -d ispell-3.3.02.tar.gz
tar -xof ispell-3.3.02.tar
cd ispell-3.3.02
cp local.h.linux local.h
make all
make install

A test script, is as follows:

Code:
#!/usr/bin/perl

print "Content-type: text/html \n\n";

for my $r ( spellcheck( "medicsl" ) ) {
if ( $r->{'type'} eq 'ok' ) {
# as in the case of 'hello'
#print "'$r->{'term'}' was found in the dictionary.\n\n";
}
elsif ( $r->{'type'} eq 'root' ) {
# as in the case of 'hacking'
print "'$r->{'term'}' can be formed from root '$r->{'root'}'\n\n";
}
elsif ( $r->{'type'} eq 'miss' ) {
# as in the case of 'perl'
print "'$r->{'term'}' was not found in the dictionary;\n";
print "Near misses: @{$r->{'misses'}}\n\n";
} elsif ( $r->{'type'} eq 'guess' ) {
# as in the case of 'salmoning'
print "'$r->{'term'}' was not found in the dictionary;\n";
print "Root/affix Guesses: @{$r->{'guesses'}}\n\n";
}
elsif ( $r->{'type'} eq 'compound' ) {
# as in the case of 'fruithammer'
print "'$r->{'term'}' is a valid compound word.\n\n";
}
elsif ( $r->{'type'} eq 'none' ) {
# as in the case of 'shrdlu'
print "No match for term '$r->{'term'}'\n\n";
}
# and numbers are skipped entirely, as in the case of 42.
}

Hope that helps someone :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google API - signup so confusing!!! In reply to
If you are installing with CPAN why are you then downloading and compiling it a second time as well?
Quote Reply
Re: [Wychwood] Google API - signup so confusing!!! In reply to
Hi,

The CPAN one is the perl module - but it requires a seperate program to run

Quote:
DEPENDENCIES ^

Lingua::Ispell uses the external program ispell, which is the "International Ispell", available at

http://fmg-www.cs.ucla.edu/geoff/ispell.html

http://fmg-www.cs.ucla.edu/...spell.html#ftp-sites

Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!