jaclearn.nlp.tree.ptb#
PTB-formed constituency trees.
Classes
Functions
|
Class PTBNode
- class PTBNode[source]#
Bases:
Node
- __new__(**kwargs)#
- append_child(node)#
- attach(father, sibling_ind=-1)#
Attach to a new father.
- clone()#
- detach()#
Detach from the father.
- insert_child(pos, node)#
- remove_child(node)#
- property breadth#
Breadth is defined as the maximum number of children of nodes in the tree.
- property depth#
Depth is defined as the number of nodes on the maximum distance with the root of nodes + 1. (Thus a single nodes will have depth 1.)
- property is_leaf#
- property leftmost_index#
- property lson#
- property nr_children#
- property nr_leaves#
- property rightmost_index#
- property rson#
- property size#
Functions