Pratheepan Raveendranathan > WebService-GoogleHack-0.03 > GoogleHack/Examples/Spelling.pl

Download:
WebService-GoogleHack-0.03.tar.gz

Annotate this POD

CPAN RT

New  1
Open  1
View Bugs
Report a bug
Source   Latest Release: WebService-GoogleHack-0.15

Spelling ^

SYNOPSIS ^

This is a perl program that gives the example use of the Google-Hack function to retrieve a spelling suggestion.

DESCRIPTION ^

This program basically gives an example call to the phraseSpelling function in the Google-Hack.

AUTHOR ^

Pratheepan Raveendranathan, <rave0029@d.umn.edu>

Ted Pedersen, <tpederse@d.umn.edu>

BUGS ^

SEE ALSO ^

GoogleHack home page Pratheepan Raveendranathan Ted Pedersen

Google-Hack Maling List <google-hack-users@lists.sourceforge.net>

COPYRIGHT AND LICENSE ^

Copyright (c) 2003 by Pratheepan Raveendranathan, Ted Pedersen

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to

The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

INITIALIZATION FUNCTIONS ^

INIT METHOD 1 - init(\%args)

Set your GoogleAPI Key

$key="";

Give the Entire location of your WSDL file

eg "/dirname/dirname/GoogleSearch.wsdl"

$wsdl="";

Create an Object of type WebService::GoogleHack

$google = new WebService::GoogleHack;

Initialize WebService::GoogleHack object to the key and WSDL config file path.

$google->init( "$key","$wsdl");

Issuing a search request to the spelling suggestion function Retrieve a spelling suggestion for the search String "dulut"

$correction=$google->phraseSpelling("dulut");

If the string is "No Spelling Suggested", that means there was no spelling suggestions from Google.

I am just printing the suggested spelling

print "\n\n The suggested spelling for dulut is : $correction\n\n";