WordNet::Tools - Some tools for use with WordNet.


WordNet-Similarity documentation  | view source Contained in the WordNet-Similarity distribution.

Index


NAME

Top

WordNet::Tools - Some tools for use with WordNet.

SYNOPSIS

Top

  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");

DESCRIPTION

Top

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.

METHODS

Top

The following methods are defined:

WordNet::Tools->new($wn)

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.

$wntools->compoundify($string)

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.

$wntools->getCompoundsList()

This method returns the list of compound words present in WordNet.

Parameters: none

Returns: reference to an array of compounds.

$wntools->hashCode()

This is method returns a unique identifier representing a specific distribution of WordNet.

Parameters: none.

Returns: a unique identifier (string).

EXPORT

Top

None by default.

SEE ALSO

Top

perl(1)

WordNet::QueryData(3)

AUTHORS

Top

  Ted Pedersen, University of Minnesota, Duluth
  tpederse at d.umn.edu

  Siddharth Patwardhan, University of Utah, Salt Lake City
  sidd at cs.utah.edu

COPYRIGHT AND LICENSE

Top


WordNet-Similarity documentation  | view source Contained in the WordNet-Similarity distribution.