pyeeg.features.SyntacticFeatureExtractor.opening_single_tree
- SyntacticFeatureExtractor.opening_single_tree(tree: None) List[int]
Get opening values for each leaf.
For each leaf, counts how many branches open (i.e. how many sibling branches with index 0 precede it along its path from the root) after collapsing unary productions. Words earlier in the sentence tend to have higher opening values. The result is reversed for
closing_single_tree().Based on parseMetrics.py.