WordNet::vectorFile - Provides access to the word vectors database (used


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

Index


NAME

Top

WordNet::vectorFile - Provides access to the word vectors database (used by the vector and vector_pairs WordNet::Similarity measures).

SYNOPSIS

Top

  use WordNet::vectorFile;

  my ($dCount, $dims, $vecRef) = WordNet::vectorFile->readVectors($filename);

  WordNet::vectorFile->writeVectors($fname, $dCount, $dims, $vecRef);

DESCRIPTION

Top

This module provides a read/write interface into the word vectors data file. This module is used by WordNet::Similarity::vector and WordNet::Similarity::vector_pairs as an interface into the word vectors database. This module abstracts the format of the data file away from the user.

Methods

readVectors

This method reads in a word vectors file, and returns the document count, the words corresponding to the dimensions of the vectors, and a reference to an array containing the list of word vectors.

Parameters: $file -- the file name of the word vectors file.

Returns: ($dCount, $dims, $vecRef)

writeVectors

This method writes out a list of word vectors to the word vectors file.

Parameters: $fname, $dCount, $dims, $vecRef

Returns: none

SEE ALSO

Top

perl(1), WordNet::Similarity(3), WordNet::QueryData(3)

http://www.cs.utah.edu/~sidd

http://wordnet.princeton.edu

http://www.ai.mit.edu/~jrennie/WordNet

http://groups.yahoo.com/group/wn-similarity

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

BUGS

Top

None.

To report bugs, go to http://groups.yahoo.com/group/wn-similarity/ or e-mail "tpederse at d.umn.edu".

COPYRIGHT AND LICENSE

Top


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