nltk.parse.DependencyGraph.__init__¶
-
DependencyGraph.
__init__
(tree_str=None, cell_extractor=None, zero_based=False, cell_separator=None, top_relation_label=u'ROOT')[source]¶ Dependency graph.
We place a dummy TOP node with the index 0, since the root node is often assigned 0 as its head. This also means that the indexing of the nodes corresponds directly to the Malt-TAB format, which starts at 1.
If zero-based is True, then Malt-TAB-like input with node numbers starting at 0 and the root node assigned -1 (as produced by, e.g., zpar).
Parameters: cell_separator (str) – the cell separator. If not provided, cells are split by whitespace.
Parameters: top_relation_label (str) – the label by which the top relation is identified, for examlple, ROOT, null or TOP.