public class TreeParser
extends java.lang.Object
Constructor and Description |
---|
TreeParser() |
TreeParser(org.apache.uima.analysis_engine.AnalysisEngine parser,
org.apache.uima.analysis_engine.AnalysisEngine tokenizer,
org.apache.uima.util.CasPool pool) |
Modifier and Type | Method and Description |
---|---|
static org.apache.uima.analysis_engine.AnalysisEngine |
getParser() |
static org.apache.uima.analysis_engine.AnalysisEngine |
getTokenizer() |
java.util.List<org.cleartk.syntax.constituent.type.TreebankNode> |
getTreebankTrees(java.lang.String text)
Gets trees from text.
|
java.util.List<Tree> |
getTrees(java.lang.String text)
Gets trees from text.
|
java.util.List<Tree> |
getTrees(java.lang.String text,
SentencePreProcessor preProcessor)
Gets trees from text.
|
java.util.List<Tree> |
getTreesWithLabels(java.lang.String text,
java.util.List<java.lang.String> labels)
Gets trees from text.
|
java.util.List<Tree> |
getTreesWithLabels(java.lang.String text,
java.lang.String label,
java.util.List<java.lang.String> labels)
Gets trees from text.
|
public TreeParser(org.apache.uima.analysis_engine.AnalysisEngine parser, org.apache.uima.analysis_engine.AnalysisEngine tokenizer, org.apache.uima.util.CasPool pool)
public TreeParser() throws java.lang.Exception
java.lang.Exception
public java.util.List<Tree> getTrees(java.lang.String text, SentencePreProcessor preProcessor) throws java.lang.Exception
text
- the text to processpreProcessor
- the pre processor to use for pre processing sentencesjava.lang.Exception
public java.util.List<org.cleartk.syntax.constituent.type.TreebankNode> getTreebankTrees(java.lang.String text) throws java.lang.Exception
text
- the text to processjava.lang.Exception
public java.util.List<Tree> getTreesWithLabels(java.lang.String text, java.lang.String label, java.util.List<java.lang.String> labels) throws java.lang.Exception
text
- the text to processlabel
- the label for the whole sentencelabels
- the possible labels for the sentencejava.lang.Exception
public java.util.List<Tree> getTreesWithLabels(java.lang.String text, java.util.List<java.lang.String> labels) throws java.lang.Exception
text
- the text to processlabels
- java.lang.Exception
public java.util.List<Tree> getTrees(java.lang.String text) throws java.lang.Exception
text
- the text to processjava.lang.Exception
public static org.apache.uima.analysis_engine.AnalysisEngine getTokenizer() throws java.lang.Exception
java.lang.Exception
public static org.apache.uima.analysis_engine.AnalysisEngine getParser() throws java.lang.Exception
java.lang.Exception