decomp.syntax.dependency

Module for building/containing dependency trees from CoNLL

class decomp.syntax.dependency.CoNLLDependencyTreeCorpus(graphs_raw)

Class for building/containing dependency trees from CoNLL-U

graphs

trees constructed from annotated sentences

graphids

ids for trees constructed from annotated sentences

ngraphs

number of graphs in corpus

class decomp.syntax.dependency.DependencyGraphBuilder

A dependency graph builder

classmethod from_conll(conll, treeid='', spec='u')

Build DiGraph from a CoNLL representation

Parameters
  • conll (List[List[str]]) – conll representation

  • treeid (str) – a unique identifier for the tree

  • spec (str) – the specification to assume of the conll representation (“u” or “x”)

Return type

DiGraph