nip.utils.malt_forest.forest.MaltTree#
- class nip.utils.malt_forest.forest.MaltTree[source]#
A tree in a MALT forest, which is a collection children of a root node.
Methods Summary
__getitem__
(index)Get a child node by index.
__init__
()__iter__
()Iterate over the child nodes.
__len__
()Get the number of child nodes.
add_child
(child)Add a child to this tree.
Methods
- __getitem__(index: int) MaltNode [source]#
Get a child node by index.
- Parameters:
index (int) – The index of the child node to get.
- Returns:
MaltNode – The child node at the given index.