cic.wsd.semcor
Class AmbiguousWord

java.lang.Object
  extended by cic.wsd.semcor.AmbiguousWord

public class AmbiguousWord
extends java.lang.Object

Class for storing an ambiguous lemma.

Author:
Francisco Viveros-Jiménez

Field Summary
(package private)  int[] correctSenses
          Senses retrieved from SEMCOR wnsn attribute.
(package private)  double idf
          IDF from the lemma retrieved from WordNet.getIDF(lemma)
(package private)  int index
          The index of this word in the current document.
(package private)  java.lang.String lemma
          WordNet lemma retrieved from WordNet.Morphy() method.
(package private)  java.lang.String pos
          POS tag of the lemma.
(package private)  java.util.ArrayList<cic.wordnet.ParsedSynset> senses
          Senses for the lemma retrieved from WordNet using getLemma(lemma).
(package private)  double tf
          TF value of this lemma set by an Input object.
 
Constructor Summary
AmbiguousWord(java.lang.String lemma, java.lang.String pos, java.lang.String correctSenses, int index)
          Creates an ambiguous word from SEMCOR info.
 
Method Summary
 int[] getCorrectSenses()
          Returns the correct senses of this word.
 double getIDF()
          Returns the IDF value of this lemma.
 int getIndex()
          Return the position of this word in the document.
 java.lang.String getLemma()
          Returns this lemma in format "lemma_P".
 java.lang.String getPOS()
          Returns this word's POS tag.
 java.util.ArrayList<java.lang.String> getPossibleHypernyms()
          Returns an ArrayList containing the possible hypernyms of this lemma.
 java.util.ArrayList<java.lang.String> getPossibleSynonyms()
          Returns an ArrayList containing the possible synonyms of this lemma.
 java.util.ArrayList<cic.wordnet.ParsedSynset> getSenses()
          Returns the possible senses of this lemma.
 double getTf()
          Return the TF value of this word.
 void setTf(double tf)
          Sets the TF value of this lemma in its current document.
 java.lang.String toString()
          Returns the lemma.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lemma

java.lang.String lemma
WordNet lemma retrieved from WordNet.Morphy() method.


pos

java.lang.String pos
POS tag of the lemma.


senses

java.util.ArrayList<cic.wordnet.ParsedSynset> senses
Senses for the lemma retrieved from WordNet using getLemma(lemma).


correctSenses

int[] correctSenses
Senses retrieved from SEMCOR wnsn attribute.


idf

double idf
IDF from the lemma retrieved from WordNet.getIDF(lemma)


tf

double tf
TF value of this lemma set by an Input object.


index

int index
The index of this word in the current document.

Constructor Detail

AmbiguousWord

public AmbiguousWord(java.lang.String lemma,
                     java.lang.String pos,
                     java.lang.String correctSenses,
                     int index)
Creates an ambiguous word from SEMCOR info.

Parameters:
lemma - Value of SEMCOR lemma attribute.
pos - Value of SEMCOR pos attribute.
correctSenses - Value of SEMCOR wnsn attribute. "U" means that any sense is correct.
index - The problem number.
Method Detail

getIndex

public int getIndex()
Return the position of this word in the document.

Returns:
index

toString

public java.lang.String toString()
Returns the lemma.

Overrides:
toString in class java.lang.Object

getTf

public double getTf()
Return the TF value of this word.

Returns:
tf

setTf

public void setTf(double tf)
Sets the TF value of this lemma in its current document.

Parameters:
tf - TF value.

getIDF

public double getIDF()
Returns the IDF value of this lemma.

Returns:
idf

getLemma

public java.lang.String getLemma()
Returns this lemma in format "lemma_P".

Returns:
Lemma in format "lemma_P".

getPOS

public java.lang.String getPOS()
Returns this word's POS tag.

Returns:
POS tag

getSenses

public java.util.ArrayList<cic.wordnet.ParsedSynset> getSenses()
Returns the possible senses of this lemma.

Returns:
Possible senses of this lemma.

getCorrectSenses

public int[] getCorrectSenses()
Returns the correct senses of this word.

Returns:
correctSenses

getPossibleSynonyms

public java.util.ArrayList<java.lang.String> getPossibleSynonyms()
Returns an ArrayList containing the possible synonyms of this lemma. Synonyms are retrieved from all the senses of this word.

Returns:
An ArrayList containing the possible synonyms of this lemma.

getPossibleHypernyms

public java.util.ArrayList<java.lang.String> getPossibleHypernyms()
Returns an ArrayList containing the possible hypernyms of this lemma. Hyperyms are retrieved from all the senses of this word.

Returns:
An ArrayList containing the possible hypernyms of this lemma.