nltk.Tree.treeposition_spanning_leaves

Tree.treeposition_spanning_leaves(start, end)[source]
Returns:The tree position of the lowest descendant of this tree that dominates self.leaves()[start:end].
Raises:ValueError – if end <= start