WordNet::Tools - Some tools for use with WordNet.
use WordNet::QueryData; use WordNet::Tools; my $wn = WordNet::QueryData->new; my $wntools = WordNet::Tools->new($wn); my $wnHashCode = $wntools->hashCode(); my $newstring = $wntools->compoundify("find compound words like new york city in this text");
This module provides some tools for use with WordNet. For example, the 'compoundify' method detects compound words (as found in WordNet) in a text string and it combines these words into single tokens using underscore separators. Another tool in this module generates a unique hash code corresponding to a WordNet distribution. This hash code is meant to replace the "version" information in WordNet, which is no longer reliable.
The following methods are defined:
This is a constructor for this class (and creates a new object of this class). It requires a WordNet::QueryData object as a parameter.
Parameters: $wn -- a WordNet::QueryData object.
Returns: a new WordNet::Tools object.
This is method identifies all compound words occurring in the given input string. Compound words are multi-word tokens appearing in WordNet.
Parameters: $string -- an input text string.
Returns: a string with compound words identified.
This is method returns a unique identifier representing a specific distribution of WordNet.
Parameters: none.
Returns: a unique identifier (string).
None by default.
perl(1)
WordNet::QueryData(3)
Ted Pedersen, tpederse at d.umn.edu
Siddharth Patwardhan, sidd at cs.utah.edu
Copyright (C) 2005 by Ted Pedersen and Siddharth Patwardhan
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.
To install WordNet::Similarity, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WordNet::Similarity
CPAN shell
perl -MCPAN -e shell install WordNet::Similarity
For more information on module installation, please visit the detailed CPAN module installation guide.