NAME

UMLS::SenseRelate::TargetWord - A Perl module that implement the target word word sense disambiguation using the sense relate wsd algorithm based on the semantic similarity and relatedness options from the UMLS::Similarity package.

DESCRIPTION

This package provides an implementation of the senserelate word sense disambiguation algorithm using the semantic similarity and relatedness options from the UMLS::Similarity package.

SYNOPSIS

use UMLS::Similarity;
use UMLS::SenseRelate::TargetWord;

#  initialize option hash and umls
my %option_hash = ();
my $umls        = "";
my $meas        = "";
my $senserelate = "";
my $params      = "";

#  set interface     
$option_hash{"t"} = 1;
$option_hash{"realtime"} = 1;
$umls = UMLS::Interface->new(\%option_hash);

#  set measure
use UMLS::Similarity::path;
$meas = UMLS::Similarity::path->new($umls);

#  set senserelate
$params{"measure"} = "path";
$senserelate = UMLS::SenseRelate::TargetWord->new($umls, $meas, \%params);

# set the target word my $tw = "adjustment";

#  provide an instance where the target word is in <head> tags
my $instance = "Fifty-three percent of the subjects reported below average ";
   $instance .= "marital <head>adjustment</head>.";

my ($hashref) = $senserelate->assignSense($tw, $instance, undef);

if(defined $hashref) {
   print "Target word ($tw) was assigned the following sense(s):\n";
   foreach my $sense (sort keys %{$hashref}) {
     print "  $sense\n";
   }
}
else {
   print "Target word ($tw) has no senses.\n";
}

INSTALL

To install the module, run the following magic commands:

perl Makefile.PL
make
make test
make install

This will install the module in the standard location. You will, most probably, require root privileges to install in standard system directories. To install in a non-standard directory, specify a prefix during the 'perl Makefile.PL' stage as:

perl Makefile.PL PREFIX=/home/bridget

It is possible to modify other parameters during installation. The details of these can be found in the ExtUtils::MakeMaker documentation. However, it is highly recommended not messing around with other parameters, unless you know what you're doing.

DESCRIPTION

PARAMETERS

UMLS::SenseRelate parameters

'window  '     -> This parameter determines the window size of the 
                  context on each side of the target word to be used 
                  for disambiguation

'stoplist'     -> This parameter disregards stopwords when creating 
                  the window created on the fly (in realtime). 

'compound'     -> This parameter indicates that compounds exist in 
                  the input instance denoted by an underscore

'trace'        -> This parameters indicates that the trace information
                  should be printed out to the file 

SEE ALSO

http://tech.groups.yahoo.com/group/umls-similarity/

http://search.cpan.org/dist/UMLS-Similarity/

AUTHOR

Bridget T McInnes <bthomson@umn.edu> Ted Pedersen <tpederse@d.umn.edu>

COPYRIGHT

Copyright (c) 2010-2011
Bridget T. McInnes, University of Minnesota
bthomson at umn.edu

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

Serguei Pakhomov, University of Minnesota Twin Cities
pakh0002 at umn.edu

Ying Liu, University of Minnesota
liux0935 at umn.edu

This 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.