public class DependencyParseUtils
extends java.lang.Object
Constructor and Description |
---|
DependencyParseUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
dumpDependencyRelations(JCas jcas,
Annotation annotation) |
static ConllDependencyNode |
findAnnotationHead(JCas jcas,
Annotation annotation)
Finds the head word within a given annotation span
|
static java.util.LinkedList<ConllDependencyNode> |
getPathBetweenNodes(ConllDependencyNode srcNode,
ConllDependencyNode tgtNode)
Finds the path between two dependency nodes
|
static java.util.List<java.util.LinkedList<ConllDependencyNode>> |
getPathsToCommonAncestor(ConllDependencyNode node1,
ConllDependencyNode node2)
Returns the paths from each node to the common ancestor between them
|
static java.util.LinkedList<ConllDependencyNode> |
getPathToSentenceHead(ConllDependencyNode node) |
static java.lang.String |
pathToString(java.util.LinkedList<ConllDependencyNode> path)
This will convert a path into a string lexicalized at the end points with arc labels and POS tags in between
|
public static java.util.List<java.util.LinkedList<ConllDependencyNode>> getPathsToCommonAncestor(ConllDependencyNode node1, ConllDependencyNode node2)
public static ConllDependencyNode findAnnotationHead(JCas jcas, Annotation annotation)
public static java.util.LinkedList<ConllDependencyNode> getPathToSentenceHead(ConllDependencyNode node)
public static java.util.LinkedList<ConllDependencyNode> getPathBetweenNodes(ConllDependencyNode srcNode, ConllDependencyNode tgtNode)
public static java.lang.String pathToString(java.util.LinkedList<ConllDependencyNode> path)
public static java.lang.String dumpDependencyRelations(JCas jcas, Annotation annotation)