|
NAMEWordNet::Similarity::DepthFinder - methods to find the depth of synsets in WordNet taxonomiesSYNOPSISuse WordNet::QueryData; my $wn = WordNet::QueryData->new; defined $wn or die "Construction of WordNet::QueryData failed"; use WordNet::Similarity::DepthFinder; my $obj = WordNet::Similarity::DepthFinder->new ($wn); my ($err, $errString) = $obj->getError (); $err and die $errString; my $wps1 = 'car#n#4'; my $wps2 = 'oil#n#1'; my $offset1 = $wn -> offset ($wps1); my $offset2= $wn -> offset ($wps2); my @roots = $obj->getTaxonomies ($offset1, 'n'); my $taxonomy_depth = $obj->getTaxonomyDepth ($roots[0], 'n'); print "The maximum depth of the taxonomy where $wps1 is found is $taxonomy_depth\n"; my @depths = $obj->getSynsetDepth ($offset1, 'n'); print "The depth of $offset1 is $depths[0]->[0]\n"; my @lcsbyic = $obj -> getLCSbyDepth($wps1,$wps2,'n','wps'); print "$wps1 and $wps2 have LCS $lcsbyic[0]->[0] with Depth $lcsbyic[0]->[1]\n"; my @lcsbyic = $obj -> getLCSbyDepth($offset1,$offset2,'n','offset'); print "$offset1 and $offset2 have LCS $lcsbyic[0]->[0] with Depth $lcsbyic[0]->[1]\n"; DESCRIPTIONThe following methods are provided by this module:
AUTHORSTed Pedersen, University of Minnesota Duluth tpederse at d.umn.edu Jason Michelizzi, University of Minnesota Duluth mich0212 at d.umn.edu BUGSNone.To report bugs, e-mail tpederse at d.umn.edu or go to http://groups.yahoo.com/group/wn-similarity/. SEE ALSOWordNet::Similarity(3) WordNet::Similarity::wup(3) WordNet::Similarity::lch(3)COPYRIGHTCopyright (c) 2005, Ted Pedersen and Jason MichelizziThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Note: a copy of the GNU General Public License is available on the web at <http://www.gnu.org/licenses/gpl.txt> and is included in this distribution as GPL.txt.
Visit the GSP FreeBSD Man Page Interface. |