constituency parsing
play

Constituency Parsing Data structures and algorithms for - PowerPoint PPT Presentation

Constituency Parsing Data structures and algorithms for Computational Linguistics III ar ltekin ccoltekin@sfs.uni-tuebingen.de University of Tbingen Seminar fr Sprachwissenschaft Winter Semester 20192020 Introduction CKY


  1. Constituency Parsing Data structures and algorithms for Computational Linguistics III Çağrı Çöltekin ccoltekin@sfs.uni-tuebingen.de University of Tübingen Seminar für Sprachwissenschaft Winter Semester 2019–2020

  2. Introduction CKY WS 19–20 SfS / University of Tübingen Ç. Çöltekin, sequence of terminal or non-terminal symbols parsing CF languages recap natural language syntax Context free grammars Summary Earley 1 / 29 • Context free grammars are suffjcient for expressing most phenomena in • Most of the parsing theory (and quite some of the practice) is build on • The context-free rules have the form A → α where A is a single non-terminal symbol and α is a (possibly empty)

  3. Introduction VP Derivation of sentence ‘she saw a duck’ S V N S NP Prn she V V saw NP Det a N duck Ç. Çöltekin, SfS / University of Tübingen WS 19–20 CKY 2 / 29 V N Earley Summary An example context-free grammar S V S N → NP VP → Aux NP VP ⇒ NP VP NP → Det N NP ⇒ Prn NP → Prn Prn ⇒ she NP → NP PP VP → V NP VP ⇒ V NP VP → V ⇒ saw VP → VP PP NP ⇒ Det N PP → Prp NP Det ⇒ a → duck ⇒ duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  4. Introduction Prn p WS 19–20 SfS / University of Tübingen Ç. Çöltekin, NP S A sequence with (labeled) brackets CKY A history of derivations: duck N her 3 / 29 NP NP Earley Summary Representations of a context-free parse tree A parse tree: saw S Prn V VP I • S ⇒ NP VP • NP ⇒ Prn • Prn ⇒ I • VP ⇒ V NP • V ⇒ saw • NP ⇒ Prn p N • Prn p ⇒ her • N ⇒ duck [ ]]] [ ][ [ [ ] NP [ Prn I ] VP [ V saw ] [ N duck ] Prn p her

  5. Introduction CKY Earley Summary Parsing as search Ç. Çöltekin, SfS / University of Tübingen WS 19–20 4 / 29 • Parsing can be seen as search constrained by the grammar and the input • Top down: start from S , fjnd the derivations that lead to the sentence • Bottom up: start from the sentence, fjnd series of derivations (in reverse) that leads to S • Search can be depth fjrst or breadth fjrst for both cases

  6. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  7. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  8. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  9. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  10. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  11. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  12. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  13. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  14. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  15. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  16. Introduction N saw a duck Backtrack! S CKY N duck V V V Ç. Çöltekin, SfS / University of Tübingen WS 19–20 she S N a Earley Summary Parsing as search: top down S NP Det Prn she 5 / 29 N Det NP saw V VP → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  17. Introduction VP WS 19–20 SfS / University of Tübingen Ç. Çöltekin, V V V N N CKY S S S 6 / 29 NP Prn Earley Summary Parsing as search: bottom up she saw a NP duck Det N V → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  18. Introduction VP WS 19–20 SfS / University of Tübingen Ç. Çöltekin, V V V N N CKY S S S 6 / 29 NP Prn Earley Summary Parsing as search: bottom up she saw a NP duck Det N V → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  19. Introduction VP WS 19–20 SfS / University of Tübingen Ç. Çöltekin, V V V N N CKY S S S 6 / 29 NP Prn Earley Summary Parsing as search: bottom up she saw a NP duck Det N V → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  20. Introduction VP WS 19–20 SfS / University of Tübingen Ç. Çöltekin, V V V N N CKY S S S 6 / 29 NP Prn Earley Summary Parsing as search: bottom up she saw a NP duck Det N V → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  21. Introduction VP WS 19–20 SfS / University of Tübingen Ç. Çöltekin, V V V N N CKY S S S 6 / 29 NP Prn Earley Summary Parsing as search: bottom up she saw a NP duck Det N V → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  22. Introduction VP WS 19–20 SfS / University of Tübingen Ç. Çöltekin, V V V N N CKY S S S 6 / 29 NP Prn Earley Summary Parsing as search: bottom up she saw a NP duck Det N V → NP VP → Aux NP VP NP → Det N NP → Prn NP → NP PP VP → V NP VP → V VP → VP PP PP → Prp NP → duck → park → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

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