Download presentation
Presentation is loading. Please wait.
1
Dependency parsing (係り受け解析)
Naoaki Okazaki okazaki at ecei.tohoku.ac.jp #nlptohoku Information Communication Theory (情報伝達学)
2
Information Communication Theory (情報伝達学)
Acknowledgements Portions of this material are from: Nivre and Kübler (2006). Dependency Parsing. Tutorial at Coling-ACL 2006. 長尾真編 (1996). 自然言語処理. 岩波講座ソフトウェア科学(15). Information Communication Theory (情報伝達学)
3
Information Communication Theory (情報伝達学)
Dependency (依存, 係り受け) Analyze syntactic structures of sentences using relationships between two words sbj(loves, John): “John” is a nominal subject of the verb “loves” obj(loves, Mary): “Mary” is a direct object of the verb “Mary” Fit to languages with scrambling (語順の入れ替え) root sbj obj labeled or unlabeled (ROOT) John loves Mary . type head dependent governor modifier Information Communication Theory (情報伝達学)
4
Non-projective dependency tree
With crossing edges John went a restaurant yesterday that served Sushi . Information Communication Theory (情報伝達学)
5
Japanese dependency grammar (黒橋・長尾, 1996)
Dependency analysis has been explored extensively in Japanese, which allows scrambling (語順の入れ替え) and case ellipsis (格要素の省略) Reversed direction of dependencies (traditionally) Mostly right direction only Exception: Most Japanese written sentences are non-projective 私は 行きたくない 明日は これが 僕は 正しいと 思う Information Communication Theory (情報伝達学)
6
Arc-standard transitions
Three actions Shift Pop a token from the queue Push the token into the stack Left-arc Pop a token from the stack Add an edge From: the top token in the queue To: the popped token Right-arc From: the popped token To: the top token in the queue Stack Queue [ a ... p ] [ q r … z ] [ a ... p q ] [ r … z ] [ a ... o p ] [ r … z ] [ a ... o ] [ r … z ] p [ a ... o p ] [ r … z ] [ a ... o ] [ p … z ] r Information Communication Theory (情報伝達学)
7
Information Communication Theory (情報伝達学)
0: Initial state Stack Queue [ ROOT ] [ Economic news had little effect on financial markets . ] Information Communication Theory (情報伝達学)
8
Information Communication Theory (情報伝達学)
1: Shift Stack Queue [ ROOT Economic ] [ news had little effect on financial markets . ] Information Communication Theory (情報伝達学)
9
Information Communication Theory (情報伝達学)
2: Left-arc (nmod) Stack Queue [ ROOT ] [ news had little effect on financial markets . ] nmod Economic Information Communication Theory (情報伝達学)
10
Information Communication Theory (情報伝達学)
3: Shift Stack Queue [ ROOT news ] [ had little effect on financial markets . ] nmod Economic Information Communication Theory (情報伝達学)
11
Information Communication Theory (情報伝達学)
4: Left-arc (sbj) Stack Queue [ ROOT ] [ had little effect on financial markets . ] sbj news nmod Economic Information Communication Theory (情報伝達学)
12
Information Communication Theory (情報伝達学)
5: Shift Stack Queue [ ROOT had ] [ little effect on financial markets . ] sbj news nmod Economic Information Communication Theory (情報伝達学)
13
Information Communication Theory (情報伝達学)
6: Shift Stack Queue [ ROOT had little ] [ effect on financial markets . ] sbj news nmod Economic Information Communication Theory (情報伝達学)
14
Information Communication Theory (情報伝達学)
7: Left-arc (nmod) Stack Queue [ ROOT had ] [ effect on financial markets . ] sbj nmod news little nmod Economic Information Communication Theory (情報伝達学)
15
Information Communication Theory (情報伝達学)
8: Shift Stack Queue [ ROOT had effect ] [ on financial markets . ] sbj nmod news little nmod Economic Information Communication Theory (情報伝達学)
16
Information Communication Theory (情報伝達学)
9: Shift Stack Queue [ ROOT had effect on ] [ financial markets . ] sbj nmod news little nmod Economic Information Communication Theory (情報伝達学)
17
Information Communication Theory (情報伝達学)
10: Shift Stack Queue [ ROOT had effect on financial ] [ markets . ] sbj nmod news little nmod Economic Information Communication Theory (情報伝達学)
18
Information Communication Theory (情報伝達学)
10: Left-arc (nmod) Stack Queue [ ROOT had effect on ] [ markets . ] sbj nmod nmod news little financial nmod Economic Information Communication Theory (情報伝達学)
19
Information Communication Theory (情報伝達学)
11: Right-arc (pmod) Stack Queue [ ROOT had effect ] [ on . ] sbj nmod pmod news little markets nmod nmod Economic financial Information Communication Theory (情報伝達学)
20
Information Communication Theory (情報伝達学)
12: Right-arc (nmod) Stack Queue [ ROOT had ] [ effect . ] sbj nmod nmod news little on nmod pmod Economic markets nmod financial Information Communication Theory (情報伝達学)
21
Information Communication Theory (情報伝達学)
13: Right-arc (obj) Stack Queue [ ROOT ] [ had . ] sbj obj news effect nmod nmod nmod Economic little on pmod markets nmod financial Information Communication Theory (情報伝達学)
22
Information Communication Theory (情報伝達学)
14: Shift Stack Queue [ ROOT had ] [ . ] sbj obj news effect nmod nmod nmod Economic little on pmod markets nmod financial Information Communication Theory (情報伝達学)
23
Information Communication Theory (情報伝達学)
15: Right-arc (p) Stack Queue [ ROOT ] [ had ] p sbj obj news . effect nmod nmod nmod Economic little on pmod markets nmod financial Information Communication Theory (情報伝達学)
24
Information Communication Theory (情報伝達学)
16: Right-arc (root) Stack Queue [ ] [ ROOT ] root had p sbj obj news . effect nmod nmod nmod Economic little on pmod markets nmod financial Information Communication Theory (情報伝達学)
25
Information Communication Theory (情報伝達学)
17: Shift Stack Queue [ ROOT ] [ ] root had p sbj obj news . effect nmod nmod nmod Economic little on pmod markets nmod financial Information Communication Theory (情報伝達学)
26
Shift-reduce conflicts
What if we chose “Right-arc (obj)” at step 8? We cannot attach the prepositional phrase on financial markets to effect (NP attachment) but only to had (VP attachment)! Stack Queue [ ROOT ] [ had on financial markets . ] sbj obj news effect nmod nmod Economic little Information Communication Theory (情報伝達学)
27
Information Communication Theory (情報伝達学)
Summary Two grammar formalisms and parsing algorithms Constituency and dependency The process of obtaining a tree from a sentence (P)CKY and shift-reduce algorithm Difficulty in parsing Attachment and coordination Time complexity and space requirement Information Communication Theory (情報伝達学)
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.