SLIDE 1 Dependency Parsing
CMSC 723 / LING 723 / INST 725 MARINE CARPUAT
marine@cs.umd.edu
Slides credit: Joakim Nivre & Ryan McDonald
SLIDE 2 Agenda
- Formalizing dependency graphs
- Formalizing transition-based parsing
– Graph-based – Transition-based most material based on Kubler, McDonald & Nivre
SLIDE 3 Dependencies
- Typed: Label indicating relationship between words
- Untyped: Only which words depend
I saw a girl with a telescope
nsubj prep dobj det det pobj
I saw a girl with a telescope
SLIDE 4 Data-driven dependency parsing
Goal: learn a good predictor of dependency graphs Input: x Output: dependency graph/tree G Can be framed as a structured prediction task
- very large output space
- with interdependent labels
SLIDE 5
FOR ORMA MALIZ IZING ING DE DEPE PENDENC NDENCY Y REPR PRES ESENT ENTATIO TIONS NS
SLIDE 6
Dependency Graphs
SLIDE 7
Dependency Graph Notation
SLIDE 8
Properties of Dependency Trees
SLIDE 9
SLIDE 10 Non-Projectivity
- Most theoretical frameworks do not assume projectivity
- Non-projective structures are needed to represent
– Long-distance dependencies – Free word order
SLIDE 11
GR GRAP APH-BASED BASED PAR ARSING ING
SLIDE 12
Directed Spanning Trees
SLIDE 13 Maximum Spanning Tree
- Assume we have an arc factored model
i.e. weight of graph can be factored as sum or product of weights of its arcs
- Chu-Liu-Edmonds algorithm can find the
maximum spanning tree for us!
– Greedy recursive algorithm – Naïve implementation: O(n^3)
SLIDE 14
Chu-Liu-Edmonds illustrated
SLIDE 15
Chu-Liu-Edmonds illustrated
SLIDE 16
Chu-Liu-Edmonds illustrated
SLIDE 17
Chu-Liu-Edmonds illustrated
SLIDE 18
Chu-Liu-Edmonds illustrated
SLIDE 19
SLIDE 20
Arc weights as linear classifiers
SLIDE 21
Example of classifier features
SLIDE 22 How to score a graph G using features?
Arc-factored model assumption By definition of arc weights as linear classifiers
SLIDE 23
How can we learn the classifier from data?
SLIDE 24
TR TRAN ANSITIO ITION-BASED BASED DE DEPE PENDENC NDENCY Y PAR ARSE SER
SLIDE 25
Transition-based parsing
SLIDE 26
Transition-based parsing
SLIDE 27
Deterministic parsing with an oracle
SLIDE 28
Stack-based transition system
SLIDE 29
Transitions & Preconditions
SLIDE 30
Let’s try it out…
SLIDE 31
A few steps illustrated…
SLIDE 32
A few steps illustrated…