|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.llnl.ontology.wordnet.wsd.GraphConnectivityDisambiguation
public abstract class GraphConnectivityDisambiguation
An abstract base class for any of the graph centrality Word Sense Disambiguation algorithms described in the following paper:
GraphConnectivityDisambiguation.AnnotationSynsets in the shortest path connecting
these target senses. The extracted graph structure for each focus word to be
disambiguated will passed to subclasses as an affinity Matrix that
records the known edges.
| Nested Class Summary | |
|---|---|
class |
GraphConnectivityDisambiguation.AnnotationSynset
A structure class that represents a Annotation that needs to be
disambiguated and it's possible target Synsets. |
| Constructor Summary | |
|---|---|
GraphConnectivityDisambiguation()
|
|
| 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(edu.stanford.nlp.pipeline.Annotation annot)
Returns all of the GraphConnectivityDisambiguation.AnnotationSynsets found given the word and part of
speech information, if present, in annot. |
protected abstract void |
processSentenceGraph(List<GraphConnectivityDisambiguation.AnnotationSynset> targetWords,
Set<Synset> synsets,
edu.ucla.sspace.basis.StringBasisMapping synsetBasis,
edu.ucla.sspace.matrix.Matrix adjacencyMatrix)
Disambiguates the Annotations in targetWords by using
the Set GraphConnectivityDisambiguation.AnnotationSynsets carved out of the ontology for a given
setnence. |
void |
setup(OntologyReader reader)
Initializes the WordSenseDisambiguation algorithm with the given
OntologyReader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphConnectivityDisambiguation()
| Method Detail |
|---|
protected abstract void processSentenceGraph(List<GraphConnectivityDisambiguation.AnnotationSynset> targetWords,
Set<Synset> synsets,
edu.ucla.sspace.basis.StringBasisMapping synsetBasis,
edu.ucla.sspace.matrix.Matrix adjacencyMatrix)
Annotations in targetWords by using
the Set GraphConnectivityDisambiguation.AnnotationSynsets carved out of the ontology for a given
setnence.
targetWords - A list of Annotations and their possible
senses that need to be disambiguated. The Annotation in each GraphConnectivityDisambiguation.AnnotationSynset should be updated
with the selected word sense.synsets - The set of GraphConnectivityDisambiguation.AnnotationSynsets to consider for any graph
traversal.synsetBasis - A mapping from GraphConnectivityDisambiguation.AnnotationSynset names to indices in a
graph.adjacencyMatrix - An adjaceny matrix detailing how GraphConnectivityDisambiguation.AnnotationSynsets
in synsets are connected.public void setup(OntologyReader reader)
WordSenseDisambiguation algorithm with the given
OntologyReader. Any other configuration values should be set via
the global system properties object.
setup in interface WordSenseDisambiguationpublic Sentence disambiguate(Sentence sentence)
List of s which have word sense
labels for each noun found in sentences.
disambiguate in interface WordSenseDisambiguation
public Sentence disambiguate(Sentence sentence,
Set<Integer> focusIndices)
List of Sentences which have word sense
labels for each annotation index stored in targetWords.
disambiguate in interface WordSenseDisambiguationprotected Synset[] getSynsets(edu.stanford.nlp.pipeline.Annotation annot)
GraphConnectivityDisambiguation.AnnotationSynsets 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||