Dependency Parser for Swedish Project for EDA171 by Jonas Pålsson Marcus Stamborg.

Slides:



Advertisements
Similar presentations
Three Basic Problems Compute the probability of a text: P m (W 1,N ) Compute maximum probability tag sequence: arg max T 1,N P m (T 1,N | W 1,N ) Compute.
Advertisements

Grammar and Algorithm }
A question from last class: construct the predictive parsing table for this grammar: S->i E t S e S | i E t S | a E -> B.
HPSG parser development at U-tokyo Takuya Matsuzaki University of Tokyo.
More Efficient Generation of Plane Triangulations Shin-ichi Nakano Takeaki Uno Gunma University National Institute of JAPAN Informatics, JAPAN 23/Sep/2003.
Proceedings of the Conference on Intelligent Text Processing and Computational Linguistics (CICLing-2007) Learning for Semantic Parsing Advisor: Hsin-His.
Pushdown Automata Consists of –Pushdown stack (can have terminals and nonterminals) –Finite state automaton control Can do one of three actions (based.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Approaches to Parsing.
Dependency Parsing Joakim Nivre. Dependency Grammar Old tradition in descriptive grammar Modern theroretical developments: –Structural syntax (Tesnière)
Dependency Parsing Some slides are based on:
Learning with Probabilistic Features for Improved Pipeline Models Razvan C. Bunescu Electrical Engineering and Computer Science Ohio University Athens,
9/27/2006Prof. Hilfinger, Lecture 141 Syntax-Directed Translation Lecture 14 (adapted from slides by R. Bodik)
6/12/2015Prof. Hilfinger CS164 Lecture 111 Bottom-Up Parsing Lecture (From slides by G. Necula & R. Bodik)
Amirkabir University of Technology Computer Engineering Faculty AILAB Efficient Parsing Ahmad Abdollahzadeh Barfouroush Aban 1381 Natural Language Processing.
Context-Free Grammars Lecture 7
Prof. Bodik CS 164 Lecture 81 Grammars and ambiguity CS164 3:30-5:00 TT 10 Evans.
Table-driven parsing Parsing performed by a finite state machine. Parsing algorithm is language-independent. FSM driven by table (s) generated automatically.
Seven Lectures on Statistical Parsing Christopher Manning LSA Linguistic Institute 2007 LSA 354 Lecture 7.
Bottom-up parsing Goal of parser : build a derivation
Lexical and syntax analysis
SI485i : NLP Set 9 Advanced PCFGs Some slides from Chris Manning.
CSC3315 (Spring 2009)1 CSC 3315 Lexical and Syntax Analysis Hamid Harroud School of Science and Engineering, Akhawayn University
1 Introduction to Parsing Lecture 5. 2 Outline Regular languages revisited Parser overview Context-free grammars (CFG’s) Derivations.
Syntax Directed Translation. Syntax directed translation Yacc can do a simple kind of syntax directed translation from an input sentence to C code We.
Tree Kernels for Parsing: (Collins & Duffy, 2001) Advanced Statistical Methods in NLP Ling 572 February 28, 2012.
Syntax and Semantics Structure of programming languages.
1 Data-Driven Dependency Parsing. 2 Background: Natural Language Parsing Syntactic analysis String to (tree) structure He likes fish S NP VP NP VNPrn.
410/510 1 of 21 Week 2 – Lecture 1 Bottom Up (Shift reduce, LR parsing) SLR, LR(0) parsing SLR parsing table Compiler Construction.
Chapter 10: Compilers and Language Translation Invitation to Computer Science, Java Version, Third Edition.
OPERATOR PRECEDENCE PARSING
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
1 Natural Language Processing Lecture 11 Efficient Parsing Reading: James Allen NLU (Chapter 6)
10/13/2015IT 3271 Tow kinds of predictive parsers: Bottom-Up: The syntax tree is built up from the leaves Example: LR(1) parser Top-Down The syntax tree.
Inductive Dependency Parsing Joakim Nivre
Training dependency parsers by jointly optimizing multiple objectives Keith HallRyan McDonaldJason Katz- BrownMichael Ringgaard.
Lesson 3 CDT301 – Compiler Theory, Spring 2011 Teacher: Linus Källberg.
Review 1.Lexical Analysis 2.Syntax Analysis 3.Semantic Analysis 4.Code Generation 5.Code Optimization.
Overview of Previous Lesson(s) Over View  An ambiguous grammar which fails to be LR and thus is not in any of the classes of grammars i.e SLR, LALR.
Syntax and Semantics Structure of programming languages.
Introduction to Parsing
Daisy Arias Math 382/Lab November 16, 2010 Fall 2010.
A Tool for Constructing Syntax-Directed Editors Yung-Shen Chang and Nai-Wei Lin Department of Computer Science and Information Engineering National Chung-Cheng.
YACC. Introduction What is YACC ? a tool for automatically generating a parser given a grammar written in a yacc specification (.y file) YACC (Yet Another.
Statistical Decision-Tree Models for Parsing NLP lab, POSTECH 김 지 협.
A dependency parser for Spanish. David Herrero Marco Language Processing and Computational Linguistics EDA171.
Bottom-Up Parsing David Woolbright. The Parsing Problem Produce a parse tree starting at the leaves The order will be that of a rightmost derivation The.
SSQSA present and future Gordana Rakić, Zoran Budimac Department of Mathematics and Informatics Faculty of Sciences University of Novi Sad
CS3230R. What is a parser? What is an LR parser? A bottom-up parser that efficiently handles deterministic context-free languages in guaranteed linear.
Dependency Parsing Parsing Algorithms Peng.Huang
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
GRAMMARS & PARSING. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program, referred to as a.
Learning Event Durations from Event Descriptions Feng Pan, Rutu Mulkar, Jerry R. Hobbs University of Southern California ACL ’ 06.
COMP 3438 – Part II-Lecture 6 Syntax Analysis III Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Dependency Parsing Niranjan Balasubramanian March 24 th 2016 Credits: Many slides from: Michael Collins, Mausam, Chris Manning, COLNG 2014 Dependency Parsing.
Syntax and Semantics Structure of programming languages.
CSC 594 Topics in AI – Natural Language Processing
Programming Languages Translator
Bottom-up parsing Goal of parser : build a derivation
LR Parsing – The Items Lecture 10 Fri, Feb 13, 2004.
Parsing and Parser Parsing methods: top-down & bottom-up
Unit-3 Bottom-Up-Parsing.
Chapter 4 Syntax Analysis.
Dependency Parsing & Feature-based Parsing
4 (c) parsing.
Regular Grammar - Finite Automaton
BOTTOM UP PARSING Lecture 16.
Compiler Design 7. Top-Down Table-Driven Parsing
Trees & Forests D. J. Foreman.
Chapter 10: Compilers and Language Translation
Parsing CSCI 432 Computer Science Theory
Presentation transcript:

Dependency Parser for Swedish Project for EDA171 by Jonas Pålsson Marcus Stamborg

Dependency Grammar  Describes relations between words in a sentence  A relation is between a head and its dependent(s)  All words have a head except the root of a sentence Thebigbrown beaver brown The beaver big

Dependency Parsing  Find the links that connects words using a computer.  Different algorithms exist.  Nivre's parser has reported the best results for swedish.

Nivre's Parser  Extension to Shift-Reduce.  Adds arcs between input and stack.  Produces a dependency graph using the following actions:  Shift - moves the input to the stack.  Reduce - pops the stack.  Left arc - creates an arc from input to stack.  Right arc - creates an arc from stack to input.

More about actions Nivre, J. (2004)

Corpus  Talbanken05 – modernized and computerized version of Talbanken76  Modified for use in CoNNL-X Shared Task  Training set is about sentences  We used a test set containing about 300 sentences Example from the corpus: 1Jag_POPO_2SS__ 2tycker_VVVV_0ROOT__ 3det_POPO_2OO__

How we did it  Collect data  Build model  Parse ARFFBuilder Trainer Parser Train Corpus Data Trained Classifier Test Corpus with relations Test Corpus

Collect data – Gold Standard Parsing  Build Weka compatible data file (arff).  Determining the action sequence from an annotated corpus is possible using the following rules. (Gold Standard Parsing)  If input has stack as head -> Right Arc  else if stack has input as head -> Left Arc  else if arc exists between input and any word in stack -> Reduce  else Shift

Train classifier  Weka 3 – Data mining software  C4.5 (J48) – Extension to the ID3 algorithm. Generates decision trees  Uses features derived from the current state of the parser  Outputs a trained classifier used by the parser to decide the next action

Parse using trained classifier  Uses the trained classifier to determine the head for each word in a sentence  Uses Nivre's algorithm with action decided by the classifier  Calculates the score as

Features  All features describe the current state of the parser  1 st set – Input and stack  2 nd set – Input, stack and children.  3 rd set – Input, stack and previous input.  4 th set – Input, stack, children and previous input.  We only used POS in the feature sets  Using lexical values actually decreased performance  For every set we used constraints to model valid actions in the current state of the parser

Results Scores using features: Stack_n_POS, Input_n_POS, Children Scores using features: Stack_n_POS, Input_n_POS

Results cont. Scores using features: Stack_n_POS, Input_n_POS, Children, Previous_Input_POS Scores using features: Stack_n_POS, Input_n_POS, Previous_Input_POS

Conclusions  Lexical values didn’t do much. Score even became worse. Might be better with different classifying algorithm or different test corpus  Previous input word was a very effective feature, probably the single best addition from only stack and input  Difficult to find optimal feature set

Future improvements  Try other features  Siblings  Use LEX on specific words  More words from original input string  Simulations to find the optimum feature set  Use SVM instead of C4.5

Thank you for listening  More to come in the report