|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.ontology.wordnet.wsd.SlidingWindowDisambiguation
gov.llnl.ontology.wordnet.wsd.LeskWordSenseDisambiguation
public class LeskWordSenseDisambiguation
A WordSenseDisambiguation
implementation using the LeskSimilarity
measure.
Field Summary | |
---|---|
protected OntologyReader |
reader
The OntologyReader used to extract Synset s. |
protected SynsetSimilarity |
sim
The SynsetSimilarity function used to compare two Synset s. |
Constructor Summary | |
---|---|
LeskWordSenseDisambiguation()
|
Method Summary | |
---|---|
protected void |
processContext(edu.stanford.nlp.pipeline.Annotation focus,
edu.stanford.nlp.pipeline.Annotation result,
Queue<edu.stanford.nlp.pipeline.Annotation> prevWords,
Queue<edu.stanford.nlp.pipeline.Annotation> nextWords)
Processes the local context surrounded focus . |
void |
setup(OntologyReader reader)
Initializes the WordSenseDisambiguation algorithm with the given
OntologyReader . |
String |
toString()
Returns "ld", the acronyms for this WordSenseDisambiguation
algorithm. |
Methods inherited from class gov.llnl.ontology.wordnet.wsd.SlidingWindowDisambiguation |
---|
disambiguate, disambiguate, getSynsets |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected OntologyReader reader
OntologyReader
used to extract Synset
s.
protected SynsetSimilarity sim
SynsetSimilarity
function used to compare two Synset
s.
Constructor Detail |
---|
public LeskWordSenseDisambiguation()
Method Detail |
---|
public void setup(OntologyReader reader)
WordSenseDisambiguation
algorithm with the given
OntologyReader
. Any other configuration values should be set via
the global system properties object.
protected void processContext(edu.stanford.nlp.pipeline.Annotation focus, edu.stanford.nlp.pipeline.Annotation result, Queue<edu.stanford.nlp.pipeline.Annotation> prevWords, Queue<edu.stanford.nlp.pipeline.Annotation> nextWords)
focus
. This should update
focus
with any word sense disambiguation Annotation
s
discovered.
processContext
in class SlidingWindowDisambiguation
focus
- The Annotation
to disambiguate.prevWords
- The N Annotation
words before focus
.nextWords
- The N Annotation
words after focus
.public String toString()
WordSenseDisambiguation
algorithm.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |