

WebService::GoogleHack - Is a Perl package that interacts with the Google API, and has some basic functionalities that allow the user to interact with Googleand retrieve results. It also has some Natural Language Processing capabilities, such as the ability to predict the semantic orienation of words, build word clusters, find words that are common to a pair of words etc.

This module acts as a driver module. Basically it acts as an interface between the user and the modules. The modules that are controlled by WebService::GoogleHack are:
WebService::GoogleHack::Text, Search, Rate, Spelling

Pratheepan Raveendranathan, <rave0029@d.umn.edu>
Ted Pedersen, <tpederse@d.umn.edu>


WebService::GoogleHack home page Pratheepan Raveendranathan Ted Pedersen
Google-Hack Maling List <google-hack-users@lists.sourceforge.net>

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.

Purpose: This function creates an object of type GoogleHack and returns a blessed reference.
Purpose: This this function can used to inititalize the member variables.
Valid arguments are :
string. key to the google-api
string. This the wsdl file name
string. The location of the adverbs list file
string. The location of the verbs list file
string. The location of the adjectives list file
string. The location of the nouns list file
string. The location of the stop_words list file
Purpose: This function sets the maximum number of results retrived
Valid arguments are :
Number. The maximum number of results we want to be able to retrieve. Should be less than 10.
Purpose: This this function can used to set the language restriction
Valid arguments are :
string. Language Restricion eg lang_eng
Purpose: This this function can used to set oe
Valid arguments are :
string.
Purpose: This this function can used to set ie
Valid arguments are :
string.
Purpose: This function sets the startposition for the search results
Valid arguments are :
string.
Purpose: This functions sets the search filter as on or off
Valid arguments are :
boolean. True or False
Purpose: this funciton restricts the search to a specific domains
Valid arguments are :
String. UncleSam for the US Government
Purpose: This functions enables safe search, Restricts search to non-abusive material.
Valid arguments are :
Boolean. "True" or "False".
Purpose: this is function is used to measure the relatedness between two words it basically calls the measureSemanticRelatedness function which is in the Rate class
Valid arguments are :
string. The search string which can be a phrase or word
string. The search string which can be a phrase or word
Returns: Returns the object containing the PMI measure. ($search->{'PMI'}).
Purpose: this function tries to predict the semantic orientation of a paragraph of text need
Valid arguments are :
string. The location of the review file
string. Positive inference such as excellent
string. Negative inference such a poor
string. The location of the trace file. If a file_name is given, the results are stored in this file
Returns : the PMI measure and the prediction which is 0 or 1.
Purpose: This is function is used to retrieve a spelling suggestion from Google
Valid arguments are :
string. Need to pass the search string, which can be a single word
Returns: Returns suggested spelling if there is one, otherwise returns "No Spelling Suggested":
Purpose: This function is used to query googles
Valid arguments are :
string. Need to pass the search string, which can be a single word or phrase, maximum ten words
integer. The number of results you wast to retrieve, default is 10. Maximum is 1000.
Returns: Returns a GoogleHack object containing the search results.
Purpose: this function is used to read a configuration file containing informaiton such as the Google-API key, the words list etc.
Valid arguments are :
string. Location of the configuration file.
returns : Returns an object which contains the parsed information.
Purpose: This function is used to print the information read from a configuration file
No arguments.
Purpose: Given a search word, this function tries to retreive the text surrounding the search word in the retrieved snippets.
Valid arguments are :
string. The search string which can be a word or phrase
string. The number of results to be processed from google.
string. The location of the trace file. If a file_name is given, the results are stored in this file
string. The number of words surrounding the searchString (Not Implemented yet
returns : Returns an object which contains the parsed information
Purpose: Given a search word, this function tries to retreive the text surrounding the search word in the retrieved CACHED Web pages. It basically does the search and passes the search results to the WebService::GoogleHack::Text::getCachedSurroundingWords function.
Valid arguments are :
string. The search string which can be a word or phrase
string. The location of the trace file. If a file_name is given, the results are stored in this file
returns : Returns a hash with the keys being the words and the values being the frequency of occurence.
Purpose: Given a search word, this function tries to retreive the sentences in the snippet.It basically does the search and passes the search results to the WebService::GoogleHack::Text::getSnippetSentences function
Valid arguments are :
string. The search string which can be a word or phrase
string. The location of the trace file. If a file_name is given, the results are stored in this file
returns : Returns an array of strings.
Purpose: Given a search word, this function tries to retreive the sentences in the cached web page.
Valid arguments are :
string. The search string which can be a word or phrase
string. The location of the trace file. If a file_name is given, the results are stored in this file
returns : Returns a hash which contains the parsed sentences as values and the key being the web URL.
Purpose:Given two search words, this function tries to retreive the common text/words surrounding the search strings in the retrieved snippets.
Valid arguments are :
string. The search string which can be a word or phrase
string. The search string which can be a word or phrase
string. The location of the trace file. If a file_name is given, the results are stored in this file
returns : Returns a hash which contains the parsed sentences as values and the key being the web URL.
Purpose:Given a search string, this function retreive the top frequency words , and does a search on those words, and builds a list of words that can be regarded as a cluster of related words.
Valid arguments are :
string. The search string which can be a word or phrase
iterations
number. The number of iterations that you want the function to search and build cluster on.
trace_file.
string. The location of the trace file. If a file_name is given, the results are stored in this file
returns : Returns a hash which contains the parsed sentences as values and the key being the web URL.
Purpose:Given two search strings, this function retreive the snippets for each string, and then finds the intersection of words, and then repeats the search with the intersection of words.
Valid arguments are :
string. The search string which can be a word or phrase
string. The search string which can be a word or phrase
number. The number of iterations that you want the function to search and build cluster on.
string. The location of the trace file. If a file_name is given, the results are stored in this file
returns : Returns a hash which contains the intersecting words as keys and the values being the frequency of occurence.
Purpose:Given a search string, this function will retreive the resulting URLs from Google, follow those links, and retrieve the text from there. The function will then clean up the text and store it in a file along with the URL, Date and time of retrieval.The file will be stored under the name of the search string.
Valid arguments are :
string. The search string which can be a word or phrase.
number. The number of iterations that you want the function to search and build cluster on.
string. The location where the file containing the retrived information has to be stored.
returns : Returns nothing.