org.apache.ctakes.constituency.parser.util
Class TreeUtils

java.lang.Object
  extended by org.apache.ctakes.constituency.parser.util.TreeUtils

public class TreeUtils
extends Object


Constructor Summary
TreeUtils()
           
 
Method Summary
static TopTreebankNode buildAlignedTree(org.apache.uima.jcas.JCas jcas, opennlp.tools.parser.Parse parse, Sentence sent)
           
static boolean contains(SimpleTree node, SimpleTree frag)
           
static boolean contains(SimpleTree node, SimpleTree frag, boolean ignoreCase)
           
static boolean containsIgnoreCase(SimpleTree node, SimpleTree frag)
           
static opennlp.tools.parser.Parse ctakesTokensToOpennlpTokens(Sentence sent, org.apache.uima.jcas.cas.FSArray termArray)
           
static int getHighestIndexTerm(TreebankNode inTree)
           
static List<opennlp.tools.parser.Parse> getNodeList(opennlp.tools.parser.Parse tree)
           
static List<TreebankNode> getNodeList(TopTreebankNode tree)
           
static String getSentence(org.apache.uima.jcas.cas.FSArray termArray)
           
static org.apache.uima.jcas.cas.FSArray getTerminals(org.apache.uima.jcas.JCas jcas, Sentence sent)
           
static TopTreebankNode getTopNode(TreebankNode inTree)
           
static void replaceChild(TreebankNode parent, TreebankNode oldTree, TreebankNode newTree)
           
static String tree2str(TreebankNode pathTree)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeUtils

public TreeUtils()
Method Detail

getNodeList

public static List<TreebankNode> getNodeList(TopTreebankNode tree)

getNodeList

public static List<opennlp.tools.parser.Parse> getNodeList(opennlp.tools.parser.Parse tree)

tree2str

public static String tree2str(TreebankNode pathTree)

containsIgnoreCase

public static boolean containsIgnoreCase(SimpleTree node,
                                         SimpleTree frag)

contains

public static boolean contains(SimpleTree node,
                               SimpleTree frag)

contains

public static boolean contains(SimpleTree node,
                               SimpleTree frag,
                               boolean ignoreCase)

getHighestIndexTerm

public static int getHighestIndexTerm(TreebankNode inTree)

getTopNode

public static TopTreebankNode getTopNode(TreebankNode inTree)

buildAlignedTree

public static TopTreebankNode buildAlignedTree(org.apache.uima.jcas.JCas jcas,
                                               opennlp.tools.parser.Parse parse,
                                               Sentence sent)
                                        throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException

getTerminals

public static org.apache.uima.jcas.cas.FSArray getTerminals(org.apache.uima.jcas.JCas jcas,
                                                            Sentence sent)

getSentence

public static String getSentence(org.apache.uima.jcas.cas.FSArray termArray)

replaceChild

public static void replaceChild(TreebankNode parent,
                                TreebankNode oldTree,
                                TreebankNode newTree)

ctakesTokensToOpennlpTokens

public static opennlp.tools.parser.Parse ctakesTokensToOpennlpTokens(Sentence sent,
                                                                     org.apache.uima.jcas.cas.FSArray termArray)


Copyright © 2012-2013 The Apache Software Foundation. All Rights Reserved.