public class TreeFactory extends Object
Modifier and Type | Method and Description |
---|---|
static Tree |
buildTree(org.cleartk.syntax.constituent.type.TreebankNode node)
Builds a tree recursively
adding the children as necessary
|
static Tree |
buildTree(org.cleartk.syntax.constituent.type.TreebankNode node,
Pair<String,MultiDimensionalMap<Integer,Integer,String>> labels,
List<String> possibleLabels)
Builds a tree recursively
adding the children as necessary
|
static Tree |
toTree(org.cleartk.syntax.constituent.type.TreebankNode node)
Converts a treebank node to a tree
|
static Tree |
toTree(org.cleartk.syntax.constituent.type.TreebankNode node,
Pair<String,MultiDimensionalMap<Integer,Integer,String>> labels)
Converts a treebank node to a tree
|
public static Tree buildTree(org.cleartk.syntax.constituent.type.TreebankNode node, Pair<String,MultiDimensionalMap<Integer,Integer,String>> labels, List<String> possibleLabels) throws Exception
node
- the node to build the tree based onlabels
- the labels to assign for each spanException
public static Tree toTree(org.cleartk.syntax.constituent.type.TreebankNode node, Pair<String,MultiDimensionalMap<Integer,Integer,String>> labels) throws Exception
node
- the node to convertlabels
- the labels to assign for each spanException
public static Tree buildTree(org.cleartk.syntax.constituent.type.TreebankNode node) throws Exception
node
- the node to build the tree based onException
Copyright © 2020. All rights reserved.