GoogleHack version 0.01 ======================= GoogleHack is a set of Perl modules that does a variety of things. The Module GoogleHack.pm acts as the "driver" module for all the sub-modules such as Search, Spelling, Text, and Rate. The module: 1) Provides an easy to use interface to the Google API SOAP package. Some basic functionalities include: * Allow the user to to query Google . * Retrive Spelling Suggestions . * Retrieve Cached web pages in a readable format (remove HTML tags). * Retrieve Number of hits. * Retrieve Time Taken for Query. * Retrieve snippets (these are small sentences in the web pages of the search results, that actually made google pick it). * Retrieve 2) Provides basic Natural Language Processing features, by using the results retrieved from Google. * Find the Pointwise Mututal Information measure of two words * Given a paragraph find if the paragraph has a positive or negative orientation. * Find the frequency counts of words that occur within a proximity of the given search string * Retrieve sentences surrounding the search string. * Given a word, find a set of words that are associated with it * Given two words, find the common intersecting words that occur in the results * Given two words finds a set of related words using an intersection technique 3) Provides basic text processing capabilities. * Remove HTML, XML tags. * Make n word sentences given text. * Parse word list files and return words as an array. INSTALLATION Make sure to install the entire package. There are multiple ways to install the modules. 1) You can use CPAN.pm to install GoogleHack. To install the module type the following : perl -MCPAN -e 'install GoogleHack' 2) Otherwise, type the following: perl Makefile.PL make make test make install The advantage of Using CPAN to install the module is that it will also install all the other modules required by GoogleHack. DEPENDENCIES This module requires these other modules and libraries: To use this package, you need to have a Google API ID, and the GoogleSearch.WSDL File. You can register for this service and download the required materials @ http://www.google.com/apis/ Other packages that you will need: 1) SOAP::Lite 2) HTML::TokeParser The other files required for the Rate module to work are: adjectives_list.txt nouns_list.txt adverbs_list.txt verbs_list.txt These file have been given in the GoogleHack/Extra directory. DEMONSTRATION ------------- To use the GoogleHack package include the following command at the beginning of your program: use GoogleHack; This command creates a new instance of GoogleHack called "search": $search = new GoogleHack; This command initializes the "key" and "Google WSDL" file path: $search->init( "key","GoogleSearch.wsdl"); $correction=$search->phraseSpelling("dulut"); $results=$search->Search("duluth"); print $search->{'searchTime'}; print $search->{'snippet'}->[0];; $results=$search->measureSemanticRelatedness("knife","cut"); $search->initConfig("config.txt"); # A sample config file can be found in the # GoogleHack/Extra directory. $search->printConfig(); $search->predictSemanticOrientation("ggapi/googleapi/review.txt", "excellent","bad"); DOCUMENTATION ------------- POD style documentation is included in all modules and scripts You can look @ `perldoc GoogleHack` for more information about the specifics of each module. The description of each method in the modules is also given. SUPPORT & CREDITS ----------------- Questions about how to use this library should If you have any questions or suggestions you e mail Pratheepan Raveendranathan (rave0029@d.umn.edu) or Ted Pedersen (tpederse@d.umn.edu). Design - Ted Pedersen Pratheepan Raveendranathan Implementation - Pratheepan Raveendranathan Documentation - Ted Pedersen Pratheepan Raveendranathan You can visit the developers web site @ Ted Pedersen - http://www.d.umn.edu/~tpederse Pratheepan Raveendranathan - http://www.d.umn.edu/~rave0029 COPYRIGHT AND LICENCE 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.