gov.llnl.ontology.wordnet.wsd
Class FirstSenseDisambiguation

java.lang.Object
  extended by gov.llnl.ontology.wordnet.wsd.FirstSenseDisambiguation
All Implemented Interfaces:
WordSenseDisambiguation

public class FirstSenseDisambiguation
extends Object
implements WordSenseDisambiguation

Author:
Keith Stevens

Constructor Summary
FirstSenseDisambiguation()
           
 
Method Summary
 Sentence disambiguate(Sentence sentence)
          Returns a new List of s which have word sense labels for each noun found in sentences.
 Sentence disambiguate(Sentence sentence, Set<Integer> focusIndices)
          Returns a new List of Sentences which have word sense labels for each annotation index stored in targetWords.
protected  Synset[] getSynsets(OntologyReader reader, edu.stanford.nlp.pipeline.Annotation annot)
          Returns all of the Synsets found given the word and part of speech information, if present, in annot.
 void setup(OntologyReader reader)
          Initializes the WordSenseDisambiguation algorithm with the given OntologyReader.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirstSenseDisambiguation

public FirstSenseDisambiguation()
Method Detail

setup

public void setup(OntologyReader reader)
Initializes the WordSenseDisambiguation algorithm with the given OntologyReader. Any other configuration values should be set via the global system properties object.

Specified by:
setup in interface WordSenseDisambiguation

disambiguate

public Sentence disambiguate(Sentence sentence)
Returns a new List of s which have word sense labels for each noun found in sentences.

Specified by:
disambiguate in interface WordSenseDisambiguation

disambiguate

public Sentence disambiguate(Sentence sentence,
                             Set<Integer> focusIndices)
Returns a new List of Sentences which have word sense labels for each annotation index stored in targetWords.

Specified by:
disambiguate in interface WordSenseDisambiguation

toString

public String toString()
Overrides:
toString in class Object

getSynsets

protected Synset[] getSynsets(OntologyReader reader,
                              edu.stanford.nlp.pipeline.Annotation annot)
Returns all of the Synsets found given the word and part of speech information, if present, in annot. If the part of speech is available, but provides no synsets, all possible synsets are returned for the word, under the assumption that the tag may be incorrect.



Copyright © 2010-2011. All Rights Reserved.