Syntax, Grammars & Parsing

Similar documents
(Sub)Gradient Descent

Ensemble Technique Utilization for Indonesian Dependency Parser

Syntax Parsing 1. Grammars and parsing 2. Top-down and bottom-up parsing 3. Chart parsers 4. Bottom-up chart parsing 5. The Earley Algorithm

Parsing of part-of-speech tagged Assamese Texts

Grammars & Parsing, Part 1:

CS 598 Natural Language Processing

AQUA: An Ontology-Driven Question Answering System

Inleiding Taalkunde. Docent: Paola Monachesi. Blok 4, 2001/ Syntax 2. 2 Phrases and constituent structure 2. 3 A minigrammar of Italian 3

11/29/2010. Statistical Parsing. Statistical Parsing. Simple PCFG for ATIS English. Syntactic Disambiguation

UNIVERSITY OF OSLO Department of Informatics. Dialog Act Recognition using Dependency Features. Master s thesis. Sindre Wetjen

Prediction of Maximal Projection for Semantic Role Labeling

Proof Theory for Syntacticians

RANKING AND UNRANKING LEFT SZILARD LANGUAGES. Erkki Mäkinen DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A ER E P S I M S

Some Principles of Automated Natural Language Information Extraction

Compositional Semantics

Developing a TT-MCTAG for German with an RCG-based Parser

Using dialogue context to improve parsing performance in dialogue systems

CS Machine Learning

ReinForest: Multi-Domain Dialogue Management Using Hierarchical Policies and Knowledge Ontology

Achim Stein: Diachronic Corpora Aston Corpus Summer School 2011

Context Free Grammars. Many slides from Michael Collins

Basic Parsing with Context-Free Grammars. Some slides adapted from Julia Hirschberg and Dan Jurafsky 1

Content Language Objectives (CLOs) August 2012, H. Butts & G. De Anda

Second Exam: Natural Language Parsing with Neural Networks

Towards a Machine-Learning Architecture for Lexical Functional Grammar Parsing. Grzegorz Chrupa la

The stages of event extraction

Lecture 1: Basic Concepts of Machine Learning

Chunk Parsing for Base Noun Phrases using Regular Expressions. Let s first let the variable s0 be the sentence tree of the first sentence.

Case government vs Case agreement: modelling Modern Greek case attraction phenomena in LFG

Introduction to HPSG. Introduction. Historical Overview. The HPSG architecture. Signature. Linguistic Objects. Descriptions.

A Framework for Customizable Generation of Hypertext Presentations

Natural Language Processing. George Konidaris

An Interactive Intelligent Language Tutor Over The Internet

Refining the Design of a Contracting Finite-State Dependency Parser

Python Machine Learning

An Introduction to the Minimalist Program

Linking Task: Identifying authors and book titles in verbose queries

The Smart/Empire TIPSTER IR System

Chinese Language Parsing with Maximum-Entropy-Inspired Parser

Chapter 2 Rule Learning in a Nutshell

The Interface between Phrasal and Functional Constraints

Beyond the Pipeline: Discrete Optimization in NLP

Modeling Attachment Decisions with a Probabilistic Parser: The Case of Head Final Structures

Towards a MWE-driven A* parsing with LTAGs [WG2,WG3]

A General Class of Noncontext Free Grammars Generating Context Free Languages

A deep architecture for non-projective dependency parsing

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

The Role of the Head in the Interpretation of English Deverbal Compounds

Learning Computational Grammars

Radius STEM Readiness TM

Target Language Preposition Selection an Experiment with Transformation-Based Learning and Aligned Bilingual Data

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

Introduction to Causal Inference. Problem Set 1. Required Problems

GACE Computer Science Assessment Test at a Glance

A Graph Based Authorship Identification Approach

Exemplar 6 th Grade Math Unit: Prime Factorization, Greatest Common Factor, and Least Common Multiple

Accurate Unlexicalized Parsing for Modern Hebrew

Specification and Evaluation of Machine Translation Toy Systems - Criteria for laboratory assignments

A Version Space Approach to Learning Context-free Grammars

The presence of interpretable but ungrammatical sentences corresponds to mismatches between interpretive and productive parsing.

Intra-talker Variation: Audience Design Factors Affecting Lexical Selections

CAAP. Content Analysis Report. Sample College. Institution Code: 9011 Institution Type: 4-Year Subgroup: none Test Date: Spring 2011

Writing a composition

Memory-based grammatical error correction

Applications of memory-based natural language processing

A Minimalist Approach to Code-Switching. In the field of linguistics, the topic of bilingualism is a broad one. There are many

LTAG-spinal and the Treebank

Speech Recognition at ICSI: Broadcast News and beyond

Discriminative Learning of Beam-Search Heuristics for Planning

National Literacy and Numeracy Framework for years 3/4

arxiv: v1 [cs.cv] 10 May 2017

Probing for semantic evidence of composition by means of simple classification tasks

THE ROLE OF DECISION TREES IN NATURAL LANGUAGE PROCESSING

Specifying Logic Programs in Controlled Natural Language

Program Matrix - Reading English 6-12 (DOE Code 398) University of Florida. Reading

A Computational Evaluation of Case-Assignment Algorithms

LQVSumm: A Corpus of Linguistic Quality Violations in Multi-Document Summarization

Constraining X-Bar: Theta Theory

SEMAFOR: Frame Argument Resolution with Log-Linear Models

The Strong Minimalist Thesis and Bounded Optimality

CEFR Overall Illustrative English Proficiency Scales

Approaches to control phenomena handout Obligatory control and morphological case: Icelandic and Basque

Informatics 2A: Language Complexity and the. Inf2A: Chomsky Hierarchy

