Modifier and Type | Field and Description |
---|---|
protected TreeNode |
TreeRepresentation.root
The root node of the tree
|
Modifier and Type | Field and Description |
---|---|
protected List<TreeNode> |
TreeRepresentation.orderedNodeSetByLabel
The complete set of tree nodes ordered alphabetically by label.
|
protected List<TreeNode> |
TreeRepresentation.orderedNodeSetByProduction
The complete set of tree nodes ordered alphabetically by production
string.
|
protected List<TreeNode> |
TreeRepresentation.orderedNodeSetByProductionIgnoringLeaves
The of non terminal tree nodes ordered alphabetically by production
string.
|
Modifier and Type | Method and Description |
---|---|
TreeNode |
TreeRepresentation.getRoot() |
Modifier and Type | Method and Description |
---|---|
List<TreeNode> |
TreeRepresentation.getAllNodes() |
List<TreeNode> |
TreeRepresentation.getLeaves()
Returns all the leaves, i.e.
|
List<TreeNode> |
TreeRepresentation.getNodesWithContentType(Class<? extends StructureElement> clazz)
Returns all the nodes whose content has type
clazz |
List<TreeNode> |
TreeRepresentation.getOrderedNodeSetByLabel() |
List<TreeNode> |
TreeRepresentation.getOrderedNodeSetByProduction() |
List<TreeNode> |
TreeRepresentation.getOrderedNodeSetByProductionIgnoringLeaves() |
List<TreeNode> |
TreeRepresentation.getPreLeafNodes(int generationHops)
Returns all the nodes that have at least a
generationHops -generation descendant being a leaf
(for instance using generationHops =1 will produce a list of all the fathers of the leaves,
generationHops =2 will produce a list of all the grandfathers of the leaves, etc) |
Constructor and Description |
---|
TreeRepresentation(TreeNode root)
Build a tree representation from a TreeNode
|
Modifier and Type | Method and Description |
---|---|
TreeNode |
TreeNode.getAncestor(int generation)
Returns the
generation generation ancestor of this node
(for instance 1-generation ancestor is the father, 2-generation ancestor
is the grandfather, etc) |
TreeNode |
TreeNode.getFather()
Get the father of the target node
|
TreeNode |
TreeNodePairs.getNx() |
TreeNode |
TreeNodePairs.getNz() |
TreeNode |
TreeNode.getRoot() |
Modifier and Type | Method and Description |
---|---|
List<TreeNode> |
TreeNode.getAllNodes()
Get recursively all Tree Nodes below the target node
|
ArrayList<TreeNode> |
TreeNode.getChildren()
Get the direct children of the target node
|
List<TreeNode> |
TreeNode.getDescendants(int generation)
Returns all the
generation generations descendants of this node
(for instance 1-generation descendants are the children, the 2-generations
descendants are the grandchildren, etc) |
List<TreeNode> |
TreeNode.getLeaves() |
Constructor and Description |
---|
TreeNode(int id,
StructureElement content,
TreeNode father) |
TreeNodePairs(TreeNode nx,
TreeNode nz) |
Modifier and Type | Method and Description |
---|---|
protected TreeNode |
TreeIO._parseCharniakSentence(String sentence,
TreeNode father,
Integer nodeCounter)
This recursive function allows to read the tree encoded in a string in
the parentheses form, such as (S(NP)(VP))
|
TreeNode |
TreeIO.parseCharniakSentence(String sentence)
This method allows to read a tree in the form (S(NP)(VP)) and returns the TreeNode
corresponding to the root of the tree
|
protected TreeNode |
TreeIO.parseNode(int nodeCounter,
String nodeStr,
TreeNode father) |
Modifier and Type | Method and Description |
---|---|
protected TreeNode |
TreeIO._parseCharniakSentence(String sentence,
TreeNode father,
Integer nodeCounter)
This recursive function allows to read the tree encoded in a string in
the parentheses form, such as (S(NP)(VP))
|
protected TreeNode |
TreeIO.parseNode(int nodeCounter,
String nodeStr,
TreeNode father) |
Modifier and Type | Method and Description |
---|---|
static float |
TreeKernelUtils.productionBasedDeltaFunction(TreeNode Nx,
TreeNode Nz,
int sigma,
float lambda,
DeltaMatrix deltaMatrix)
Delta Function for tree kernels operation at production level, like
SubTreeKernel and SubSetTreeKernel.
|
Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.