Modifier and Type | Method and Description |
---|---|
static boolean |
TreeAddAdditionalInfoFromArray.addInfoToNodes(List<TreeNode> nodes,
List<Double> nodeInfo,
String fieldName)
A function for adding additional info to tree nodes.
|
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() |
Modifier and Type | Method and Description |
---|---|
void |
TreeNode.setChildren(ArrayList<TreeNode> children)
Set the direct children of the target node
|
Constructor and Description |
---|
TreeNode(int id,
StructureElement content,
TreeNode father) |
TreeNodePairs(TreeNode nx,
TreeNode nz) |
Modifier and Type | Method and Description |
---|---|
boolean |
TreeNodeFilter.isNodeOfInterest(TreeNode node)
Returns whether
node must be selected or not according to a
policy specified by this object |
boolean |
ContentBasedTreeNodeFilter.isNodeOfInterest(TreeNode node) |
Modifier and Type | Method and Description |
---|---|
boolean |
PruneNodeLowerThanThreshold.checkThresholdCondition(TreeNode node) |
boolean |
PruneNodeThresholdAndDistanceFromSpecificLabelledNode.isNodeToBePruned(TreeNode node) |
boolean |
PruneNodeLowerThanThreshold.isNodeToBePruned(TreeNode node) |
boolean |
PruneNodeLeafNumber.isNodeToBePruned(TreeNode node) |
boolean |
PruneNodeIfLeaf.isNodeToBePruned(TreeNode node) |
abstract boolean |
NodeToBePrunedCheckerAbstractClass.isNodeToBePruned(TreeNode node) |
static boolean |
PruneNodeThresholdAndDistanceFromSpecificLabelledNode.noCloseNodeWithSpecificLabelPrefix(TreeNode node,
String labelPrefix,
int distance,
TreeNode previousNode)
Check if there is a node at a distance no greater than
distance
(the distance between a node and its neighbors is 1) whose label prefix
starts with labelPrefix . |
void |
PruneNodeNumberOfChildren.pruneNodes(TreeNode node) |
abstract void |
NodePruner.pruneNodes(TreeNode node)
given a node, prunes any of the descendant nodes
|
Modifier and Type | Method and Description |
---|---|
float |
TreeNodeSimilarity.getSimilarity(TreeNode nodeA,
TreeNode nodeB)
Returns the similarity between
nodeA and nodeB |
float |
ContentBasedTreeNodeSimilarity.getSimilarity(TreeNode nodeA,
TreeNode nodeB) |
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 |
---|---|
List<TreeNode> |
TreeNodeSelectorAllLeaves.getNodeList(TreeNode node) |
List<TreeNode> |
TreeNodeSelectorAllDescendants.getNodeList(TreeNode node) |
List<TreeNode> |
TreeNodeSelectorAllChildren.getNodeList(TreeNode node) |
List<TreeNode> |
TreeNodeSelector.getNodeList(TreeNode node) |
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))
|
List<TreeNode> |
TreeNodeSelectorAllLeaves.getNodeList(TreeNode node) |
List<TreeNode> |
TreeNodeSelectorAllDescendants.getNodeList(TreeNode node) |
List<TreeNode> |
TreeNodeSelectorAllChildren.getNodeList(TreeNode node) |
List<TreeNode> |
TreeNodeSelector.getNodeList(TreeNode node) |
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 © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.