This WordNet module (WordNet::QueryData) is a Perl interface to the WordNet database. WordNet is a database of word meanings and lexical relationships. It contains tens of thousands of words and numerous semantic relationships for each. For example, it can tell you that a limousine is a type of a car and that a car is a type of motor vehicle. It can also tell you that car and automobile have essentially the same meaning.
WordNet::QueryData provides a direct interface to the WordNet database files. It requires the WordNet package. It allows the user direct access to the full WordNet semantic lexicon. All parts of speech are supported and access is generally very efficient because the index and morphical exclusion tables are loaded at initialization. This initialization step is slow (appx. 10-15 seconds), but queries are very fast thereafter---thousands of queries can be completed every second.
Installation uses the perl MakeMaker utility ('perldoc ExtUtils::MakeMaker'). To build and test the distribution do:
perl Makefile.PLIf make test doesn't work at all ("not ok 1"), you may not have the WNHOME environment variable defined correctly. Read the QueryData manual page to find out how to tell it where your WordNet database is located (edit test.pl).
If any of the tests for your version of WordNet fail, send e-mail to the wn-perl mailing list (see below).
If the tests run okay, install with (this may need to be run as root):
make installAlternately, copy QueryData.pm to /foo/WordNet/, and use -I/foo as an argument to perl.
NOTE: See the README file for Windows installation documentation.
|Subscribe to wn-perl|
|Browse Archives at groups.google.com|