WordNet::Similarity::PathFinder

WordNet::Similarity::PathFinder is a Perl module to implement path finding methods for WordNet::Similarity measures.
Download

WordNet::Similarity::PathFinder Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ted Pedersen, Siddharth Patwardhan and Jason Michelizzi
  • Publisher web site:
  • http://search.cpan.org/~sid/

WordNet::Similarity::PathFinder Tags


WordNet::Similarity::PathFinder Description

WordNet::Similarity::PathFinder is a Perl module to implement path finding methods for WordNet::Similarity measures. WordNet::Similarity::PathFinder is a Perl module to implement path finding methods (by node counting) for WordNet::Similarity measures of semantic relatedness.SYNOPSIS use WordNet::QueryData; my $wn = WordNet::QueryData->new; use WordNet::Similarity::PathFinder; my $obj = WordNet::Similarity::PathFinder->new ($wn); my $result = $obj->parseWps($wps1, $wps2); my @paths = $obj->getShortestPath("dog#n#1", "cat#n#1", "n", "wps"); my ($length, $path) = @{shift @paths}; defined $path or die "No path between synsets"; my @paths = $obj->getAllPaths("worship#v#1", "adore#v#1", "v", "wps"); my ($length, $path) = @{shift @paths}; defined $path or die "No path between synsets"; my @paths = $obj->getShortestPath("02895418", "02724985", "n", "offset"); my ($length, $path) = @{shift @paths}; defined $path or die "No path between synsets";IntroductionThis class is derived from (i.e., is a sub-class of) WordNet::Similarity.The methods in this module are useful for finding paths between concepts in WordNet's 'is-a' taxonomies. Concept A is-a concept B if, and only if, B is a hypernym of A or A is in the hypernym tree of B. N.B., only nouns and verbs have hypernyms.The methods that find path lengths (such as getShortestPath() and getAllPaths() compute the lengths using node-counting not edge-counting. In general, the length of a path using node-counting will always be one more than the length using edge-counting. For example, if concept A is a hyponym of concept B, then the path length between A and B using node-counting is 2, but the length using edge-counting is 1. Likewise, the path between A and A is 1 using node-counting and 0 using edge-counting.Requirements:· Perl


WordNet::Similarity::PathFinder Related Software