gov.llnl.ontology.wordnet.wsd
Class PersonalizedPageRankWSD
java.lang.Object
gov.llnl.ontology.wordnet.wsd.SlidingWindowDisambiguation
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:
- E. Agirre and A Sorora.
"Personalizing PageRank for word sense disambiguation", in Proceedings
of the 12th Conference of the European Chapter of the Association for
Computational Linguisticis 2009.
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. |
LINK
public static final String LINK
- The
Synset relation name for links created in the page rank
graph.
- See Also:
- Constant Field Values
PersonalizedPageRankWSD
public PersonalizedPageRankWSD()
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.