org.apache.ctakes.relationextractor.ae.features
Class DependencyParseUtils

java.lang.Object
  extended by org.apache.ctakes.relationextractor.ae.features.DependencyParseUtils

public class DependencyParseUtils
extends java.lang.Object


Constructor Summary
DependencyParseUtils()
           
 
Method Summary
static java.lang.String dumpDependencyRelations(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation annotation)
           
static ConllDependencyNode findAnnotationHead(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyParseUtils

public DependencyParseUtils()
Method Detail

getPathsToCommonAncestor

public 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


findAnnotationHead

public static ConllDependencyNode findAnnotationHead(org.apache.uima.jcas.JCas jcas,
                                                     org.apache.uima.jcas.tcas.Annotation annotation)
Finds the head word within a given annotation span


getPathToSentenceHead

public static java.util.LinkedList<ConllDependencyNode> getPathToSentenceHead(ConllDependencyNode node)

getPathBetweenNodes

public static java.util.LinkedList<ConllDependencyNode> getPathBetweenNodes(ConllDependencyNode srcNode,
                                                                            ConllDependencyNode tgtNode)
Finds the path between two dependency nodes


pathToString

public 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


dumpDependencyRelations

public static java.lang.String dumpDependencyRelations(org.apache.uima.jcas.JCas jcas,
                                                       org.apache.uima.jcas.tcas.Annotation annotation)