WordNet::Similarity::ICFinderA module for finding the information content of concepts in WordNet | |
Download |
WordNet::Similarity::ICFinder Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Ted Pedersen, Jason Michelizzi and Siddharth Patwardhan
- Publisher web site:
- http://search.cpan.org/~tpederse/
WordNet::Similarity::ICFinder Tags
WordNet::Similarity::ICFinder Description
A module for finding the information content of concepts in WordNet WordNet::Similarity::ICFinder is a Perl module for finding the information content of concepts in WordNet.SYNOPSIS use WordNet::QueryData; my $wn = WordNet::QueryData->new; defined $wn or die "Construction of WordNet::QueryData failed"; use WordNet::Similarity::ICFinder; my $obj = WordNet::Similarity::ICFinder->new ($wn); my ($err, $errString) = $obj->getError (); $err and die $errString; my $wps1 = 'cat#n#1'; my $wps2 = 'feline#n#1'; my $offset1 = $wn -> offset ($wps1); my $offset2 = $wn -> offset ($wps2); # using the wps mode my $ic = $obj->IC ($wps1, 'n', 'wps'); my $prob = $obj->probability ($wps1, 'n', 'wps'); my $freq = $obj->getFrequency ($wps1, 'n', 'wps'); print "$wps1 has frequency $freq, probability $prob, and IC $ic "; my $ic = $obj->IC ($wps2, 'n', 'wps'); my $prob = $obj->probability ($wps2, 'n', 'wps'); my $freq = $obj->getFrequency ($wps2, 'n', 'wps'); print "$wps2 has frequency $freq, probability $prob, and IC $ic "; my @lcsbyic = $obj -> getLCSbyIC($wps1,$wps2,'n','wps'); print "$wps1 and $wps2 have LCS $lcsbyic-> with IC $lcsbyic-> "; # doing the same thing in the offset mode my $ic = $obj->IC ($offset1, 'n', 'offset'); my $prob = $obj->probability ($offset1, 'n', 'offset'); my $freq = $obj->getFrequency ($offset1, 'n', 'offset'); print "$offset1 has frequency $freq, probability $prob, and IC $ic "; my $ic = $obj->IC ($offset2, 'n', 'offset'); my $prob = $obj->probability ($offset2, 'n', 'offset'); my $freq = $obj->getFrequency ($offset2, 'n', 'offset'); print "$offset2 has frequency $freq, probability $prob, and IC $ic "; my @lcsbyic = $obj -> getLCSbyIC($offset1,$offset2,'n','wps'); print "$offset1 and $offset2 have LCS $lcsbyic-> with IC $lcsbyic-> "; Requirements: · Perl
WordNet::Similarity::ICFinder Related Software