gov.llnl.ontology.wordnet.wsd
Class PersonalizedPageRankWSD

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

public class PersonalizedPageRankWSD
extends SlidingWindowDisambiguation

A WordSenseDisambiguation implementation for Personalized Page Rank Word Sense Disambiguation. This implementation is based on the following paper:

This class performs pagerank over each word in a sentence by creating a fake Synset that connects to it's possible target sense in the wordnet graph. Context words are also given a pseudo Synset. The algorithm then runs the standard PageRank algorithm over this extended graph centering the initial probabilities over the pseudo Synset to bias the system towards flowing information from those nodes in the graph. The target Synset with the highest page rank for each word will be selected as the correct sense.

This class is thread safe. It modifies the Synsets in the wordnet graph ones with a LINK tag during setup. Afterwords, no changes are made to the graph structure.

Author:
Keith Stevens
See Also:
GraphConnectivityDisambiguation

Field Summary
static String LINK
          The Synset relation name for links created in the page rank graph.
 
Constructor Summary
PersonalizedPageRankWSD()
           
 
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 wordnet)
          Initializes the WordSenseDisambiguation algorithm with the given OntologyReader.
 String toString()
          Returns "ppd", 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

LINK

public static final String LINK
The Synset relation name for links created in the page rank graph.

See Also:
Constant Field Values
Constructor Detail

PersonalizedPageRankWSD

public PersonalizedPageRankWSD()
Method Detail

setup

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


processContext

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. This should update focus with any word sense disambiguation Annotations discovered.

Specified by:
processContext in class SlidingWindowDisambiguation
Parameters:
focus - The Annotation to disambiguate.
prevWords - The N Annotation words before focus.
nextWords - The N Annotation words after focus.

toString

public String toString()
Returns "ppd", the acronyms for this WordSenseDisambiguation algorithm.

Overrides:
toString in class Object


Copyright © 2010-2011. All Rights Reserved.