Dependency Grammars: Julia Hockenmaier
Dependency Grammars: Julia Hockenmaier
http://cs.illinois.edu/class/cs498jh
Lecture 15:
Dependency
Grammars
Julia Hockenmaier
[email protected]
3324 Siebel Center
Office Hours: Wednesday, 12:15-1:15pm
Dependency grammar
Word-word dependencies are a component of many
(most/all?) grammar formalims.
Dependency grammar assumes that syntactic
structure consists only of dependencies.
Many variants. Modern DG began with Tesniere (1959).
What is a dependency?
Dependencies are (labeled) asymetrical binary
relations between two lexical items (words).
There is a syntactic relation between a head H and a
dependent D in a construction C if:
- the head H determines the syntactic category of the
construction C.
- the head H determines the semantic category of the
construction C; D gives semantic specification.
- the head H is obligatory. D may be optional.
- the head selects D and determines whether D is obligatory or
not.
- The form of D depends on the head H (agreement)
- The linear position of D depends on the head H.
CS498JH: Introduction to NLP
Context-free grammars
CFGs capture only nested dependencies
The dependency graph is a tree
The dependencies do not cross
Beyond CFGs:
Nonprojective dependencies
Dependencies: tree with crossing branches
Arise in the following constructions
- (Non-local) scrambling (free word order languages)
Die Pizza hat Klaus versprochen zu bringen
Dependency structures
Dependencies form a graph over the words in a
sentence.
This graph is connected (every word is a node)
and (typically) acyclic (no loops).
Single-head constraint:
Every node has at most one incoming edge.
This implies that the graph is a rooted tree.
Dependency Treebanks
Dependency treebanks exist for many languages:
Czech
Arabic
Turkish
Danish,
Portuguese
Estonian,
....
10
11
METU-Sabanci Turkish
Treebank
Very small -- about 5000 sentences
Turkish is an agglutinative language with free word
order:
12
[this and prev. example from Kemal Oflazers talk at Rochester, April 2007]
CS498JH: Introduction to NLP
13
14
Graph-based parsers:
learn a model over dependency graphs
Models:
a function (typically sum) of local attachment scores
15
Transition-based parsing
(Nivre et al.)
16
Transition-based parsing
Transition-based shift-reduce parsing processes
the sentence S= w0w1...wn from left to right.
Unlike CKY, it constructs a single tree.
N.B: this only works for projective dependency trees
Notation:
w0 is a special ROOT token.
VS = {w0, w1, ..., wn} is the vocabulary of the sentence
R is a set of dependency relations
17
Parser configurations (, , A)
Stack : a list of words that are partially processed
We push and pop words onto
|w : w is on top of the stack
The buffer is the remaining input words
We read words from and push them onto
w| : w is on top of the buffer
The set of arcs A defines the current tree
Initial configuration: ([w0], [w1, ...., wn], {})
Terminal configuration: (, [], A)
CS498JH: Introduction to NLP
18
Parser actions
19
CHAPTER 1. INTRODUCTION
The basic assumption underlying all varieties of dependency grammar is the idea that syntactic
structure essentially consists of words linked by binary, asymmetrical relations called dependency
relations (or dependencies for short). A dependency relation holds between a syntactically subordinate
word, called the dependent, and another word on which it depends, called the head.1 This is illustrated
in figure 1.1, which shows a dependency structure for a simple English sentence, where dependency
relations are represented by arrows pointing from the head to the dependent.2 Moreover, each arrow
20
CS498JH: Introduction to NLP
has a label, indicating the dependency type. For example, the noun news is a dependent of the verb
had with the dependency type subject (SBJ). By contrast, the noun effect is a dependent of type object
([root],
([root, Economic],
([root],
([root, news],
([root],
([root, had],
([root, had, little],
([root, had],
([root, had, effect],
([root, . . . on],
([root, . . . , financial],
([root, . . . on],
([root, had, effect],
([root, had],
([root],
([root, had],
([root],
([ ],
([root],
[Economic, . . . , .],
[news, . . . , .],
[news, . . . , .],
[had, . . . , .],
[had, . . . , .],
[little, . . . , .],
[effect, . . . , .],
[effect, . . . , .],
[on, . . . , .],
[financial, markets, .],
[markets, .],
[markets, .],
[on, .],
[effect, .],
[had, .],
[.],
[had],
[root],
[ ],
)
)
A1 = {(news, ATT, Economic)})
A1 )
A2 = A1 {(had, SBJ, news)})
A2 )
A2 )
A3 = A2 {(effect, ATT, little)})
A3 )
A3 )
A3 )
A4 = A3 {(markets, ATT, financial)})
A5 = A4 {(on, PC, markets)})
A6 = A5 {(effect, ATT, on)})
A7 = A6 {(had, OBJ, effect)})
A7 )
A8 = A7 {(had, PU, .)})
A9 = A8 {(root, PRED, had)})
A9 )
21
CS498JH: Introduction
to NLP
ure 3.2: Transition
sequence
for the English sentence in figure 1.1 (LAr = Left-Arc
r , RA
ht-Arcr , SH = Shift).