Parsing natural language

WSU Five-Year Program Review Self-Study Cover Page

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

The College Board Redesigned SAT Grade 12

The Discourse Anaphoric Properties of Connectives

Language properties and Grammar of Parallel and Series Parallel Languages

LING 329 : MORPHOLOGY

BANGLA TO ENGLISH TEXT CONVERSION USING OPENNLP TOOLS

Aspectual Classes of Verb Phrases

The Effect of Multiple Grammatical Errors on Processing Non-Native Writing

Analysis of Probabilistic Parsing in NLP

Degree Qualification Profiles Intellectual Skills

Arizona s English Language Arts Standards th Grade ARIZONA DEPARTMENT OF EDUCATION HIGH ACADEMIC STANDARDS FOR STUDENTS

Rule Learning with Negation: Issues Regarding Effectiveness

Minimalism is the name of the predominant approach in generative linguistics today. It was first

Interactive Whiteboard

Control and Boundedness

Transcription:

Syntax, Grammars & Parsing CMSC 470 Marine Carpuat Fig credits: Joakim Nivre, Dan Jurafsky & James Martin

Syntax & Grammar Syntax From Greek syntaxis, meaning setting out together refers to the way words are arranged together. Grammar Set of structural rules governing composition of clauses, phrases, and words in any given natural language Descriptive, not prescriptive Panini s grammar of Sanskrit ~2000 years ago

Syntax and Grammar Goal of syntactic theory explain how people combine words to form sentences and how children attain knowledge of sentence structure Grammar implicit knowledge of a native speaker acquired without explicit instruction minimally able to generate all and only the possible sentences of the language [Philips, 2003]

Syntax in NLP Syntactic analysis can be useful in many NLP applications Grammar checkers Dialogue systems Question answering Information extraction Machine translation Sequence models can go a long way but syntactic analysis is particularly useful In low resource settings In tasks where precise output structure matters

Two views of syntactic structure Constituency (phrase structure) Phrase structure organizes words in nested constituents Dependency structure Shows which words depend on (modify or are arguments of) which on other words

Constituency Basic idea: groups of words act as a single unit Constituents form coherent classes that behave similarly With respect to their internal structure: e.g., at the core of a noun phrase is a noun With respect to other constituents: e.g., noun phrases generally occur before verbs

Constituency: Example The following are all noun phrases in English... Why? They can all precede verbs They can all be preposed/postposed

Grammars and Constituency For a particular language: What are the right set of constituents? What rules govern how they combine? Answer: not obvious and difficult There are many different theories of grammar and competing analyses of the same data!

An Example Context-Free Grammar

Parse Tree: Example Note: equivalence between parse trees and bracket notation

Dependency Grammars Context-Free Grammars focus on constituents Non-terminals don t actually appear in the sentence In dependency grammar, a parse is a graph (usually a tree) where: Nodes represent words Edges represent dependency relations between words (typed or untyped, directed or undirected)

Example Dependency Parse They hid the letter on the shelf Compare with constituent parse What s the relation?

Dependency Grammars Syntactic structure = lexical items linked by binary asymmetrical relations called dependencies

Example Dependency Parse Dependencies form a tree: - Connected - Acyclic - Single-head They hid the letter on the shelf Compare with constituent parse What s the relation?

Dependency Relations

Universal Dependencies project Set of dependency relations that are Linguistically motivated Computationally useful Cross-linguistically applicable [Nivre et al. 2016] Universaldependencies.org

Outline Syntax & Grammar Two views of syntactic structures Context-Free Grammars Dependency grammars Can be used to capture various facts about the structure of language (but not all!) Dependency Parsing

Data-driven dependency parsing Goal: learn a good predictor of dependency graphs Input: sentence Output: dependency graph/tree G = (V,A) Can be framed as a structured prediction task - very large output space - with interdependent labels 2 dominant approaches: transition-based parsing and graph-based parsing

Transition-based dependency parsing Builds on shift-reduce parsing [Aho & Ullman, 1972] Configuration Stack Input buffer of words Set of dependency relations Goal of parsing find a final configuration where all words accounted for Relations form dependency tree

Defining Transitions Transitions Are functions that produce a new configuration given current configuration Parsing is the task of finding a sequence of transition that leads from start state to desired goal state Start state Stack initialized with ROOT node Input buffer initialized with words in sentence Dependency relation set = empty End state Stack and word lists are empty Set of dependency relations = final parse

Arc Standard Transition System defines 3 transition operators [Covington, 2001; Nivre 2003] LEFT-ARC create head-dependent relation between word at top of stack and 2 nd word (under top) remove 2 nd word from stack RIGHT-ARC Create head-dependent relation between word on 2 nd word on stack and word on top Remove word at top of stack SHIFT Remove word at head of input buffer Push it on the stack

Arc standard transition systems Preconditions ROOT cannot have incoming arcs LEFT-ARC cannot be applied when ROOT is the 2 nd element in stack LEFT-ARC and RIGHT-ARC require 2 elements in stack to be applied

Transition-based Dependency Parser Properties of this algorithm: - Linear in sentence length - A greedy algorithm - Output quality depends on oracle

Let s parse this sentence

Transition-Based Parsing Illustrated

Outline Syntax & Grammar Two views of syntactic structures Context-Free Grammars Dependency grammars Can be used to capture various facts about the structure of language (but not all!) Dependency Parsing Transition-based parser

Where do we get an oracle? Multiclass classification problem Input: current parsing state (e.g., current and previous configurations) Output: one transition among all possible transitions Q: size of output space? Supervised classifiers can be used E.g., perceptron Open questions What are good features for this task? Where do we get training examples?