Definitionintro
Dependency tree
Also called dependency structure, dependency graph of a sentence.
A rooted tree over the words of a sentence with a labeled arc from each head word to each of its dependents.
A dependency tree describes the syntax of a sentence by links between its words. Each word has exactly one head, the word that it modifies or completes, and the link from the head to the word carries a label, the grammatical relation, such as subject or determiner. An artificial root word 0 is the head of the main word of the sentence. The links form a tree rooted at 0, so every word reaches the root by following heads. Dependency trees are the output of dependency parsing, the unit of the dependency treebanks, and the structure that attachment scores compare.
Definition
A sentence is a sequence of words . We add an artificial root at the left edge. Let be a finite set of relation labels.
A dependency tree of the sentence is a set of labeled arcs with head , dependent and label , such that:
- Single head. Each word is the dependent of exactly one arc. No arc enters the root 0.
- Connected to the root. For each word , the chain reaches 0, where is the head of .
The two conditions say that the arcs form a spanning arborescence rooted at 0 of the complete directed graph on : there are exactly arcs, there is no cycle, and there is exactly one directed path from 0 to each word. Without the labels, the tree is its head function , and the code on these pages stores it as a list heads of length with heads[0] = -1 and heads[d] .
The words with are the dependents of . The subtree of is and all the words whose chain of heads passes through ; its set of positions is the yield of . A word dominates a word when is in the subtree of .
The children of the root. In the definition above the root may have more than one child. The Universal Dependencies treebanks require exactly one child of the root, the word with the relation root; many parsers allow several. Each page of this group says which convention it uses.
Counting. Over words there are dependency trees without labels: they are the spanning trees of the complete graph on the nodes , each directed away from 0, and Cayley's formula counts those. This gives 1, 3, 16, 125, 1296 for to 5. With exactly one child of the root there are trees (1, 2, 9, 64, 625): by the degree form of Cayley's formula, the trees on labeled nodes in which a fixed node has degree 1 number , and here . With labels each count is multiplied by , or by when the single root arc must carry the label root.
Examples and non-examples
A small tree. For the cat sat on the mat, in the style of Universal Dependencies:
| word | label | ||
|---|---|---|---|
| 1 | the | 2 | det |
| 2 | cat | 3 | nsubj |
| 3 | sat | 0 | root |
| 4 | on | 6 | case |
| 5 | the | 6 | det |
| 6 | mat | 3 | obl |
The head list is [-1, 2, 3, 0, 6, 6, 3]. The root has one child, sat. The subtree of mat is on the mat, positions 4 to 6. Other annotation schemes make the preposition on the head of mat. The definition allows either choice, and the treebank fixes it.
All trees over two words. With the head lists are , and , three trees as says. The first one gives the root two children, so only two of them satisfy the one-child rule, as says. The pair is not a tree: the two words head each other and neither reaches the root.
A tree with crossing arcs. In A hearing is scheduled on the issue today, with the head list [-1, 2, 3, 0, 3, 2, 7, 5, 4], the phrase on the issue modifies hearing and today modifies scheduled. The arc from hearing (2) to on (5) passes over is (3) and scheduled (4), which hearing does not dominate. The set of arcs is still a dependency tree. It is not a projective tree.
Non-examples.
- A word with two heads. Enhanced representations, for example the enhanced graphs of Universal Dependencies, add arcs so that a word can have several heads. The result is a directed graph, not a dependency tree.
- A set of arcs in which some word has no head. That is a forest, a partial analysis; the transition parsers of this group pass through such forests before they finish.
- A cycle such as , : each word has one head, but neither is connected to the root.
- A parse tree of a constituency grammar. It has phrase nodes above the words. Head rules turn it into a dependency tree by choosing a head child in each phrase.
Related definitions
- Projective dependency tree: a dependency tree in which no two arcs cross when they are drawn above the sentence.
- Arborescence: the graph form of the definition. The maximum spanning arborescence of a weighted complete graph is the best tree under arc scores.
- Attachment score: the fraction of words whose head (and label) in a predicted tree is the same as in the gold tree.
- Dependency parsing: the problem of finding the dependency tree of a sentence.
- Rooted tree: a dependency tree is a rooted tree on the positions whose nodes also have a linear order, the word order.
- Dependency model with valence: a probability model over dependency trees, used for learning them without a treebank.
References
- Sandra Kübler, Ryan McDonald and Joakim Nivre, Dependency Parsing, Synthesis Lectures on Human Language Technologies, Morgan and Claypool, 2009, Chapter 2, Dependency Parsing (dependency graphs, the artificial root, well-formed dependency trees and projectivity)
- Joakim Nivre, Algorithms for deterministic incremental dependency parsing, Computational Linguistics 34(4), 513-553, 2008, the definitions of dependency graphs and dependency trees at the start of the article
- Universal Dependencies, the annotation guidelines, the basic dependency tree with one root word and the list of universal relations
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 4W6YMS Edit this page History Report an error Markdown