|
||||||||||
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.AnnotationSynset
s 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 Synset s. |
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 Sentence s 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.AnnotationSynset s 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.AnnotationSynset s 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.AnnotationSynset
s carved out of the ontology for a given
setnence.
targetWords
- A list of Annotation
s 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.AnnotationSynset
s 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.AnnotationSynset
s
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 WordSenseDisambiguation
public 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 Sentence
s which have word sense
labels for each annotation index stored in targetWords
.
disambiguate
in interface WordSenseDisambiguation
protected Synset[] getSynsets(edu.stanford.nlp.pipeline.Annotation annot)
GraphConnectivityDisambiguation.AnnotationSynset
s 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 |