Dependency Parsing Joakim Nivre. Dependency Grammar Old tradition in descriptive grammar Modern theroretical developments: –Structural syntax (Tesnière)

Slides:



Advertisements
Similar presentations
Giorgio Satta University of Padua Parsing Techniques for Lexicalized Context-Free Grammars* * Joint work with : Jason Eisner, Mark-Jan Nederhof.
Advertisements

CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
Augmented Transition Networks
Basic Parsing with Context-Free Grammars CS 4705 Julia Hirschberg 1 Some slides adapted from Kathy McKeown and Dan Jurafsky.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Approaches to Parsing.
Grammars, Languages and Parse Trees. Language Let V be an alphabet or vocabulary V* is set of all strings over V A language L is a subset of V*, i.e.,
Dependency Parsing Some slides are based on:
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
UNIT-III By Mr. M. V. Nikum (B.E.I.T). Programming Language Lexical and Syntactic features of a programming Language are specified by its grammar Language:-
ICE1341 Programming Languages Spring 2005 Lecture #5 Lecture #5 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
GRAMMAR & PARSING (Syntactic Analysis) NLP- WEEK 4.
Mooly Sagiv and Roman Manevich School of Computer Science
10. Lexicalized and Probabilistic Parsing -Speech and Language Processing- 발표자 : 정영임 발표일 :
1 Pass Compiler 1. 1.Introduction 1.1 Types of compilers 2.Stages of 1 Pass Compiler 2.1 Lexical analysis 2.2. syntactical analyzer 2.3. Code generation.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Amirkabir University of Technology Computer Engineering Faculty AILAB Efficient Parsing Ahmad Abdollahzadeh Barfouroush Aban 1381 Natural Language Processing.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Features and Unification
Chapter 3 Describing Syntax and Semantics Sections 1-3.
January 14, 2015CS21 Lecture 51 CS21 Decidability and Tractability Lecture 5 January 14, 2015.
Syntactic Parsing with CFGs CMSC 723: Computational Linguistics I ― Session #7 Jimmy Lin The iSchool University of Maryland Wednesday, October 14, 2009.
Link Grammar ( by Davy Temperley, Daniel Sleator & John Lafferty ) Syed Toufeeq Ahmed ASU.
Chapter 3: Formal Translation Models
Table-driven parsing Parsing performed by a finite state machine. Parsing algorithm is language-independent. FSM driven by table (s) generated automatically.
Parsing SLP Chapter 13. 7/2/2015 Speech and Language Processing - Jurafsky and Martin 2 Outline  Parsing with CFGs  Bottom-up, top-down  CKY parsing.
January 15, 2014CS21 Lecture 61 CS21 Decidability and Tractability Lecture 6 January 16, 2015.
Lexical and syntax analysis
Lee CSCE 314 TAMU 1 CSCE 314 Programming Languages Syntactic Analysis Dr. Hyunyoung Lee.
1 CS546: Machine Learning and Natural Language Preparation to the Term Project: - Dependency Parsing - Dependency Representation for Semantic Role Labeling.
1 Data-Driven Dependency Parsing. 2 Background: Natural Language Parsing Syntactic analysis String to (tree) structure He likes fish S NP VP NP VNPrn.
Corpus-based computational linguistics or computational corpus linguistics? Joakim Nivre Uppsala University Department of Linguistics and Philology.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Tree-adjoining grammar (TAG) is a grammar formalism defined by Aravind Joshi and introduced in Tree-adjoining grammars are somewhat similar to context-free.
Inductive Dependency Parsing Joakim Nivre
Dependency Parsing Prashanth Mannem
Joey Paquet, Lecture 12 Review. Joey Paquet, Course Review Compiler architecture –Lexical analysis, syntactic analysis, semantic.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 4.
Dependency Parser for Swedish Project for EDA171 by Jonas Pålsson Marcus Stamborg.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Basic Parsing Algorithms: Earley Parser and Left Corner Parsing
© 2005 Hans Uszkoreit FLST WS 05/06 FLST Grammars and Parsing Hans Uszkoreit.
NLP. Introduction to NLP The probabilities don’t depend on the specific words –E.g., give someone something (2 arguments) vs. see something (1 argument)
Syntactic Annotation of Slovene Corpora (SDT, JOS) Nina Ledinek ISJ ZRC SAZU
Grammars CS 130: Theory of Computation HMU textbook, Chap 5.
Dependency Parsing Parsing Algorithms Peng.Huang
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 2 Syntax A language that is simple to parse.
Parsing and Code Generation Set 24. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program,
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Programming Languages and Design Lecture 2 Syntax Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
GRAMMARS & PARSING. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program, referred to as a.
1 Topic #4: Syntactic Analysis (Parsing) CSC 338 – Compiler Design and implementation Dr. Mohamed Ben Othman ( )
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
Computational lexicology, morphology and syntax Diana Trandabă
Dependency Parsing Niranjan Balasubramanian March 24 th 2016 Credits: Many slides from: Michael Collins, Mausam, Chris Manning, COLNG 2014 Dependency Parsing.
Syntax Analysis By Noor Dhia Syntax analysis:- Syntax analysis or parsing is the most important phase of a compiler. The syntax analyzer considers.
Roadmap Probabilistic CFGs –Handling ambiguity – more likely analyses –Adding probabilities Grammar Parsing: probabilistic CYK Learning probabilities:
Computational lexicology, morphology and syntax
Chapter 1 Introduction.
CSC 594 Topics in AI – Natural Language Processing
CS 404 Introduction to Compiler Design
Table-driven parsing Parsing performed by a finite state machine.
Chapter 1 Introduction.
Compiler Lecture 1 CS510.
Dependency Parsing & Feature-based Parsing
Parsing Unrestricted Text
… NPDAs continued.
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
COMPILER CONSTRUCTION
Presentation transcript:

