public abstract class DependencyUtility
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Logger |
logger |
Constructor and Description |
---|
DependencyUtility() |
Modifier and Type | Method and Description |
---|---|
static void |
addToIndexes(JCas jcas,
java.util.ArrayList<ConllDependencyNode> nodes) |
static boolean |
doesSubsume(Annotation annot1,
Annotation annot2)
Checks if one annotation subsumes another
|
static java.lang.String |
dumpDependencyGraph(Annotation annotation) |
static boolean |
equalCoverage(Annotation annot1,
Annotation annot2)
Equality expressions to aid in converting between DepNodes and CAS objects
|
static ConllDependencyNode |
getDependencyNode(JCas jCas,
Annotation annot)
Returns the first ConllDependencyNode in the CAS w/ same begin and end as the given Annotation
|
static java.util.List<ConllDependencyNode> |
getDependencyNodes(JCas jCas,
Annotation annot)
Returns the ConllDependencyNodes in the CAS w/ subsumed begins and ends
|
static java.util.List<ConllDependencyNode> |
getLeftSibProgeny(ConllDependencyNode refNode,
java.util.List<ConllDependencyNode> tree) |
static java.util.List<ConllDependencyNode> |
getLeftSibs(ConllDependencyNode refNode,
java.util.List<ConllDependencyNode> tree) |
static ConllDependencyNode |
getNominalHeadNode(JCas jCas,
Annotation annot)
Returns the first ConllDependencyNode in the CAS w/ same begin and end as the given Annotation
|
static ConllDependencyNode |
getNominalHeadNode(java.util.List<ConllDependencyNode> nodes)
Finds the head node out of a few ConllDependencyNodes.
|
static DependencyPath |
getPath(JCas jCas,
ConllDependencyNode node1,
ConllDependencyNode node2)
Given a CAS, find the path between two nodes in a sentence
|
static DependencyPath |
getPath(java.util.List<ConllDependencyNode> nodes,
ConllDependencyNode node1,
ConllDependencyNode node2)
Given a set of ConllDependencyNodes, find the path between two nodes
|
static DependencyPath |
getPathToTop(JCas jCas,
ConllDependencyNode node1) |
static java.util.List<ConllDependencyNode> |
getProgeny(ConllDependencyNode refNode,
java.util.List<ConllDependencyNode> tree) |
static java.util.List<ConllDependencyNode> |
getProgeny(java.util.List<ConllDependencyNode> refNodes,
java.util.List<ConllDependencyNode> tree) |
static java.util.List<ConllDependencyNode> |
getRightSibProgeny(ConllDependencyNode refNode,
java.util.List<ConllDependencyNode> tree) |
static java.util.List<ConllDependencyNode> |
getRightSibs(ConllDependencyNode refNode,
java.util.List<ConllDependencyNode> tree) |
static Sentence |
getSentence(JCas jCas,
Annotation annot)
Find the sentence in which an Annotation lives
|
public static void addToIndexes(JCas jcas, java.util.ArrayList<ConllDependencyNode> nodes)
public static boolean equalCoverage(Annotation annot1, Annotation annot2)
public static boolean doesSubsume(Annotation annot1, Annotation annot2)
public static Sentence getSentence(JCas jCas, Annotation annot)
public static ConllDependencyNode getDependencyNode(JCas jCas, Annotation annot)
public static java.util.List<ConllDependencyNode> getDependencyNodes(JCas jCas, Annotation annot)
public static ConllDependencyNode getNominalHeadNode(JCas jCas, Annotation annot)
public static ConllDependencyNode getNominalHeadNode(java.util.List<ConllDependencyNode> nodes)
public static DependencyPath getPath(java.util.List<ConllDependencyNode> nodes, ConllDependencyNode node1, ConllDependencyNode node2)
public static DependencyPath getPath(JCas jCas, ConllDependencyNode node1, ConllDependencyNode node2)
public static DependencyPath getPathToTop(JCas jCas, ConllDependencyNode node1)
public static java.util.List<ConllDependencyNode> getRightSibs(ConllDependencyNode refNode, java.util.List<ConllDependencyNode> tree)
public static java.util.List<ConllDependencyNode> getLeftSibs(ConllDependencyNode refNode, java.util.List<ConllDependencyNode> tree)
public static java.util.List<ConllDependencyNode> getProgeny(ConllDependencyNode refNode, java.util.List<ConllDependencyNode> tree)
public static java.util.List<ConllDependencyNode> getProgeny(java.util.List<ConllDependencyNode> refNodes, java.util.List<ConllDependencyNode> tree)
public static java.util.List<ConllDependencyNode> getRightSibProgeny(ConllDependencyNode refNode, java.util.List<ConllDependencyNode> tree)
public static java.util.List<ConllDependencyNode> getLeftSibProgeny(ConllDependencyNode refNode, java.util.List<ConllDependencyNode> tree)
public static java.lang.String dumpDependencyGraph(Annotation annotation)