AI Glossary / Graphs and symbolic AI / Advanced
Dependency grammar
Definition
Dependency grammar is an approach to describing sentence structure through relationships between words, typically linking a head word to its dependents. These relationships express grammatical roles such as subject, object, and modifier. In natural language processing, dependency parsing assigns such a structure to a sentence so that software can work with more than its word sequence alone.
What it means
The words in “Mina approved the revised proposal” have different roles. Mina is connected to approved as its subject, while proposal is connected as its object. Revised modifies proposal. A dependency analysis makes those relationships explicit.
This differs from a constituency representation, which organizes words into nested phrases. Both approaches describe syntax, and neither alone establishes that the statement is true. A grammatical analysis of an approval sentence does not verify that approval occurred.
Dependency grammar is a family of approaches, not one universally agreed annotation scheme. Universal Dependencies, used for the examples here, supplies a specific cross-linguistic set of conventions. Its head choices and labels should not be assumed to match every other framework.
How it works
A parser identifies syntactic words and predicts head-dependent links, often with relation labels. In a basic Universal Dependencies representation, the words form a tree: one word attaches to an artificial ROOT, and each other word has one head. Enhanced representations can add relations and form more general graphs.
The labels and structural choices follow an annotation scheme. Universal Dependencies generally favors content words as heads and attaches associated function words to them, with documented exceptions.
Parsing may use learned statistical or neural models. The grammar representation and the algorithm that predicts it are separate things. An incorrect parse can still satisfy formal tree constraints, so structural validity is not sufficient evidence of linguistic accuracy.
Three practical examples
- Request analysis: A support system can use dependency links to distinguish the requested action from the item involved. “Replace the damaged cable” connects replace with cable and damaged with cable. The system still needs context to identify the actual product.
- Feedback analysis: A review says, “The display is clear, but the instructions are confusing.” Grammatical relationships can help associate descriptions with the appropriate aspects. They do not by themselves resolve sarcasm or establish the customer's intended overall rating.
- Document extraction: A tool can locate candidate subject-verb-object relationships in reports. It must then consider passive constructions, negation, quotations, and uncertainty before treating those candidates as factual assertions. Parsing supports this work but does not complete it.
Think of it this way
Think of dependency links as labeled threads between words. The threads show which words belong together grammatically, even when they are not adjacent. They are an analysis of the sentence's structure, not a certificate that its message is accurate or that every ambiguity has been resolved.
Worked example
Use the invented sentence “Mina approved the revised proposal.” For simplicity, omit punctuation from this demonstration and number the five words: 1 Mina, 2 approved, 3 the, 4 revised, 5 proposal.
Under a basic Universal Dependencies analysis, approved is the root. Its artificial head is 0, with relation root. Mina has head 2 and relation nsubj, meaning nominal subject. Proposal has head 2 and relation obj. The has head 5 and relation det, while revised has head 5 and relation amod.
The resulting word-to-word links are approved to Mina, approved to proposal, proposal to the, and proposal to revised. Five word nodes have four internal links, plus the artificial ROOT attachment. Each nonroot word has one head, and there is no cycle.
Now change the sentence to “The revised proposal was approved by Mina.” Proposal becomes the passive subject of approved, commonly labeled nsubj:pass in this scheme. It remains the thing approved, even though its grammatical role changes. This shows why a system cannot always equate grammatical subject with the person performing an action.
Both sentences can describe the same event. Determining whether that event actually happened requires evidence beyond either parse.
Illustrative case study
Fictional Cedar Records develops a tool to extract approval statements from internal notes. Its initial rule assumes the grammatical subject is always the approver. That works for some active sentences but produces incorrect role assignments for passive ones.
The team reviews examples and adds explicit handling for passive constructions. It also checks sentences such as “Mina did not approve the proposal” and “The note claims Mina approved the proposal.” These expose additional requirements concerning negation and attribution.
The revised evaluation separates correct dependency analysis from correct event extraction. A parser can identify grammatical links while a later rule still draws the wrong conclusion. The case illustrates the need to evaluate the complete extraction task; it is not a report of measured performance at a real company.
Common misconceptions and mistakes
“The head is always the nearest word.” Dependency links can span intervening words.
“The subject always performs the action.” Passive sentences provide a counterexample.
“Every dependency representation is a tree.” Basic trees and enhanced graphs differ.
“A valid tree must be the correct parse.” A structurally valid analysis can attach words incorrectly.
“Parsing proves what happened.” Syntax does not establish factual truth or resolve every contextual meaning.
Business use
Use dependency analysis when grammatical relationships help a concrete task, such as extracting actions or linking descriptions to products. Specify the language, annotation scheme, and input types before evaluating results.
Test representative sentence patterns, including passives, coordination, fragments, and domain terminology. Inspect downstream errors rather than relying only on a parser's general benchmark score. Preserve the source sentence alongside extracted information so reviewers can check interpretation. When a relation matters operationally, evaluate that relation and its consequences directly.
People also ask
Is dependency grammar the same as dependency parsing?
No. The grammar describes a kind of syntactic representation; parsing produces an analysis for input text.
Does it work only for English?
No. Dependency approaches are used across languages, although linguistic conventions and model quality vary.
Must a dependency parser be rule-based?
No. Statistical and neural parsers can produce dependency structures.
Check your understanding
What is the head of revised in the worked example?
Answer: Proposal.
Why are there four internal links?
Answer: A tree connecting five word nodes has four edges.
Why is proposal not the approver in the passive sentence?
Answer: Grammatical subjecthood does not determine the semantic actor.
Related terms
- Semantic role labeling
- Relation extraction
- Natural language processing
- Dependency parsing
- syntactic head
- dependent
- constituency grammar
- Universal Dependencies
Learn next
Annotate a short active sentence and its passive counterpart. Compare grammatical subjects with semantic actors, then add negation and explain what additional interpretation an extraction system needs.
More in Graphs and symbolic AI
- Demographic parity - Demographic parity is a statistical fairness criterion requiring a model's predictions to be independent of a specified sensitive attribute.
- Demonic nondeterminism - Demonic nondeterminism is an interpretation of unspecified choice in which a required guarantee must withstand every permitted alternative, including...
- Dempster-Shafer theory - Dempster-Shafer theory, also called evidence theory or the theory of belief functions, is a mathematical framework for representing uncertain evidence.
- Dependency-directed backtracking - Dependency-directed backtracking is a search and reasoning approach that uses the dependencies behind a failure to decide which earlier assumptions or...
- Depth First Search - Depth First Search, usually abbreviated DFS, is a graph or tree traversal strategy that explores one branch as far as it can before returning to explore...
- Depth First Search on Edges - Depth First Search on Edges is a traversal that explores graph connections in depth-first order while tracking edges as the items to visit.
Sources
Universal Dependencies, Syntax: General Principles: https://universaldependencies.org/u/overview/syntax.html Universal Dependencies, nominal subject relation: https://universaldependencies.org/u/dep/nsubj.html Universal Dependencies, object relation: https://universaldependencies.org/u/dep/obj.html
Previous: Dependency-directed backtracking Next: Dependency network (graphical model)