nltk/nltk — pull request #811 by rmalouf (2014-12-11 18:42:13+00:00)
Title: Triples

Two small additions to `DependencyGraph`:

* `zero_based` option to `__init__` and `load`, to allow input with zero-based node numbering. For some reason, [zpar](http://www.sutd.edu.sg/cmsresource/faculty/yuezhang/zpar.html) produces output that is almost in Malt-TAB format except that the first word is number 0 rather than 1.

* `triples()` method returns all the dependency triples in a `DependencyGraph`, where a triple has the form ((*head-word*, *head-ctag*), *relation*, (*dependent-word*, *dependent-ctag*)).