dependency grammars
play

Dependency Grammars Dependency grammars . ltekin, SfS / University - PDF document

Dependency Grammars Dependency grammars . ltekin, SfS / University of Tbingen WS 1920 5 / 27 Where were we? Constituency overview Closing remarks (also in computer science) An example: constituency grammar in action Grammar S


  1. Dependency Grammars Dependency grammars Ç. Çöltekin, SfS / University of Tübingen WS 19–20 5 / 27 Where were we? Constituency overview Closing remarks (also in computer science) An example: constituency grammar in action Grammar S NP VP VP V NP restricted forms are common called a constituent or phrase . John | Mary Ç. Çöltekin, Where were we? Constituency overview Dependency grammars Closing remarks Ingredients of a parser Data structures and algorithms SfS / University of Tübingen The main idea is that a span of words form a natural unit, WS 19–20 4 / 27 Where were we? Constituency overview Dependency grammars Closing remarks Phrase structure (or constituency) grammars NP V WS 19–20 An exercise WS 19–20 6 / 27 Where were we? Constituency overview Dependency grammars Closing remarks parsing the sentence Ç. Çöltekin, I read a good book during the break and construct the parse tree the same sentence in another language During the break, I read a good book Ç. Çöltekin, SfS / University of Tübingen WS 19–20 SfS / University of Tübingen or, S saw saw Parse tree S NP John VP V NP John saw Mary Mary Derivations S NP VP John VP John V NP John saw NP 3 / 27 7 / 27 SfS / University of Tübingen Where were we? automata WS 19–20 SfS / University of Tübingen Seminar für Sprachwissenschaft Ç. Çöltekin, – Graph based dependency parsing Winter Semester 2019–2020 introduction to classifjcation) – Transition based dependency parsing (with a short Ç. Çöltekin, Next … Closing remarks Dependency grammars Constituency overview 1 / 27 Where were we? Closing remarks – Expressivity and computational complexity – Learnability (second part of the course) grammars and regular expressions So far … – DFA, NFA, determinization – Closure properties of regular languages WS 19–20 Dependency grammars – Minimization Constituency overview Where were we? Ç. Çöltekin, SfS / University of Tübingen 2 / 27 University of Tübingen Constituency overview S for linguistic research applications like speech recognition and machine translation question answering , information extraction , …) language sentences (hence, also useful for applications like for Computational Linguistics III interpretation of sentences John NP saw Dependency grammars VP Mary NP V Mary VP Closing remarks Why do we need syntactic parsing? S NP Çağrı Çöltekin John V saw ccoltekin@sfs.uni-tuebingen.de NP – Chomsky hierarchy of language classes • Preliminaries: (formal) languages, grammars and • Finite state automata, regular languages, regular • Finite state transducers and their applications in CL • Constituency parsing (CKY, Earley) • Dependency grammars, and dependency treebanks • Dependency parsing • Syntactic analysis is an intermediate step in (semantic) • It is essential for understanding and generating natural • (Statistical) parsers are also used as language models for • It can be used for grammar checking , and can be a useful tool • A grammar • An algorithm for parsing • Constituency grammars are common in modern linguistics • A method for ambiguity resolution • Most are based on a context-free ‘backbone’, extensions or → → → → • Write down simple (phrase structure) grammar rules for ⇒ ⇒ • Repeat the same for a (more-or-less direct) translation of ⇒ ⇒ • How about the following sentence? ⇒ ∗ ⇒ John saw Mary

  2. Where were we? her verb pron noun root I saw duck root Ç. Çöltekin, SfS / University of Tübingen WS 19–20 12 / 27 Where were we? Constituency overview Dependency grammars pron duck Dependency grammar: defjnition WS 19–20 root xcomp obj punct Ç. Çöltekin, Constituency overview 11 / 27 her Where were we? Constituency overview Dependency grammars Closing remarks Dependency grammars: alternative notation I saw Closing remarks V is a set of nodes corresponding to the (syntactic) words nsubj optional 1. Head (H) determines the syntactic category of the construction (C) and can often replace C 2. H determines the semantic category of C; the dependent (D) gives semantic specifjcation 3. H is obligatory, D may be optional 4. H selects D and determines whether D is obligatory or 5. The form and/or position of dependent is determined by Closing remarks the head 6. The form of D depends on H 7. The linear position of D is specifjed with reference to H (from Kübler, McDonald, and Nivre 2009, p.3–4) Ç. Çöltekin, SfS / University of Tübingen WS 19–20 How to determine heads Dependency grammars (we implicitly assume that words have indexes) Dependency grammars This defjnes a directed graph. Ç. Çöltekin, SfS / University of Tübingen WS 19–20 13 / 27 Where were we? Constituency overview Closing remarks Constituency overview Dependency grammars: common assumptions for dependency parsing Ç. Çöltekin, SfS / University of Tübingen WS 19–20 14 / 27 Where were we? advmod SfS / University of Tübingen . object 5th century BCE) rather than grouping them into (abstract) constituents John saw Mary subject it introduction Ç. Çöltekin, SfS / University of Tübingen WS 19–20 9 / 27 Where were we? Constituency overview (particularly in CL) rather recently Dependency grammars Closing remarks but exploiting unlabeled data for improving parsing is also Dependency grammars Closing remarks Where do grammars come from? – hand crafted (many years of expert efgort) – extracted from treebanks (which also require lots of efgort) – ‘induced’ from raw data (interesting, but not as successful) a common trend Closing remarks Ç. Çöltekin, SfS / University of Tübingen WS 19–20 8 / 27 Where were we? Constituency overview Dependency grammars Dependency grammars root Dependency grammars Constituency overview convenience Ç. Çöltekin, SfS / University of Tübingen WS 19–20 10 / 27 Where were we? Dependency grammars John Closing remarks A more realistic example I really enjoyed reading types) 15 / 27 saw object Mary root binary relations between syntactic units subject • Dependency grammars gained popularity in linguistics • Grammars for (constituency) parsing can be either • They are old: roots can be traced back to Pāṇini (approx. • Modern dependency grammars are often attributed to • Current practice relies mostly on treebanks Tesnière 1959 • Hybrid approaches also exist • The main idea is capturing the relations between words, • Grammar induction is not common (for practical models), • No constituents, units of syntactic structure are words • The structure of the sentence is represented by asymmetric , • Each relation defjnes one of the words as the head and the other as dependent • Typically, the links (relations) have labels (dependency • Often an artifjcial root node is used for computational A dependency grammar is a tuple ( V , A ) subj subj obj obj A is a set of arcs of the form ( w i , r , w j ) where w i ∈ V is the head nmod nmod r is the type of the relation (arc label) w j ∈ V is the dependent • Every word has a single head • The dependency graphs are acyclic • The graph is connected • With these assumptions, the representation is a tree • Note that these assumptions are not universal but common

Recommend


More recommend