Dependency Grammars 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
Where were we? Constituency overview WS 19–20 SfS / University of Tübingen Ç. Çöltekin, – Minimization – Closure properties of regular languages – DFA, NFA, determinization expressions 1 / 27 – Learnability – Expressivity and computational complexity – Chomsky hierarchy of language classes (second part of the course) So far … Closing remarks Dependency grammars • Preliminaries: (formal) languages, grammars and automata • Finite state automata, regular languages, regular grammars and regular • Finite state transducers and their applications in CL • Constituency parsing (CKY, Earley)
Where were we? Constituency overview Dependency grammars Closing remarks Next … – Transition based dependency parsing (with a short introduction to classifjcation) – Graph based dependency parsing Ç. Çöltekin, SfS / University of Tübingen WS 19–20 2 / 27 • Dependency grammars, and dependency treebanks • Dependency parsing
Where were we? VP WS 19–20 SfS / University of Tübingen Ç. Çöltekin, research recognition and machine translation extraction , …) (hence, also useful for applications like question answering , information sentences John NP saw Constituency overview V Mary NP Dependency grammars Closing remarks Why do we need syntactic parsing? S NP John VP V saw NP Mary S 3 / 27 • Syntactic analysis is an intermediate step in (semantic) interpretation of • It is essential for understanding and generating natural language sentences • (Statistical) parsers are also used as language models for applications like speech • It can be used for grammar checking , and can be a useful tool for linguistic
Where were we? Constituency overview Dependency grammars Closing remarks Ingredients of a parser Ç. Çöltekin, SfS / University of Tübingen WS 19–20 4 / 27 • A grammar • An algorithm for parsing • A method for ambiguity resolution
Where were we? Constituency overview Dependency grammars Closing remarks Phrase structure (or constituency) grammars The main idea is that a span of words form a natural unit, called a constituent or phrase . science) common Ç. Çöltekin, SfS / University of Tübingen WS 19–20 5 / 27 • Constituency grammars are common in modern linguistics (also in computer • Most are based on a context-free ‘backbone’, extensions or restricted forms are
Where were we? NP VP VP Constituency overview saw NP Mary Derivations S John VP NP John V NP John saw NP John saw Mary or, S Ç. Çöltekin, SfS / University of Tübingen WS 19–20 John V S VP Dependency grammars Closing remarks An example: constituency grammar in action Grammar S NP VP Parse tree 6 / 27 V NP NP John | Mary V saw → → → → ⇒ ⇒ ⇒ ⇒ ⇒ ∗ ⇒ John saw Mary
Where were we? NP VP VP Constituency overview saw NP Mary Derivations S John VP NP John V NP John saw NP John saw Mary or, S Ç. Çöltekin, SfS / University of Tübingen WS 19–20 John V S VP Dependency grammars Closing remarks An example: constituency grammar in action Grammar S NP VP Parse tree 6 / 27 V NP NP John | Mary V saw → → → → ⇒ ⇒ ⇒ ⇒ ⇒ ∗ ⇒ John saw Mary
Where were we? NP VP VP Constituency overview saw NP Mary Derivations S John VP NP John V NP John saw NP John saw Mary or, S Ç. Çöltekin, SfS / University of Tübingen WS 19–20 John V S VP Dependency grammars Closing remarks An example: constituency grammar in action Grammar S NP VP Parse tree 6 / 27 V NP NP John | Mary V saw → → → → ⇒ ⇒ ⇒ ⇒ ⇒ ∗ ⇒ John saw Mary
Where were we? Constituency overview Dependency grammars Closing remarks An exercise I read a good book during the break and construct the parse tree Repeat the same for a (more-or-less direct) translation of the same sentence in another language How about the following sentence? During the break, I read a good book Ç. Çöltekin, SfS / University of Tübingen WS 19–20 7 / 27 • Write down simple (phrase structure) grammar rules for parsing the sentence
Where were we? Constituency overview Dependency grammars Closing remarks An exercise I read a good book during the break and construct the parse tree another language How about the following sentence? During the break, I read a good book Ç. Çöltekin, SfS / University of Tübingen WS 19–20 7 / 27 • Write down simple (phrase structure) grammar rules for parsing the sentence • Repeat the same for a (more-or-less direct) translation of the same sentence in
Where were we? Constituency overview Dependency grammars Closing remarks An exercise I read a good book during the break and construct the parse tree another language During the break, I read a good book Ç. Çöltekin, SfS / University of Tübingen WS 19–20 7 / 27 • Write down simple (phrase structure) grammar rules for parsing the sentence • Repeat the same for a (more-or-less direct) translation of the same sentence in • How about the following sentence?
Where were we? Constituency overview WS 19–20 SfS / University of Tübingen Ç. Çöltekin, unlabeled data for improving parsing is also a common trend – ‘induced’ from raw data (interesting, but not as successful) – extracted from treebanks (which also require lots of efgort) – hand crafted (many years of expert efgort) Where do grammars come from? Closing remarks Dependency grammars 8 / 27 • Grammars for (constituency) parsing can be either • Current practice relies mostly on treebanks • Hybrid approaches also exist • Grammar induction is not common (for practical models), but exploiting
Where were we? John WS 19–20 SfS / University of Tübingen Ç. Çöltekin, root object subject Mary saw them into (abstract) constituents Constituency overview rather recently introduction Dependency grammars Closing remarks Dependency grammars 9 / 27 • Dependency grammars gained popularity in linguistics (particularly in CL) • They are old: roots can be traced back to Pāṇini (approx. 5th century BCE) • Modern dependency grammars are often attributed to Tesnière 1959 • The main idea is capturing the relations between words, rather than grouping
Where were we? The structure of the sentence is represented by asymmetric , binary relations WS 19–20 SfS / University of Tübingen Ç. Çöltekin, Often an artifjcial root node is used for computational convenience Typically, the links (relations) have labels (dependency types) Each relation defjnes one of the words as the head and the other as dependent between syntactic units root Constituency overview object subject Mary saw John Dependency grammars Closing remarks Dependency grammars 10 / 27 • No constituents, units of syntactic structure are words
Where were we? Constituency overview WS 19–20 SfS / University of Tübingen Ç. Çöltekin, Often an artifjcial root node is used for computational convenience Typically, the links (relations) have labels (dependency types) Each relation defjnes one of the words as the head and the other as dependent between syntactic units root object subject Mary saw John Dependency grammars Closing remarks Dependency grammars 10 / 27 • No constituents, units of syntactic structure are words • The structure of the sentence is represented by asymmetric , binary relations
Where were we? Constituency overview WS 19–20 SfS / University of Tübingen Ç. Çöltekin, Often an artifjcial root node is used for computational convenience Typically, the links (relations) have labels (dependency types) between syntactic units root object subject Mary saw John Dependency grammars Closing remarks Dependency grammars 10 / 27 • No constituents, units of syntactic structure are words • The structure of the sentence is represented by asymmetric , binary relations • Each relation defjnes one of the words as the head and the other as dependent
Where were we? object WS 19–20 SfS / University of Tübingen Ç. Çöltekin, Often an artifjcial root node is used for computational convenience between syntactic units Constituency overview root subject Mary saw John Dependency grammars Closing remarks Dependency grammars 10 / 27 • No constituents, units of syntactic structure are words • The structure of the sentence is represented by asymmetric , binary relations • Each relation defjnes one of the words as the head and the other as dependent • Typically, the links (relations) have labels (dependency types)
Where were we? object WS 19–20 SfS / University of Tübingen Ç. Çöltekin, between syntactic units Constituency overview root subject Mary saw John Dependency grammars Closing remarks Dependency grammars 10 / 27 • No constituents, units of syntactic structure are words • The structure of the sentence is represented by asymmetric , binary relations • Each relation defjnes one of the words as the head and the other as dependent • Typically, the links (relations) have labels (dependency types) • Often an artifjcial root node is used for computational convenience
Recommend
More recommend