natural language processing
play

Natural Language Processing Info 159/259 Lecture 17: Dependency - PowerPoint PPT Presentation

Natural Language Processing Info 159/259 Lecture 17: Dependency parsing (Oct 24, 2017) David Bamman, UC Berkeley Dependency syntax Syntactic structure = asymmetric, binary relations between words. Tesnier 1959; Nivre 2005 Trees A


  1. ☞ flight action arc stack iobj(book, me) LeftArc(label): assert relation between head at stack 1 (morning) and dependent at morning stack 2 (the) : remove stack 2 (the) the RightArc(label): assert relation between head at stack 2 (the) and dependent book at stack 1 (morning); remove stack 1 (morning) ∅ Shift: Remove word from front of input buffer (flight) and push it onto stack

  2. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 (morning) and dependent at morning stack 2 (the) : remove stack 2 (the) the RightArc(label): assert relation between head at stack 2 (the) and dependent book at stack 1 (morning); remove stack 1 (morning) ∅ Shift: Remove word from front of input buffer (flight) and push it onto stack

  3. action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at morning stack 2 (morning) : remove stack 2 (morning) the RightArc(label): assert relation between head at stack 2 (morning) and book dependent at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  4. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at morning stack 2 (morning) : remove stack 2 (morning) the RightArc(label): assert relation between head at stack 2 (morning) and book dependent at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  5. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (morning) : remove stack 2 (morning) the RightArc(label): assert relation between head at stack 2 (morning) and book dependent at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  6. action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (the) : remove stack 2 (the) the RightArc(label): assert relation between head at stack 2 (the) and dependent book at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  7. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (the) : remove stack 2 (the) the RightArc(label): assert relation between head at stack 2 (the) and dependent book at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  8. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (the) : remove stack 2 (the) det(flight, the) the RightArc(label): assert relation between head at stack 2 (the) and dependent book at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  9. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (the) : remove stack 2 (the) det(flight, the) RightArc(label): assert relation between head at stack 2 (the) and dependent book at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  10. action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (book) : remove stack 2 (book) det(flight, the) RightArc(label): assert relation between head at stack 2 (book) and book dependent at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  11. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (book) : remove stack 2 (book) det(flight, the) RightArc(label): assert relation between head at stack 2 (book) and book dependent at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  12. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation flight between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (book) : remove stack 2 (book) det(flight, the) RightArc(label): assert obj(book, flight) relation between head at stack 2 (book) and book dependent at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  13. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation between head at stack 1 nmod(flight, morning) (flight) and dependent at stack 2 (book) : remove stack 2 (book) det(flight, the) RightArc(label): assert obj(book, flight) relation between head at stack 2 (book) and book dependent at stack 1 (flight); remove stack 1 (flight) ∅ Shift: Remove word from front of input buffer and push it onto stack

  14. action arc stack iobj(book, me) LeftArc(label): assert relation between head at stack 1 nmod(flight, morning) (book) and dependent at stack 2 ( ∅ ) : remove stack 2 ( ∅ ) det(flight, the) RightArc(label): assert relation between head at obj(book, flight) stack 2 ( ∅ ) and dependent at book stack 1 (book); remove stack 1 (book) ∅ Shift: Remove word from front of input buffer and push it onto stack

  15. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation between head at stack 1 nmod(flight, morning) (book) and dependent at stack 2 ( ∅ ) : remove stack 2 ( ∅ ) det(flight, the) RightArc(label): assert relation between head at obj(book, flight) stack 2 ( ∅ ) and dependent at book stack 1 (book); remove stack 1 (book) ∅ Shift: Remove word from front of input buffer and push it onto stack

  16. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation between head at stack 1 nmod(flight, morning) (book) and dependent at stack 2 ( ∅ ) : remove stack 2 ( ∅ ) det(flight, the) RightArc(label): assert relation between head at obj(book, flight) stack 2 ( ∅ ) and dependent at book stack 1 (book); remove stack 1 root( ∅ , book) (book) ∅ Shift: Remove word from front of input buffer and push it onto stack

  17. ☞ action arc stack iobj(book, me) LeftArc(label): assert relation between head at stack 1 nmod(flight, morning) (book) and dependent at stack 2 ( ∅ ) : remove stack 2 ( ∅ ) det(flight, the) RightArc(label): assert relation between head at obj(book, flight) stack 2 ( ∅ ) and dependent at stack 1 (book); remove stack 1 root( ∅ , book) (book) ∅ Shift: Remove word from front of input buffer and push it onto stack

  18. ☞ This is our parse action arc stack iobj(book, me) LeftArc(label): assert relation between head at stack 1 nmod(flight, morning) (book) and dependent at stack 2 ( ∅ ) : remove stack 2 ( ∅ ) det(flight, the) RightArc(label): assert relation between head at obj(book, flight) stack 2 ( ∅ ) and dependent at stack 1 (book); remove stack 1 root( ∅ , book) (book) ∅ Shift: Remove word from front of input buffer and push it onto stack

  19. This is our parse arc iobj(book, me) nmod(flight, morning) det(flight, the) obj(book, flight) root( ∅ , book)

  20. Let’s go back to this earlier the morning flight configuration action arc stack LeftArc(label): assert relation between head at stack 1 (me) and dependent at stack 2 (book) : remove stack 2 (book) RightArc(label): assert me relation between head at stack 2 (book) and book dependent at stack 1 (me); remove stack 1 (me) ∅ Shift: Remove word from front of input buffer (the) and push it onto stack

  21. Output space 𝓩 = Shift LeftArc(nsubj) RightArc(nsubj) • This is a multi class classification problem: LeftArc(det) given the current configuration — i.e., the RightArc(det) elements in the stack, the words in the buffer, LeftArc(obj) and the arcs created so far, what’s the best RightArc(obj) transition? …

  22. stack me book buffer the morning flight arc

  23. Features are scoped over the stack, buffer, and arcs created so far stack me book buffer the morning flight arc

  24. Features are scoped over the stack, feature example buffer, and arcs created so far stack me book buffer the morning flight arc

  25. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack me book buffer the morning flight arc

  26. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me book buffer the morning flight arc

  27. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer the morning flight arc

  28. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer 1 = the 1 buffer the morning flight arc

  29. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer 1 = the 1 buffer 2 = morning 1 buffer the morning flight arc

  30. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer 1 = the 1 buffer 2 = morning 1 buffer buffer 1 = today 0 the morning flight arc

  31. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer 1 = the 1 buffer 2 = morning 1 buffer buffer 1 = today 0 the morning flight buffer 1 POS = RB 0 arc

  32. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer 1 = the 1 buffer 2 = morning 1 buffer buffer 1 = today 0 the morning flight buffer 1 POS = RB 0 stack 1 = me AND 1 stack 2 = book arc

  33. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer 1 = the 1 buffer 2 = morning 1 buffer buffer 1 = today 0 the morning flight buffer 1 POS = RB 0 stack 1 = me AND 1 stack 2 = book arc stack 1 = PRP AND 1 stack 2 = VB

  34. Features are scoped over the stack, feature example buffer, and arcs created so far stack 1 = me 1 stack 2 = book 1 stack me stack 1 POS = PRP 1 book buffer 1 = the 1 buffer 2 = morning 1 buffer buffer 1 = today 0 the morning flight buffer 1 POS = RB 0 stack 1 = me AND 1 stack 2 = book arc stack 1 = PRP AND 1 stack 2 = VB iobj(book,*) in arcs 0

  35. feature example β stack 1 = me 1 0.7 stack 2 = 1 1.3 book stack 1 POS = 1 6.4 PRP Use any multiclass classification buffer 1 = the 1 -1.3 model buffer 2 = • Logistic regression 1 -0.07 morning • SVM buffer 1 = • NB 0 0.52 today • Neural network buffer 1 POS = 0 -2.1 RB stack 1 = me 1 0 AND stack 2 = book stack 1 = PRP 1 -0.1 AND stack 2 = VB iobj(book,*) 0 3.2 in arcs

  36. Training We’re training to predict the parser action (Shift, RightArc, LeftArc) given the featurized configuration Configuration features Label <stack1 = me, 1>, <stack2 = book, 1>, <stack1 POS = PRP , Shift 1>, <bu ff er1 = the, 1>, <stack1 = me, 0>, <stack2 = book, 0>, <stack1 POS = PRP , RightArc(det) 0>, <bu ff er1 = the, 0>, <stack1 = me, 0>, <stack2 = book, 1>, <stack1 POS = PRP , RightArc(nsubj) 0>, <bu ff er1 = the, 0>,

  37. Training data Our training data comes from treebanks (native dependency syntax or converted to dependency trees).

  38. Oracle • An algorithm for converting a gold-standard dependency tree into a series of actions a transition- based parser should follow to yield the tree. Configuration Label features <stack1 = me, 1>, Shift → <stack2 = book, 1>, <stack1 = me, 0>, RightArc(det) <stack2 = book, 0>, <stack1 = me, 0>, RightArc(nsu <stack2 = book, 1>, bj)

  39. This is our parse arc iobj(book, me) nmod(flight, morning) det(flight, the) obj(book, flight) root( ∅ , book)

  40. book me the morning flight ∅ action gold tree stack iobj(book, me) nmod(flight, morning) det(flight, the) obj(book, flight) root( ∅ , book)

  41. book me the morning flight ∅ action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been generated. Remove stack 1 root( ∅ , book) Else shift: Remove word from front of input buffer and push it onto stack

  42. book me the morning flight action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  43. book me the morning flight action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  44. me the morning flight action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  45. root( ∅ , book) exists but book me the morning flight has dependents in gold tree! action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  46. me the morning flight action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  47. the morning flight action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists me in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  48. iobj(book, me) exists and me the morning flight has no dependents in gold tree action gold tree stack iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists me in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  49. the morning flight action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists me in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  50. the morning flight action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  51. morning flight action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  52. morning flight action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  53. flight action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . morning Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  54. flight action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . morning Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  55. action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . morning Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  56. action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . morning Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  57. nmod(flight,morning) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in nmod(flight, morning) gold tree. Remove stack 2 . morning Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  58. nmod(flight,morning) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . morning Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  59. nmod(flight,morning) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  60. action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  61. det(flight,the) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  62. det(flight,the) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists the in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  63. det(flight,the) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  64. action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  65. obj(book,flight) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  66. obj(book,flight) action gold tree stack ✅ iobj(book, me) flight Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs ✅ obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  67. obj(book,flight) action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs ✅ obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  68. action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs ✅ obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  69. root( ∅ , book) and book has no more dependents we haven’t seen action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs ✅ obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

  70. root( ∅ , book) and book has no more dependents we haven’t seen action gold tree stack ✅ iobj(book, me) Choose LeftArc(label) if label(stack 1, stack 2 ) exists in ✅ nmod(flight, morning) gold tree. Remove stack 2 . Else choose RightArc(label) ✅ det(flight, the) if label(stack 2, stack 1 ) exists in gold tree and all arcs ✅ obj(book, flight) label(stack 1 , *). have been book generated. Remove stack 1 ✅ root( ∅ , book) Else shift: Remove word ∅ from front of input buffer and push it onto stack

Recommend


More recommend