dependency parsing
play

Dependency Parsing CMSC 723 / LING 723 / INST 725 M ARINE C ARPUAT - PowerPoint PPT Presentation

Dependency Parsing CMSC 723 / LING 723 / INST 725 M ARINE C ARPUAT marine@cs.umd.edu Slides credit: Joakim Nivre & Ryan McDonald T odays Agenda Formalizing dependency graphs Formalizing transition-based parsing most material


  1. Dependency Parsing CMSC 723 / LING 723 / INST 725 M ARINE C ARPUAT marine@cs.umd.edu Slides credit: Joakim Nivre & Ryan McDonald

  2. T oday’s Agenda • Formalizing dependency graphs • Formalizing transition-based parsing most material based on Kubler, McDonald & Nivre

  3. Dependencies Typed: Label indicating relationship between words ● prep pobj dobj nsubj det det I saw a girl with a telescope Untyped: Only which words depend ● I saw a girl with a telescope

  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

  5. INT NTUITIO TION: N: SHI HIFT-RED REDUCE UCE PAR ARSE SER + C + CLASS ASSIFIER IFIER

  6. Shift-Reduce ● Process words one-by-one left-to-right ● Two data structures ● Queue of unprocessed words ● Stack of partially processed words ● At each point choose one action ● shift: move one word from queue to stack ● reduce left: top word on stack is head of second word ● reduce right: second word on stack is head of top word ● Learn how to choose each action with a classifier

  7. Shift Reduce Example Stack Queue Stack Queue I saw a girl saw a girl shift I I saw a girl r left shift saw girl I saw a girl shift I a r left r right saw a girl saw I I girl shift saw a girl a I

  8. Classification for Shift-Reduce Given a state: ● Stack Queue saw a girl I Which action do we choose? ● ? r left ? r right ? shift saw a girl a girl saw girl saw a I I I Correct actions → correct tree ●

  9. FOR ORMA MALIZ IZING ING DE DEPE PENDENC NDENCY Y REPRE PRESENT SENTATIO TIONS NS

  10. Dependency Graphs

  11. Dependency Graph Notation

  12. Properties of Dependency Trees

  13. Non-Projectivity • Most theoretical frameworks do not assume projectivity • Non-projective structures are needed to represent – Long-distance dependencies – Free word order

  14. TR TRAN ANSITIO ITION-BASED BASED DE DEPE PENDENC NDENCY Y PAR ARSER SER

  15. Dependency relations: Formal representation

  16. Transition-based parsing

  17. Transition-based parsing

  18. Deterministic parsing with an oracle

  19. Stack-based transition system

  20. Transitions & Preconditions

  21. Let’s try it out…

  22. A few steps illustrated…

  23. A few steps illustrated…

  24. Answer: Full sequence of transitions 1. Shift: economy1 9. Shift: on6 2. Left-Arc: news2 -> economy1 10. Shift: financial7 3. Shift: news2 11. Left-Arc: markets8->financial7 4. Left-arc: had3->news2 12. Right-Arc: on6->markets8 5. Shift: had3 13. Right-Arc: on6->effect5 6. Shift: little4 14. Right-Arc: had3-> effect5 7. Left-arc: effect5->little4 15. Right-Arc: root->add3 8. Shift: effects5 16. Left-arc: period->root 17. Shift

  25. Theoretical Results • Time & Space Complexity - O(n), where n = input sentence length! - Assuming oracle & transition functions can be computed in constant time

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend