public class TreeUtils extends Object
| Constructor and Description |
|---|
TreeUtils() |
| Modifier and Type | Method and Description |
|---|---|
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 |
containsDepFrag(SimpleTree node,
SimpleTree frag,
boolean ignoreCase) |
static boolean |
containsDepFragIgnoreCase(SimpleTree node,
SimpleTree frag) |
static boolean |
containsIgnoreCase(SimpleTree node,
SimpleTree frag) |
static int |
countDepFrags(SimpleTree node,
SimpleTree frag) |
static int |
countFrags(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) |
public static List<TreebankNode> getNodeList(TopTreebankNode tree)
public static List<opennlp.tools.parser.Parse> getNodeList(opennlp.tools.parser.Parse tree)
public static String tree2str(TreebankNode pathTree)
public static boolean containsIgnoreCase(SimpleTree node, SimpleTree frag)
public static boolean contains(SimpleTree node, SimpleTree frag)
public static boolean contains(SimpleTree node, SimpleTree frag, boolean ignoreCase)
public static int countFrags(SimpleTree node, SimpleTree frag)
public static int countDepFrags(SimpleTree node, SimpleTree frag)
public static boolean containsDepFragIgnoreCase(SimpleTree node, SimpleTree frag)
public static boolean containsDepFrag(SimpleTree node, SimpleTree frag, boolean ignoreCase)
public static int getHighestIndexTerm(TreebankNode inTree)
public static TopTreebankNode getTopNode(TreebankNode inTree)
public static TopTreebankNode buildAlignedTree(org.apache.uima.jcas.JCas jcas, opennlp.tools.parser.Parse parse, Sentence sent) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionpublic static org.apache.uima.jcas.cas.FSArray getTerminals(org.apache.uima.jcas.JCas jcas,
Sentence sent)
public static String getSentence(org.apache.uima.jcas.cas.FSArray termArray)
public static void replaceChild(TreebankNode parent, TreebankNode oldTree, TreebankNode newTree)
public static opennlp.tools.parser.Parse ctakesTokensToOpennlpTokens(Sentence sent, org.apache.uima.jcas.cas.FSArray termArray)
Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.