'Turn dependency graphs into NLTK trees.
:param int i: index of a node
:return: either a word (if the indexed node is a leaf) or a ``Tree``.'

def _tree(self, i):

    node = self.get_by_address(i)
    word = node[u'word']
    deps = sorted(chain.from_iterable(node[u'deps'].values()))
    if deps:
        return Tree(word, [self._tree(dep) for dep in deps])
    else:
        return word