Dependency Parsing Joakim Nivre

Dependency Grammar Old tradition in descriptive grammar Modern theroretical developments: –Structural syntax (Tesnière) –Meaning-Text Theory (Mel’čuk) –Word Grammar (Hudson) –Functional Generative Description (Prague) Basic idea: –Syntactic structure consists of binary, asymmetrical relations between the words of a sentence

Dependency Representations Directed graphs: –V is a set of nodes (tokens) –E is a set of arcs (dependency relations) –L is a labeling function on E (dependency types) Example: PP På (In) NN 60-talet (the-60’s) VB målade (painted) PN han (he) JJ djärva (bold) NN tavlor (pictures) ADV PR OBJ SUBATT

Graph Constraints Commonly imposed constraints: –Single-head (at most one head per node) –Connectedness (no dangling nodes) –Acyclicity (no cycles in the graph) –Projectivity: An arc i  j is projective iff, for every k occurring between i and j in the input string, i  j. A graph is projective iff every arc in A is projective.

Dependency Parsing Dependency-based grammar parsing: –Given a dependency grammar G and an input string x   *, derive some or all of the dependency graphs y assigned to x by G. Dependency-based text parsing: –Given a text T = (x 1, …, x n ), derive the correct dependency graph y i for every sentence x i  T. Text parsing may be grammar-driven or not.

Parsing Methods Three main approaches: –Dynamic programming algorithms applied to context-free (projective) dependency grammars –Eliminative parsing techniques applied to constraint-based formulations of (non- projective) dependency grammar –Deterministic parsing algorithms combined with weak grammars or data-driven methods

Dynamic Programming Early formalizations: –Hays/Gaifman: Equivalent to a subset of context-free grammars (roughly lexicalized) –Tabular parsing techniques (cf. CKY parsing) Modern developments: –Link grammar (Sleator and Temperley) –Bilexical grammar (Eisner): Lexicalized parsing in O(n 3 ) time by combining spans instead of constituents.

Constraint Satisfaction Constraints on dependency graphs (Maruyama): pos(i) = D  [dep(i) = DET  pos(head(i)) = N  i < head(i)] pos(i) = N  [dep(i) = SUBJ  pos(head(i)) = V  i < head(i)] pos(i) = V  [dep(i) = ROOT  head(i) = nil] [head(i) = head(j)  dep(i) = dep(j)]  i = j Graph satisfying the above constraints: DaDa N dog V runs SUBJDET

Parsing with Constraints Eliminative parsing: –Start with all formally possible analyses (in a compact representation) –Eliminate representations that violate constraints until only valid analyses remain Variations: –Weighted constraints –Transformational parsing

Deterministic Parsing Covington’s fundamental algorithm: –Accept words one by one starting at the beginning of the sentence, and try linking each word as head or dependent of every previous word. Variations on shift-reduce parsing: –Standard (Kudo, Matsumoto, Yamada) –Arc-eager (Nivre)

Arc-Eager Parsing Configuration: C =  S, I, A  S = Stack I = Input (remaining) A = Arc relation (current) Initialization:  nil, W,  Termination:  S, nil, A  for any S, A Acceptance:  S, nil, A  if (W, A) is connected

Transitions Left-Arc (LA):  w i |S, w j |I, A    S, w j |I, A  {(w j, w i )}  if  a : a  A  dep(a) = w i Right-Arc (RA):  w i |S, w j |I, A    w j |w i |S, I, A  {(w i, w j )}  if  a : a  A  dep(a) = w j Reduce (RE):  w i |S, I, A    S, I, A  if  a : a  A  dep(a) = w i Shift (SH):  S, w i |I, A    w i |S, I, A 

MaltParser Robust, data-driven dependency parsing using a combination of: –Deterministic parsing (e.g. arc-eager) –Discriminative machine learning (e.g. MBL) –User-defined feature models: Lexical features Part-of-speech features Dependency type features

Why (Not) Dependency Parsing? Potential advantages of dependency parsing: –Dependency relations are close to semantic relations, which facilitates semantic interpretation –Dependency representations are more constrained (less complex), which facilitates parsing –Dependency representations are more suitable for languages with free or flexible word order Potential disadvantages: –Dependency representations are less expressive –Dependency representations are less well understood formally and computationally