NAME
Lemur - class to query a Lemur server, and parse the results
VERSION
Version 1.00
SYNOPSYS
use Search::Lemur;
my $lem = Search::Lemur->new("http://url/to/lemur.cgi");
# run some queries, and get back an array of results
# a query with a single term:
my @results1 = $lem->query("encryption");
# a query with two terms:
my @results2 = $lem->query("encryption MD5");
# get corpus term frequency of 'MD5':
my $md5ctf = $results2[1]->ctf();
DESCRIPTION
This module will make it easy to interact with a Lemur Toolkit for Language Modeling and Information Retrieval server for information retreival exercises. For more information on Lemur, see http://www.lemurproject.org/.
This module takes care of all parsing of responses from the server. You can just pass a query as a space-separated list of terms, and the module will give you back an array of result
objects.
Main Methods
- new($url)
-
Create a new Lemur object, connecting to the given Lemur server. The
$url
should be a full URL, ending in something like 'lemur.cgi'. - url()
-
Return the URL of the Lemur server
- listdb()
-
Get some information about the databases available
Returns an array of Lemur::Database objects.
- d([num])
-
Set the database number to query. This will specify the database number instead of just using the default databse 0.
If the
num
is not specified, the the current database is returned. - v(string)
-
Make a query to the Lemur server. The query should be a space-delimited list of query terms. If the URL is has not been specified, this will die.
Be sure there is only one space between words, or something unexpected may happen.
Returns an array of results (See Lemur::result). There will be a result for each query term.
- m(string)
-
Returns the lexicalized (stopped & stemmed) version of the given word. This is affected by weather or not the current database is stemmed and/or stopworded. Basically, this is the real word you will end up searching for.
Returns a string.
AUTHOR
Patrick Kaeding, <pkaeding at cpan.org>
BUGS
Please report any bugs or feature requests to bug-search-lemur at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Search-Lemur. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Search::Lemur
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2007 Patrick Kaeding, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.