statistical parsing
play

Statistical Parsing Parsing context-free languages ar ltekin - PowerPoint PPT Presentation

Statistical Parsing Parsing context-free languages ar ltekin University of Tbingen Seminar fr Sprachwissenschaft November 8, 2016 Recap Parsing basics CKY Earley Closing Ingredients of a (natural language) parser .


  1. Statistical Parsing Parsing context-free languages Çağrı Çöltekin University of Tübingen Seminar für Sprachwissenschaft November 8, 2016

  2. Recap Parsing basics CKY Earley Closing Ingredients of a (natural language) parser Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 1 / 27 • A grammar • An algorithm for parsing • A method for ambiguity resolution

  3. Recap Parsing basics November 8, 2016 SfS / University of Tübingen Ç. Çöltekin, we do not study or focus on any specifjc theory dependencies often use ideas/notions from both constituencies and Dependency grammars Constitunecy (or phrase structure) grammars, grammars infjnite) language Grammars Closing Earley CKY 2 / 27 • A formal grammar is a fjnite specifjcation of a (possibly • In this course, we are interested in two broad classes of • Various theories of ‘grammar’ (e.g., HPSG, LFG, CCG) • We will study these grammars in their relation to parsing,

  4. Recap saw VP V saw NP Marry John Marry NP subject object root Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 John S Parsing basics items (constituents or phrases) CKY Earley Closing Dependency vs. constituency on units formed by a group of lexical 3 / 27 become popular in CL binary head–dependent relations between words developed with constituency grammars • Constituency grammars are based • Dependency grammars model • Most of the theory of parsing is • Dependency grammars has recently

  5. Recap N is a set of non-terminal symbols November 8, 2016 SfS / University of Tübingen Ç. Çöltekin, with the rewrite rules R Parsing basics R is a set of rules of the form A phrase structure grammar is specifjed by, Phrase structure grammars Closing Earley CKY 4 / 27 Σ is a set of terminal symbols S ∈ N is a distinguished start symbol αAβ → γ for A ∈ N α, β, γ ∈ Σ ∪ N • The grammar accepts a sentence if it can be derived from S

  6. Recap Parsing basics November 8, 2016 SfS / University of Tübingen Ç. Çöltekin, cross-cut this hierarchy (shaded region) (dashed ellipse) are adequate for representing natural languages Recursively Enumerable Context Sensitive Context Free Regular Chomsky hierarchy and natural languages Closing Earley CKY 5 / 27 • Chomsky hierarchy of languages form a set-inclusion hierarchy • It is often claimed that mildly context sensitive grammars • Note, however, that the possible natural languages probably

  7. Recap Parsing basics November 8, 2016 SfS / University of Tübingen Ç. Çöltekin, grammars for the rest of this lecture symbols (possibly empty) sequence of terminal or non-terminal 6 / 27 parsing CF languages phenomena in natural language syntax Context free grammars Closing Earley CKY • Context free grammars are suffjcient for expressing most • Most of the parsing theory (and practice) is build on • The context-free rules have the form A → α where A is a single non-terminal symbol and α is a • We will mainly focus with parsing with context-free

  8. Recap VP Parsing basics 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 November 8, 2016 V 7 / 27 N S CKY S Earley Closing N An example grammar V 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 ⇒ saw VP → V NP ⇒ Det N VP → VP PP Det ⇒ a PP → Prp NP → duck ⇒ duck → park → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  9. Recap Parsing basics November 8, 2016 SfS / University of Tübingen Ç. Çöltekin, directions the sentence Parsing as search and the input Closing Earley CKY 8 / 27 • Parsing can be seen as search constrained by the grammar • Top down: start from S , fjnd the derivations that lead to • Bottom up: start from the sentence, fjnd series of derivations (in reverse) that leads to S • One can search depth fjrst or breadth fjrst in both

  10. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  11. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  12. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  13. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  14. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  15. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  16. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  17. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  18. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  19. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → duck → ducks → saw Prn → she | her Prp → in | with Det → a | the

  20. Recap N saw a duck Backtrack! S Parsing basics N duck N V V V Ç. Çöltekin, SfS / University of Tübingen November 8, 2016 she S N she CKY Earley Closing Parsing as search: top down S NP Det Prn a 9 / 27 Det V NP NP VP saw → 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 → parks → 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