Treebanks
A Treebank
is a corpus of dependency-annotated sentences in one or more files.
DependencyTrees.Treebank
— TypeTreebank
A corpus of sentences annotated as dependency trees on disk.
Iterating over a treebank reads sentences one at a time:
treebank = Treebank("data/news.conll")
for tree in treebank
# ...
end
tree = first(treebank)
# output
┌────────────── ROOT
│ ┌─► Economic
│ ┌─►└── news
└─►┌──┌──└───── had
│ │ ┌─► little
│ └─►┌──└── effect
│ ┌──└────► on
│ │ ┌─► financial
│ └────►└── markets
└──────────► .