public class TreeParser extends 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() |
List<org.cleartk.syntax.constituent.type.TreebankNode> |
getTreebankTrees(String text)
Gets trees from text.
|
List<Tree> |
getTrees(String text)
Gets trees from text.
|
List<Tree> |
getTrees(String text,
SentencePreProcessor preProcessor)
Gets trees from text.
|
List<Tree> |
getTreesWithLabels(String text,
List<String> labels)
Gets trees from text.
|
List<Tree> |
getTreesWithLabels(String text,
String label,
List<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 List<Tree> getTrees(String text, SentencePreProcessor preProcessor) throws Exception
text
- the text to processpreProcessor
- the pre processor to use for pre processing sentencesException
public List<org.cleartk.syntax.constituent.type.TreebankNode> getTreebankTrees(String text) throws Exception
text
- the text to processException
public List<Tree> getTreesWithLabels(String text, String label, List<String> labels) throws Exception
text
- the text to processlabel
- the label for the whole sentencelabels
- the possible labels for the sentenceException
public List<Tree> getTreesWithLabels(String text, List<String> labels) throws Exception
text
- the text to processlabels
- Exception
public List<Tree> getTrees(String text) throws Exception
text
- the text to processException
public static org.apache.uima.analysis_engine.AnalysisEngine getTokenizer() throws Exception
Exception
Copyright © 2020. All rights reserved.