|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.llnl.ontology.util.AnnotationUtil
public class AnnotationUtil
A simple utility class for accessing the most frequent Annotations
applied to a Annotation.
| Constructor Summary | |
|---|---|
AnnotationUtil()
|
|
| Method Summary | |
|---|---|
static int |
dependencyParent(edu.stanford.nlp.pipeline.Annotation annot)
Returns the index of the governing mode in a dependency parse tree for annot. |
static String |
dependencyRelation(edu.stanford.nlp.pipeline.Annotation annot)
Returns the relation between annot and the governing mode in a
dependency parse tree for annot. |
static String |
pos(edu.stanford.nlp.pipeline.Annotation annot)
Returns the string form of the part of speech tag for annot. |
static void |
setDependencyParent(edu.stanford.nlp.pipeline.Annotation annot,
int index)
Sets the index of the governing mode in a dependency parse tree for annot. |
static void |
setDependencyRelation(edu.stanford.nlp.pipeline.Annotation annot,
String relation)
Sets the relation between annot and the governing mode in a
dependency parse tree for annot. |
static void |
setPos(edu.stanford.nlp.pipeline.Annotation annot,
String pos)
Sets the part of speech tag for annot. |
static void |
setSpan(edu.stanford.nlp.pipeline.Annotation annot,
int start,
int end)
Sets the index space for annot. |
static void |
setSpan(edu.stanford.nlp.pipeline.Annotation annot,
edu.stanford.nlp.util.IntPair span)
Sets the index space for annot. |
static void |
setWord(edu.stanford.nlp.pipeline.Annotation annot,
String word)
Sets the token for annot |
static void |
setWordSense(edu.stanford.nlp.pipeline.Annotation annot,
String sense)
Sets the word sense for annot. |
static edu.stanford.nlp.util.IntPair |
span(edu.stanford.nlp.pipeline.Annotation annot)
Returns the index span for annot |
static String |
word(edu.stanford.nlp.pipeline.Annotation annot)
Returns the token for annot. |
static String |
wordSense(edu.stanford.nlp.pipeline.Annotation annot)
Returns the word sense for annot. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationUtil()
| Method Detail |
|---|
public static String pos(edu.stanford.nlp.pipeline.Annotation annot)
annot.
public static void setPos(edu.stanford.nlp.pipeline.Annotation annot,
String pos)
annot.
public static String word(edu.stanford.nlp.pipeline.Annotation annot)
annot.
public static void setWord(edu.stanford.nlp.pipeline.Annotation annot,
String word)
annot
public static String wordSense(edu.stanford.nlp.pipeline.Annotation annot)
annot.
public static void setWordSense(edu.stanford.nlp.pipeline.Annotation annot,
String sense)
annot.
public static edu.stanford.nlp.util.IntPair span(edu.stanford.nlp.pipeline.Annotation annot)
annot
public static void setSpan(edu.stanford.nlp.pipeline.Annotation annot,
int start,
int end)
annot.
public static void setSpan(edu.stanford.nlp.pipeline.Annotation annot,
edu.stanford.nlp.util.IntPair span)
annot.
public static int dependencyParent(edu.stanford.nlp.pipeline.Annotation annot)
annot.
public static void setDependencyParent(edu.stanford.nlp.pipeline.Annotation annot,
int index)
annot.
public static String dependencyRelation(edu.stanford.nlp.pipeline.Annotation annot)
annot and the governing mode in a
dependency parse tree for annot.
public static void setDependencyRelation(edu.stanford.nlp.pipeline.Annotation annot,
String relation)
annot and the governing mode in a
dependency parse tree for annot.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||