Foundations
Dependency Parsing
What you’ll learn
- Find each word's head, and read a tree's arrows, labels and levels
- Find the root of a sentence, and mark it with one click in the Dependencies exercise
- Say what an arc's colour shows and what its label shows
- Say what a dependency parse can express that a Reed-Kellogg diagram cannot, and the reverse
One rule: every word has one head
Every word in a sentence depends on exactly one other word, called its head. The word that depends on it is a dependent. A head is the essential word of its phrase, the word that Spanish grammar calls the núcleo. The link between a head and a dependent is an arc, and each arc carries a relation label that names the kind of link.
There is one exception. The root, usually the main verb, has no head. Every other word attaches to the root, either directly or through other words.
Find the root first
It is usually the main verb. In will be teaching, the root is teaching; will and be are helping verbs that depend on it.For each remaining word, find its head
Use the test from Heads and modifiers: which word survives? In the tall pilot, you can delete the or tall, but without pilot they have nothing to describe. So pilot is their head.Name the relation
A subject isnsubj, a direct object isdobj, a determiner isdet, and an adjective that describes a noun isamod. The full list is below, with the eleven labels you will see most often.
“Snow fell.”
- nsubj Nominal subject
- ROOT Root of the sentence
The root is its own head
The root has no word above it, so the parser records it as its own head. In the picture, a short arrow labelled ROOT comes down into its box from empty space, not from another word.
This matters in the Dependencies exercise: the root takes one click, not two. For every other relation, you click the head and then the dependent. For the root, you click only the root word.
Levels, and why arcs can cross
Each row of the tree is a level. The root sits alone on level 0. Its dependents sit one row lower, on level 1, and their dependents on level 2. The lower a word sits, the further it is from the root.
From left to right, the boxes keep the words in sentence order. Read the boxes from left to right, ignoring their height, and you read the sentence.
“The pilot landed the plane safely.”
- det Determiner
- nsubj Nominal subject
- ROOT Root of the sentence
- dobj Direct object
- advmod Adverbial modifier
Comparing the two views
Because the words keep their order, two arcs sometimes cross. This can happen when a phrase is separated from its head by words that belong somewhere else. In the tree below, who knew my dad describes the man, not Cali, because a city cannot know anyone. So its arc starts at man and crosses the pobj arc between from and Cali. A crossing is not an error.
“A man came from Cali who knew my dad.”
- det Determiner
- nsubj Nominal subject
- ROOT Root of the sentence
- prep Prepositional modifier
- pobj Object of preposition
- relcl Relative clause modifier
- poss Possession modifier
- dobj Direct object
The six relation families
There are forty-six relation labels, too many to give each one its own colour. So the labels are grouped into six families, and the colour tells you the family, the label tells you the relation. Two arcs of the same colour are in the same family, but they can be different relations, so always read the label.
Every label above links to its full entry. The Dependency Relations group explains all forty-six labels, most of them with worked examples.
What each view cannot say
Each view has limits: things it cannot show. Knowing the limits helps you read both views. This section looks at three:
- A dependency tree cannot show a phrase.
- A Reed-Kellogg diagram cannot name a relationship.
- A dependency tree cannot give a word two heads.
A dependency tree cannot show a phrase. There is no arc meaning “these four words are one unit”. You can still find a phrase: a word plus everything below it in the tree is a phrase. But the picture never says so directly.
So a relation names only the head of a phrase, while a Reed-Kellogg role names the whole phrase. Take The passengers in the back row cheered. In the Dependencies exercise, nsubj marks only passengers. In the Roles exercise, the Subject is all six words: The passengers in the back row.
Labels that sound alike work the same way. In the same sentence, pobj marks only row, while the Roles label Object of preposition covers the back row.
A Reed-Kellogg diagram cannot name a relationship. A slant says “modifier” and nothing more; whether it is a determiner, an adjective or a possessive is left to the reader. The dependency parse distinguishes all three.
In practice, use the Reed-Kellogg diagram to see structure and the dependency tree to see relationships. Grammify draws both for every sentence, so you never have to choose.
“Nina left because the music stopped.”
- nsubj Nominal subject
- ROOT Root of the sentence
- mark Marker
- det Determiner
- advcl Adverbial clause modifier
Comparing the two views
advcl arc. The second clause is there, but only as the words that hang below stopped. The tree also tells you that because is a mark; the dashed line does not.A dependency tree cannot give a word two heads. Every word has exactly one incoming arc. That rule is what makes the picture a tree, and the Dependencies exercise asks for one relation and one head per word. In most sentences the rule causes no problem. In this one it does: She both knows and corresponds with the queen.
Here queen has two jobs. It is the direct object of knows and the object of the preposition with. The Reed-Kellogg diagram shows both jobs: the two verbs fork, and the line from knows and the line under with meet at queen.
The tree has to choose one head. The parser attaches queen to with as pobj, so knows has no object at all. The dobj relation is not hidden somewhere in the tree; it is missing.
That is why the two exercises answer differently. The Roles exercise accepts the queen as both Direct object and Object of preposition. The Dependencies exercise asks for one arc, pobj, because that is all the tree contains. Try both exercises on this sentence in the Practice Lab.
“She both knows and corresponds with the queen.”
- nsubj Nominal subject
- preconj Pre-correlative conjunction
- ROOT Root of the sentence
- cc Coordinating conjunction
- conj Conjunct
- prep Prepositional modifier
- det Determiner
- pobj Object of preposition
Comparing the two views
preconj and cc, where the diagram writes both words on one dashed line.Quick check
- Look at The young farmer sold three goats. Which word is the head of young, and on which level of the tree does young sit?
Answer
Its head is farmer: young describes the farmer, and without farmer it has nothing to describe. The relation isamod. The root, sold, is on level 0, and its dependents farmer and goats are on level 1. So young, like The, sits on level 2, one row below farmer. - Which word is the root of this sentence, and how many clicks does the root take in the Dependencies exercise? Our neighbours have been painting the garage.
Answer
The root is painting, the main verb. The helping verbs have and been depend on it asaux, so neither can be the root. The root takes one click, because it has no head: you click only the root word. - Two arcs in a tree have the same colour. One is labelled
detand the otheraux. Are they the same relation?Answer
No. The colour shows only the family:detandauxboth belong to the Function word family. The label names the relation:detis a determiner (a, the), andauxis an auxiliary, a helping verb such as has or will. - Look at The new manager smiled. Which word does the Dependencies exercise mark as
nsubj, and which words does the Roles exercise box as the Subject? Why are they different?Answer
nsubjmarks only manager, the head of the subject. The Roles exercise boxes The new manager, the whole phrase. A dependency tree links single words and never shows a phrase. The Roles exercise, like a Reed-Kellogg diagram, works with whole phrases.
Key terms
- Head
- The word another word depends on. Every word has exactly one, except the root. In Birds sing. the head of birds is sing. In the tired birds the head of both the and tired is birds.
See: Grammar Basics
- Dependent
- The word doing the depending — the arrow points at it. Birds sing. — birds is the dependent of sing. Birds sing loudly. — loudly is a second dependent of the same verb.
- Arc
- One head-to-dependent link, carrying a relation label. The Dependencies exercise calls arcs “Edges” (its count includes the
ROOTarrow) and asks for each one’s relation, head and dependent. Birds sing. has one arc,nsubj, from sing to birds. Birds sing loudly. has two; the second is labelledadvmod. - Root
- The one word that depends on no other word; the parser records it as its own head. Usually the main verb. Birds sing. — the root is sing. The kettle had been whistling. — the root is whistling, not either auxiliary.
- Level
- A word’s distance from the root, which sets its row in the tree. The levels come from the complete parse, so in the exercise the tree does not move as you answer. Birds sing. — sing is level 0, birds level 1. The tired birds slept. — the and tired sit at level 2, one row below birds.
- Crossing arcs
- Two arcs that cross in the tree. The words keep their sentence order, so an arc can cross another when a phrase is separated from its head by words that belong somewhere else. It is rare, and it is not an error. A man came from Cali who knew my dad. — the arc from man to knew crosses the arc between from and Cali. A text came from Diego that said sorry. — the arc from text to said crosses the arc between from and Diego.
Practice on a real sentence
ROOT takes a single click. The sentence has two prepositional phrases, so prep and pobj each occur twice. Before you link in, decide what in the corner describes: does it tell you which chair, or where she sat?Loading the practice sentence…