Natural Language Understanding
Lecture 7: Introduction to Dependency Parsing
Adam Lopez Credits: Mirella Lapata, Frank Keller, and Mark Steedman 26 January 2018
School of Informatics University of Edinburgh alopez@inf.ed.ac.uk 1
Natural Language Understanding Lecture 7: Introduction to Dependency - - PowerPoint PPT Presentation
Natural Language Understanding Lecture 7: Introduction to Dependency Parsing Adam Lopez Credits: Mirella Lapata, Frank Keller, and Mark Steedman 26 January 2018 School of Informatics University of Edinburgh alopez@inf.ed.ac.uk 1 Dependency
Adam Lopez Credits: Mirella Lapata, Frank Keller, and Mark Steedman 26 January 2018
School of Informatics University of Edinburgh alopez@inf.ed.ac.uk 1
2
3
S
✟✟✟✟✟✟✟✟✟✟✟ ✟ ❍ ❍ ❍ ❍ ❍ ❍ ❍ ❍ ❍ ❍ ❍ ❍
NP
✟✟ ✟ ❍ ❍ ❍
JJ Economic NN news VP
✟✟✟✟ ✟ ❍ ❍ ❍ ❍ ❍
VBD had NP
✟✟✟✟✟✟ ✟ ❍ ❍ ❍ ❍ ❍ ❍ ❍
JJ little NN effect PP
✟✟✟ ✟ ❍ ❍ ❍ ❍
IN
NP
✟✟ ✟ ❍ ❍ ❍
JJ financial NN markets PU “.”
4
5
nmod nmod nmod
nmod pmod p
ROOT
subj
JJ NN VBD JJ NN IN JJ NNS PU Economic news had little effect on financial markets .
[From Joakim Nivre, Dependency Grammar and Dependency Parsing.] 6
7
nsubj ccomp nsubj ccomp det nsubj mark 8
nsubj ccomp nsubj ccomp det nsubj mark
9
10
11
12
13
14
15
root saw John Mary 10 9 9 30 30 20 3 11
16
17
root saw John Mary 40 9 30 31 wjs
18
19
20
21
21
21
k=0 exp(g(ak, ai))
a · tanh(Ua · aj + Wa · ai)
22
23
24
root nsubj punct dobj amod
Transition Stack Buffer A [ROOT] [He has good control .] ∅ SHIFT [ROOT He] [has good control .] SHIFT [ROOT He has] [good control .] LEFT-ARC(nsubj) [ROOT has] [good control .] A∪ nsubj(has,He) SHIFT [ROOT has good] [control .] SHIFT [ROOT has good control] [.] LEFT-ARC(amod) [ROOT has control] [.] A∪amod(control,good) RIGHT-ARC(dobj) [ROOT has] [.] A∪ dobj(has,control) ... ... ... ... RIGHT-ARC(root) [ROOT] [] A∪ root(ROOT,has) 25
26