Dependency Parsing
“The scientist studied the cells with the microscope.” Who had the microscope — the scientist, or the cells? A reader settles that instantly. Software needs the sentence's wiring diagram, and dependency parsing is how it gets one.
Words pointing at words
A dependency parse links each word directly to the word it modifies. Every word has exactly one head, the main verb sits at the root, and each link carries a grammatical label — subject, object, determiner, oblique modifier. The result is a labelled tree over the actual words, with none of the abstract phrase nodes that constituency parsing builds. Universal Dependencies standardises the label set across more than a hundred languages, which is what makes parsers comparable and multilingual pipelines possible.
How parsers produce one
Two families dominate:
- Transition-based parsers build the tree left to right through shift and arc actions, classifying one move at a time — linear time, and what spaCy ships.
- Graph-based parsers score every possible head-dependent pair and extract the highest-scoring spanning tree, trading speed for accuracy on long sentences.
What it buys you
The parse hands downstream code the grammatical relations directly: take the subject and object attached to a verb for relation extraction, find the noun an opinion-bearing adjective actually modifies, or check whether a negation scopes over the clause you care about. Accuracy is reported as UAS and LAS — attachment correct, and attachment plus label correct. Without a parse a system falls back on word proximity, and proximity gets the microscope wrong.
Dependency parsing recovers the grammatical structure of a sentence by linking each word to the single word it depends on and labelling that relation — subject, object, modifier — producing a tree rooted at the main verb. It gives downstream systems direct access to who did what to whom, which word proximity cannot supply, and underpins relation extraction, question answering and opinion mining. Universal Dependencies standardises the labels across languages.
At school you may have been asked to break a sentence apart: this is the doing word, this is who did it, this describes that noun. Tedious homework then, essential plumbing now.
Dependency parsing is software doing that job automatically. It draws arrows between the words to show which one belongs to which — who performed the action, what it was performed on, which description attaches to which thing. That wiring matters because the order of the words alone can mislead. In “the scientist studied the cells with the microscope”, only the structure settles whether the microscope belonged to the scientist or to the cells, and software needs that answer before it can act on the sentence.