Natural language processing
Syntax: Constituents, Dependencies, and Parsing
Understand constituency, dependency relations, grammatical features, parsing ambiguity, and the practical use of syntactic structure.
By the end you can
- Compare constituency and dependency representations of sentence structure
- Interpret heads, dependents, clauses, grammatical relations, and attachment ambiguity
- Use parsers without confusing predicted structure with certain truth
- Evaluate syntactic tools by phenomenon, language, domain, and downstream benefit
Word order carries relationships, not just sequence
In “The inspector questioned the engineer near the turbine,” the phrase “near the turbine” may describe the engineer, the questioning event, or the inspector. All readings use the same words.
Syntax represents possible structural relationships that constrain interpretation. A parser selects one analysis, often with uncertainty and domain-dependent errors. That selection is also where parsers fail most. In two independent error taxonomies, five years and two formalisms apart, prepositional attachment was the largest single error category in every parser examined. The ambiguity in the sentence above is not a teaching device. It is the measured top of the error list.
A sentence is more than a bag of words, but a parse is not an oracle.
Comparison
Two major views of sentence structure
Both can express useful organization while emphasizing different objects.
Constituency groups words into nested phrases such as noun and verb phrases. It represents phrase boundaries, is natural for hierarchical composition, gives trees with nonterminal categories, and is useful when the thing you need is a span. Its canonical English resource is the Penn Treebank, and the next section reads that corpus as a budget.
Dependency connects words through directed head–dependent relations. It centers lexical heads, keeps a compact relation structure, works well across flexible word order, and supports relation and feature extraction. Its cross-lingual resource is Universal Dependencies, whose spread across languages is examined further down.
Shallow syntax marks chunks or local patterns without a complete tree. It is a cheaper representation, useful for noun phrases, and avoids some global commitments — at the cost of missing long-range structure.
Constituency
Groups words into nested phrases such as noun and verb phrases.
- Represents phrase boundaries
- Natural for hierarchical composition
- Trees include nonterminal categories
- Useful for grammar and spans
Dependency
Connects words through directed head–dependent relations.
- Centers lexical heads
- Compact relation structure
- Useful across flexible word order
- Supports relation and feature extraction
Shallow syntax
Marks chunks or local patterns without a complete tree.
- Cheaper representation
- Useful for noun phrases
- Avoids some global commitments
- Misses long-range structure
Case
Skeletal and half are what the Penn Treebank actually bought
The constituency view has a canonical corpus behind it, and the corpus is worth reading as a budget. Marcus and colleagues described it in 1993 as “the Penn Treebank, a corpus consisting of over 4.5 million words of American English”. Then comes the qualifier: “during the first three-year phase of the Penn Treebank Project (1989–1992), this corpus has been annotated for part-of-speech (POS) information. In addition, over half of it has been annotated for skeletal syntactic structure.” Two words there carry the cost. Skeletal, and half.
The paper's own table puts figures on both. The first phase tagged 4,885,798 tokens for part of speech. It skeletally parsed 2,881,188 of them. In the Dow Jones/Wall Street Journal material — the portion almost every English constituency parser has trained on — 3,065,776 tokens were tagged against 1,061,166 parsed. The syntactic resource everyone actually trains on is about one million words, not four and a half million. The Linguistic Data Consortium's catalogue says where that million came from: “The Penn Treebank (PTB) project selected 2,499 stories from a three year Wall Street Journal (WSJ) collection of 98,732 stories for syntactic annotation.” Two thousand four hundred and ninety-nine stories out of 98,732.
The project also measured what its annotators could afford, and published the arithmetic. Correcting the automatic tagger's output took 20 minutes per 1,000 words, against 44 minutes for tagging from scratch. It also cut mean inter-annotator disagreement from 7.2% to 4.1%. Bracketing was slower and the trade sharper. Correcting Fidditch's full structure ran at about 375 words per hour after three weeks, 475 after six. The deliberately reduced skeletal representation — the one that does not force annotators to decide argument against adjunct — ran at roughly 750 to well over 1,000 words per hour. A parsed subcorpus of over one million words was proofread at about 4,000 words per annotator per hour.
The authors state what that speed buys and what it does not: “At this rate of productivity, annotators are able to find and correct gross errors in parsing, but do not have time to check, for example, whether they agree with all prepositional phrase attachments.” Read that against the section above. The construction this lesson calls the hardest in English is the one the gold standard's own proofreading pass did not have time to check.
Visual
A dependency analysis asks relational questions
The exact label inventory depends on the annotation framework. But the reasoning is broadly reusable, and it is a sequence of questions rather than a diagram.
Which word is the predicate or head that organizes the central event or phrase? Which are the core arguments — who acts, what is affected, which complements are selected? Which words are modifiers, adding time, location, manner, quantity or description? How are the function words and features expressed: case, auxiliaries, negation, coordination, determiners? And how do the clause connections attach, for subordinate, relative and coordinated clauses?
Every one of those questions has an answer the parser had to choose. The modifier question is the one it gets wrong most often.
Predicate or head
Which word organizes the central event or phrase?
Core arguments
Who acts, what is affected, and which complements are selected?
Modifiers
Which words add time, location, manner, quantity, or description?
Function words and features
How are case, auxiliaries, negation, coordination, and determiners expressed?
Clause connections
How do subordinate, relative, and coordinated clauses attach?
Example
Structures that routinely confuse parsers
A useful error set targets constructions rather than random sentences. The ordering below is an empirical result, not an author's hunch.
Somebody counted. On Wall Street Journal section 23, the self-trained reranked Charniak parser produced 846 prepositional-phrase attachment errors involving 1,455 nodes. That was the top category for every parser in the study. Kummerfeld and colleagues state it flatly: “As expected, PP attachment is the largest contributor to errors, across all parsers.” Five years and a change of formalism later, Qi and Manning's error breakdown on PTB-SD dependencies put the same category top again: 545 of 3,884 total errors for arc-swift, 569 of 4,100 for arc-eager, 571 of 4,106 for arc-standard.
The decision is not easy for people either. Three Penn Treebank annotators judged 300 randomly selected Wall Street Journal test events. Shown only the four head words, they were 88.2% correct. Shown the whole sentence, 93.2%. The maximum-entropy model tested on those same 300 events scored 78.0%, and 81.6% on the full 3,097-event test set. The five points the humans gained by being allowed to read the rest of the sentence is the part worth keeping. Ratnaparkhi and colleagues put it this way: “Secondly, the ME model does not use information contained in the rest of the sentence, although it is apparently useful in predicting the attachment, as evidenced by a 5% average gain in the treebankers' accuracy.”
- Prepositional attachment: “I saw the person with the telescope” leaves instrument and modifier readings open — and it is the largest error category in every parser both studies above examined.
- Coordination: “old men and women” can attach the adjective to one or both nouns.
- Garden paths: “The horse raced past the barn fell” initially invites the wrong structure.
- Long dependencies: relative clauses and questions separate related words across many tokens.
- Domain fragments: headlines, clinical notes, chat, and OCR may omit function words or punctuation.
- Code-switching: grammatical patterns and annotation conventions can cross language boundaries.
Analogy
A mobile sculpture held by joints
A hanging mobile links its pieces through joints, and the position of one branch constrains others. The dependency structure records which words organize and modify other words.
A mobile hangs in one settled arrangement. Syntactic analysis carries ambiguity, multiple valid annotation conventions, and meanings that are not recoverable from syntax alone. Where trained annotators were only 88.2% correct on one joint, the sculpture has more than one hanging position. It remains worth seeing those relations instead of treating the surface string as flat.
Syntax offers a relational scaffold, not a complete interpretation.
Key idea
Cross-lingual consistency does not mean identical resources
Frameworks such as Universal Dependencies aim for comparable annotation principles across languages; treebanks still differ in size, domain, quality, genre, and the linguistic decisions required by each language. A parser trained on news may underperform on conversation or historical text even within the same language; report the actual treebank and evaluation domain instead of citing the framework name as a quality guarantee.
The framework's own 2021 paper sets this out. It describes Universal Dependencies as “a framework for morphosyntactic annotation of human language, which to date has been used to create treebanks for more than 100 languages”, and argues that its theory “is a good basis for crosslinguistically consistent annotation of typologically diverse languages”. Read what that claims and what it does not. It claims one annotation scheme applied across many languages. It does not claim the treebanks are comparable in size, genre or quality.
The project's own releases supply the denominator. Release 2.18, dated 15 May 2026, contains 353 treebanks in 193 languages. They hold 2,337,062 sentences and 38,181,322 words, and 790 contributors are named as authors of the release. The repository's own description of the project is the aspiration stated plainly: “Universal Dependencies is a project that seeks to develop cross-linguistically consistent treebank annotation for many languages, with the goal of facilitating multilingual parser development, cross-lingual learning, and parsing research from a language typology perspective.” Thirty-eight million words spread over 353 treebanks is a small average per treebank. And an average is never how the mass is actually distributed.
The CoNLL 2018 shared task shows what that inequality does at the parser end. Under one annotation scheme, the best LAS any of the 26 systems achieved ranged from 94.86 on Polish-LFG down to 13.70 on Thai-PUD. Nine of the 82 treebanks were low-resource sets, with either a few dozen training sentences or none at all. The Uppsala team's system paper names the reason for the worst of them: “Segmentation of Thai was a particularly difficult case: Thai uses a unique script, with no spaces between words, and there was no training data available.” The sharpest case sits inside a single language. Best LAS was 83.11 on Japanese-GSD against 28.33 on Japanese-Modern. Same language, same annotation scheme, different genre, and a test-only treebank. Nearly fifty-five points.
Shared labels improve comparability; they do not erase resource and domain differences.
Steps
Use syntax as a tested feature or intermediate output
The parser introduces its own errors, so downstream value must be measured end to end. Five steps, in order.
First, name the structural need: subject–object roles, clause scope, modifier attachment, or phrase spans.
Second, establish a no-parse baseline. The attachment literature shows exactly what that discipline is worth. The standard benchmark extracted from the Penn Treebank Wall Street Journal material holds 20,801 training, 4,039 development and 3,097 test items. Collins and Brooks describe it in one line: “The data consisted of training and test files of 20801 and 3097 quintuples respectively.” Two baselines on that data involve no parsing at all. Always attach to the noun scores 59.0%. Using the attachment most often seen for that preposition scores 72.2%. Their backed-off model reaches 84.5%, dropping to 81.6% once training events occurring fewer than five times are discarded. A one-line rule gets 72.2%; the published model buys roughly twelve points on top of it. Whether twelve points justify a parser in your pipeline is a product question, and it is the same shape of question every time.
Third, select suitable language resources, matching annotation scheme, language, genre and license. The CoNLL 2018 spread above is what happens when that match is assumed rather than checked.
Fourth, inspect parser error propagation: review the downstream failures caused by incorrect heads, boundaries or labels. Attachment errors will dominate them.
Fifth, retain uncertainty or alternatives, rather than forcing brittle rules when several analyses are plausible.
1. Name the structural need
Examples include subject–object roles, clause scope, modifier attachment, or phrase spans.
2. Establish a no-parse baseline
Test lexical, subword, or contextual representations first.
3. Select suitable language resources
Match annotation scheme, language, genre, and license.
4. Inspect parser error propagation
Review downstream failures caused by incorrect heads, boundaries, or labels.
5. Retain uncertainty or alternatives
Avoid forcing brittle rules when several analyses are plausible.
One attachment score cannot answer every product question
Dependency parsing often reports labeled or unlabeled attachment. Constituency parsing reports span-based scores. Aggregate metrics can hide weak negation scope, coordination, long dependencies, or a target language.
It is worth seeing once what a headline LAS number is an average of. The CoNLL 2018 shared task on multilingual parsing from raw text to Universal Dependencies ranked 25 participating systems plus a UDPipe 1.2 baseline on 82 test treebanks in 57 languages. HIT-SCIR won, and its own abstract reports the result: “In the final evaluation, our system was ranked first according to LAS (75.84%) and outperformed the other systems by a large margin.” That 75.84 is macro-averaged over the 82 test sets. The UDPipe 1.2 baseline reached 65.80, which was rank 18. Only 17 of the 25 systems beat it.
So the number is not a score on a language. It is one figure standing in for 82 treebanks whose individual results, as the previous section showed, run from 94.86 to 13.70. Create phenomenon and domain slices. Then measure the downstream operation that motivated parsing. A small parse-score gain may have no value if the required relation remains unreliable.
Evaluate the construction and consequence you need, not only the tree average.
Compare syntactic and nonsyntactic relation extraction
Choose fifty sentences describing equipment failures. Build one baseline from local token windows and another that follows predicted dependency paths between entities. Score the dumb baseline before the clever one. On the classic attachment benchmark, simply doing whatever that preposition usually does already reached 72.2% before anyone parsed anything. Any structural machinery has to be measured against a number like that, not against zero.
Review cases involving negation, coordination, passive voice, and attachment. Attribute gains and failures to the parser, the relation classifier, or the annotation scheme.
A syntactic feature is useful only when its added structure improves the actual relation decision.
Key takeaways
- Syntax represents hierarchical phrases and relational dependencies that a flat word list cannot express, and its ambiguity is measurable: three Penn Treebank annotators judging 300 attachment events were 88.2% correct from the four head words and 93.2% with the whole sentence.
- Constituency, dependency, and shallow analyses emphasize different structures and should match the downstream need.
- Prepositional attachment is the largest single error category in parser output — 846 errors over 1,455 nodes for the self-trained reranked Charniak parser, and 545 of 3,884 errors for arc-swift on PTB-SD five years later.
- Cross-lingual annotation frameworks improve comparability without guaranteeing equal resources: under one scheme in CoNLL 2018 the best LAS ran from 94.86 on Polish-LFG to 13.70 on Thai-PUD, and from 83.11 to 28.33 inside Japanese alone.
- A parser is a predicted intermediate component whose errors propagate, and even the gold standard is thinner than it looks: 1,061,166 Wall Street Journal tokens parsed against 3,065,776 tagged, proofread at about 4,000 words per annotator per hour.
- Syntactic processing should be justified against simpler baselines: a preposition-majority rule scores 72.2% with no parse at all, and Collins and Brooks's model buys roughly twelve points over it.