nltk.MultiParentedTree.leaf_treeposition¶
-
MultiParentedTree.
leaf_treeposition
(index)¶ Returns: The tree position of the index
-th leaf in this tree. I.e., iftp=self.leaf_treeposition(i)
, thenself[tp]==self.leaves()[i]
.Raises: IndexError – If this tree contains fewer than index+1
leaves, or ifindex<0
.