Dependency parsing 1. Introduction
Dependency parsing
Dependency parsing identifies grammatical relationships between words in a sentence by representing how individual words are connected to one another. (Note that I use dependency parsing as a general term for both the automatic assignment of dependency relations to words (dependency tagging) and the analysis of the resulting dependency structure. This is because, in practice, dependency analysis involves both identifying dependency labels and examining the head–dependent relationships they represent.)
Unlike POS tagging, which assigns a grammatical category to each individual token, dependency parsing describes the grammatical relationships between tokens.
Consider the sentence:
Students analyze data.
A dependency parser may represent the sentence as:
| Token | UPOS | Dependency relation | Head |
|---|---|---|---|
| Students | NOUN |
nsubj |
analyze |
| analyze | VERB |
ROOT |
analyze |
| data | NOUN |
obj |
analyze |
Here:
Studentsis the subject (nsubj) ofanalyze;datais the object (obj) ofanalyze;analyzeis the root of the sentence.
Consider another example:
Researchers carefully analyze complex data.
A dependency parser may identify relationships such as:
| Token | UPOS | Dependency relation | Head |
|---|---|---|---|
| Researchers | NOUN |
nsubj |
analyze |
| carefully | ADV |
advmod |
analyze |
| analyze | VERB |
ROOT |
analyze |
| complex | ADJ |
amod |
data |
| data | NOUN |
obj |
analyze |
This representation tells us not only what grammatical category each word belongs to, but also how the words are related. For example:
Researchersfunctions as the subject ofanalyze;carefullymodifiesanalyze;datafunctions as the object ofanalyze;complexmodifiesdata.
Heads and dependents
A dependency structure consists of relationships between heads and dependents. Each dependent is connected to a head through a particular dependency relation.
For example:
complex sentence
The adjective complex modifies the noun sentence.
complex --amod--> sentence