WordNet::SenseRelate::Instance - Perl module that represents a context, including a target


WordNet-SenseRelate-TargetWord documentation Contained in the WordNet-SenseRelate-TargetWord distribution.

Index


Code Index:

NAME

Top

WordNet::SenseRelate::Instance - Perl module that represents a context, including a target word and surrounding context words.

SYNOPSIS

Top

  use WordNet::SenseRelate::Instance;

DESCRIPTION

Top

WordNet::SenseRelate::Instance represents a piece of text, including a target word that requires to be disambiguated. Essentially, an instance is a set of Word objects, with one Word object marked as the target word.

EXPORT

None by default.

SEE ALSO

Top

perl(1)

WordNet::SenseRelate::TargetWord(3)

WordNet::SenseRelate::Word(3)

AUTHOR

Top

Ted Pedersen, tpederse at d.umn.edu

Siddharth Patwardhan, sidd at cs.utah.edu>

Satanjeev Banerjee, banerjee+ at cs.cmu.edu

COPYRIGHT AND LICENSE

Top


WordNet-SenseRelate-TargetWord documentation Contained in the WordNet-SenseRelate-TargetWord distribution.

# WordNet::SenseRelate::Instance v0.09
# (Last updated $Id: Instance.pm,v 1.5 2006/12/24 12:18:45 sidz1979 Exp $)

package WordNet::SenseRelate::Instance;

use strict;
use vars qw($VERSION @ISA);

@ISA     = qw(Exporter);
$VERSION = '0.09';

# Constructor for this module
sub new
{
    my $class = shift;
    my $self  = {};

    # Create the Instance object
    $class = ref $class || $class;
    bless($self, $class);

    # Set the Instance
    $self->{word} = "";
    my $word = shift;
    $self->{word} = $word if (defined $word);

    return $self;
}

# Return the Instance
sub getInstance
{
    my $self = shift;
    return undef if (!defined $self || !ref $self);
    return $self->{word};
}

1;

__END__