Dependency parsing: read grammatical links between words
Learn to read dependency trees and interpret UAS and LAS within their evaluation conditions.
Dependency parsing: read grammatical links between words
Dependency parsing predicts which word each other word connects to in a sentence and what grammatical relation links them. The result is usually a tree: words are nodes, and labeled arrows represent relations. To use a parser, first settle the tokenization and relation scheme; interpret evaluation scores with those choices in view.
Represent links between words
In the basic Universal Dependencies (UD) v2 representation, each word has one head in the sentence, and the sentence’s top head connects to an artificial root. Arrows point from heads to dependents, and labels describe the grammatical function. In “She eats apples,” for example, eats can be the root, She its nominal subject (nsubj), apples its object (obj), and the period punctuation (punct). This is an illustrative example, not a gold annotation from a particular treebank.
UD v2 defines 37 universal dependency relations. They distinguish core arguments of predicates, other dependents, and relations inside nominal phrases. Language-specific subtypes are also allowed, written after a colon (for example, nsubj:pass for a passive subject). “Universal” does not mean that every language must have an identical structure: UD aims for cross-lingual comparability while allowing important language-specific distinctions.
Constituency parsing organizes a sentence into a hierarchy of phrases; dependency parsing focuses on links between words. Which representation fits better depends on the downstream task and the corpus annotation scheme. In CoNLL-U, the HEAD field stores a word’s head ID and DEPREL stores the relation label. Enhanced dependencies can record additional links, so do not confuse them with the basic tree.
Fix the evaluation conditions before choosing a parser
**Set segmentation:** sentence boundaries and tokenization determine the nodes the parser predicts. Check whether the tool tokenizes raw text or expects pre-tokenized sentences.
**Match language and data:** examine how closely training languages, treebanks, and genres match your inputs. Do not assume a news-trained parser performs equally well on conversation or specialist documents.
**Match annotation schemes:** record whether the data use UD or another grammar, basic or enhanced trees, and how relation labels and subtypes are defined. Scores from different schemes are not directly comparable.
**Review samples of errors:** separate incorrect head links, correct heads with wrong labels, and upstream tokenization or POS errors that affect the parse.
UAS and LAS count different things
Unlabeled Attachment Score (UAS) is the share of tokens whose predicted head matches the reference. Labeled Attachment Score (LAS) requires both head and relation label to match. Evaluation settings can differ in how they handle roots or punctuation. Record the data split, tokenization, label mapping, and scoring options instead of comparing scores alone.
| Result | Check first |
|---|---|
| Both UAS and LAS are low | Tokenization, POS input, domain shift, and head prediction errors |
| UAS is reasonable but LAS is low | Relation guidelines, label mapping, and subtype confusions |
| Quality drops in one domain | Evaluate separately by genre, sentence length, and style |
| Scores differ across languages | Check data size, annotation policy, and test sample for each language |
Kondratyuk and Straka’s 2019 UDify study evaluated a multilingual model that predicted POS, morphological features, lemmas, and dependency trees for 124 UD treebanks across 75 languages. The authors reported benefits for low-resource languages in their multilingual experiments. Those findings belong to the study’s data and setup; they do not guarantee that a parser works well for every current language or domain.
Before deployment, prepare a test set with the same tokenization and relation guidelines as the target data. When possible, split by document so duplicates do not inflate scores. Review relation-level and sentence-type errors alongside overall UAS/LAS. A parser’s usefulness depends on whether it reliably recovers the relations needed for the intended task, not on one tree score alone.
References
[Universal Dependencies: Universal Dependency Relations](https://universaldependencies.org/u/dep/index.html) (UD v2)
[Universal Dependencies: Syntax](https://universaldependencies.org/u/overview/syntax.html)
[Universal Dependencies: CoNLL-U Format](https://universaldependencies.org/format.html) (HEAD, DEPREL, and DEPS fields)
Kondratyuk & Straka, [75 Languages, 1 Model: Parsing Universal Dependencies Universally](https://aclanthology.org/D19-1279/), EMNLP-IJCNLP 2019.