public class TreeFactory
extends java.lang.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<java.lang.String,MultiDimensionalMap<java.lang.Integer,java.lang.Integer,java.lang.String>> labels,
java.util.List<java.lang.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<java.lang.String,MultiDimensionalMap<java.lang.Integer,java.lang.Integer,java.lang.String>> labels)
Converts a treebank node to a tree
|
public static Tree buildTree(org.cleartk.syntax.constituent.type.TreebankNode node, Pair<java.lang.String,MultiDimensionalMap<java.lang.Integer,java.lang.Integer,java.lang.String>> labels, java.util.List<java.lang.String> possibleLabels) throws java.lang.Exception
node - the node to build the tree based onlabels - the labels to assign for each spanjava.lang.Exceptionpublic static Tree toTree(org.cleartk.syntax.constituent.type.TreebankNode node, Pair<java.lang.String,MultiDimensionalMap<java.lang.Integer,java.lang.Integer,java.lang.String>> labels) throws java.lang.Exception
node - the node to convertlabels - the labels to assign for each spanjava.lang.Exceptionpublic static Tree buildTree(org.cleartk.syntax.constituent.type.TreebankNode node) throws java.lang.Exception
node - the node to build the tree based onjava.lang.Exceptionpublic static Tree toTree(org.cleartk.syntax.constituent.type.TreebankNode node) throws java.lang.Exception
node - the node to convertjava.lang.Exception