Académique Documents
Professionnel Documents
Culture Documents
Pawan Goyal
CSE, IIT Kharagpur
Dependency Parsing
1 / 38
Dependency Parsing
2 / 38
Dependency Parsing
Dependency Parsing
Input: Sentence x = w1 , . . . , wn
Output: Dependency graph G
Parsing Methods
Deterministic Parsing (MALT-Parser)
Maximum Spanning Tree based (MST-Parser)
Constraint Satisfaction
Dependency Parsing
3 / 38
Deterministic Parsing
Basic idea
Derive a single syntactic representation (dependency graph) through a
deterministic sequence of elementary parsing actions
Dependency Parsing
4 / 38
Deterministic Parsing
Basic idea
Derive a single syntactic representation (dependency graph) through a
deterministic sequence of elementary parsing actions
Configurations
A parser configuration is a triple c = (S, B, A), where
Dependency Parsing
4 / 38
Transition System
A transition system for dependency parsing is a quadruple S = (C, T, cs , Ct ),
where
C is a set of configurations,
T is a set of transitions, such that t : C C,
cs is an initialization function
Ct C is a set of terminal configurations.
Dependency Parsing
5 / 38
Transition System
A transition system for dependency parsing is a quadruple S = (C, T, cs , Ct ),
where
C is a set of configurations,
T is a set of transitions, such that t : C C,
cs is an initialization function
Ct C is a set of terminal configurations.
A transition sequence for a sentence x is a set of configurations
C0,m = (co , c1 , . . . , cm ) such that
co = cs (x), cm Ct , ci = t(ci1 ) for some t T
Dependency Parsing
5 / 38
Transition System
A transition system for dependency parsing is a quadruple S = (C, T, cs , Ct ),
where
C is a set of configurations,
T is a set of transitions, such that t : C C,
cs is an initialization function
Ct C is a set of terminal configurations.
A transition sequence for a sentence x is a set of configurations
C0,m = (co , c1 , . . . , cm ) such that
co = cs (x), cm Ct , ci = t(ci1 ) for some t T
Initialization: ([]S , [w1 , . . . , wn ]B , {})
Termination: (S, []B , A)
Pawan Goyal (IIT Kharagpur)
Dependency Parsing
5 / 38
Dependency Parsing
6 / 38
Example
Dependency Parsing
7 / 38
Example
Dependency Parsing
8 / 38
Example
Dependency Parsing
9 / 38
Example
Dependency Parsing
10 / 38
Example
Dependency Parsing
11 / 38
Example
Dependency Parsing
12 / 38
Example
Dependency Parsing
13 / 38
Example
Dependency Parsing
14 / 38
Example
Dependency Parsing
15 / 38
Example
Dependency Parsing
16 / 38
Example
Dependency Parsing
17 / 38
Classifier-Based Parsing
Data-driven deterministic parsing:
Deterministic parsing requires an oracle.
An oracle can be approximated by a classifier.
A classifier can be trained using treebank data.
Dependency Parsing
18 / 38
Classifier-Based Parsing
Data-driven deterministic parsing:
Deterministic parsing requires an oracle.
An oracle can be approximated by a classifier.
A classifier can be trained using treebank data.
Learning Problem
Approximate a function from configurations, represented by feature vectors
to transitions, given a training set of gold standard transition sequences.
Dependency Parsing
18 / 38
Classifier-Based Parsing
Data-driven deterministic parsing:
Deterministic parsing requires an oracle.
An oracle can be approximated by a classifier.
A classifier can be trained using treebank data.
Learning Problem
Approximate a function from configurations, represented by feature vectors
to transitions, given a training set of gold standard transition sequences.
Three issues
How to represent configurations by feature vectors?
How to derive training data from treebanks?
How to learn classifiers?
Pawan Goyal (IIT Kharagpur)
Dependency Parsing
18 / 38
Feature Models
A feature representation f (c) of a configuration c is a vector of simple features
fi (c).
Typical Features
Nodes:
I
I
I
Dependency Parsing
19 / 38
Feature Models
A feature representation f (c) of a configuration c is a vector of simple features
fi (c).
Typical Features
Nodes:
I
I
I
Attributes:
I
I
I
I
Dependency Parsing
19 / 38
Deterministic Parsing
To guide the parser, a linear classifier can be used:
Dependency Parsing
20 / 38
Training data
Dependency Parsing
21 / 38
Training data
Dependency Parsing
21 / 38
o(c, T) =
Left-Arc if top(Sc ) first(Bc ) in T
Right-Arc if top(Sc ) first(Bc ) in T
Reduce if w < top(Sc ) : w first(Bc ) in T
Shift otherwise
Dependency Parsing
22 / 38
Dependency Parsing
23 / 38
Basic Idea
Starting from all possible connections, find the maximum spanning tree.
Dependency Parsing
24 / 38
Dependency Parsing
25 / 38
Multi-Digraphs
A multi-digraph is a digraph where multiple arcs between vertices are
possible
Dependency Parsing
26 / 38
Dependency Parsing
27 / 38
Dependency Parsing
27 / 38
w(G0 ) =
wij k
(i,j,k)G0
Dependency Parsing
28 / 38
Dependency Parsing
29 / 38
wij k
G0 T(G) (i,j,k)G0
Dependency Parsing
29 / 38