dsegmenter.bparseg.constituency_tree¶
Module providing class for handling constituency syntax trees.
-
dsegmenter.bparseg.constituency_tree.
OP
¶ str – special token used to substitute opening parentheses
-
dsegmenter.bparseg.constituency_tree.
OP_RE
¶ re – regexp for matching opening parentheses
-
dsegmenter.bparseg.constituency_tree.
CP
¶ str – special token used to substitute closing parentheses
-
dsegmenter.bparseg.constituency_tree.
CP_RE
¶ re – regexp for matching closing parentheses
-
class
dsegmenter.bparseg.constituency_tree.
CTree
[source]¶ Class for reading and modifying constituency trees.
This class subclasses
Tree
.This class extends its parent by one additional public class method
parse_lines()
-
class
dsegmenter.bparseg.constituency_tree.
Tree
(*args)[source]¶ Direct subclass of nltk.tree.ParentedTree providing hashing.
This class extends its parent by an additional method
__hash__()
, which uses the standardid()
method and allows the objects to be stored in hashes, and also overwrites the methodprnt_label()
, returning the label of the parent tree