Context Free Grammars. Many slides from Michael Collins

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

CS 598 Natural Language Processing

Grammars & Parsing, Part 1:

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

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

Enhancing Unlexicalized Parsing Performance using a Wide Coverage Lexicon, Fuzzy Tag-set Mapping, and EM-HMM-based Lexical Probabilities

Basic Syntax. Doug Arnold We review some basic grammatical ideas and terminology, and look at some common constructions in English.

BANGLA TO ENGLISH TEXT CONVERSION USING OPENNLP TOOLS

Unit 8 Pronoun References

Heuristic Sample Selection to Minimize Reference Standard Training Set for a Part-Of-Speech Tagger

2/15/13. POS Tagging Problem. Part-of-Speech Tagging. Example English Part-of-Speech Tagsets. More Details of the Problem. Typical Problem Cases

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

1/20 idea. We ll spend an extra hour on 1/21. based on assigned readings. so you ll be ready to discuss them in class

Developing Grammar in Context

Parsing of part-of-speech tagged Assamese Texts

LTAG-spinal and the Treebank

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

University of Alberta. Large-Scale Semi-Supervised Learning for Natural Language Processing. Shane Bergsma

What is NLP? CS 188: Artificial Intelligence Spring Why is Language Hard? The Big Open Problems. Information Extraction. Machine Translation

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

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

Natural Language Processing. George Konidaris

Constraining X-Bar: Theta Theory

Dear Teacher: Welcome to Reading Rods! Reading Rods offer many outstanding features! Read on to discover how to put Reading Rods to work today!

Sight Word Assessment

Chinese Language Parsing with Maximum-Entropy-Inspired Parser

The stages of event extraction

Construction Grammar. University of Jena.

Taught Throughout the Year Foundational Skills Reading Writing Language RF.1.2 Demonstrate understanding of spoken words,

ENGBG1 ENGBL1 Campus Linguistics. Meeting 2. Chapter 7 (Morphology) and chapter 9 (Syntax) Pia Sundqvist

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

Name: Class: Date: ID: A

Chapter 4: Valence & Agreement CSLI Publications

Derivational: Inflectional: In a fit of rage the soldiers attacked them both that week, but lost the fight.

Written by: YULI AMRIA (RRA1B210085) ABSTRACT. Key words: ability, possessive pronouns, and possessive adjectives INTRODUCTION

1 st Quarter (September, October, November) August/September Strand Topic Standard Notes Reading for Literature

Argument structure and theta roles

Ch VI- SENTENCE PATTERNS.

Three New Probabilistic Models. Jason M. Eisner. CIS Department, University of Pennsylvania. 200 S. 33rd St., Philadelphia, PA , USA

Parsing with Treebank Grammars: Empirical Bounds, Theoretical Models, and the Structure of the Penn Treebank

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

Adjectives tell you more about a noun (for example: the red dress ).

Derivational and Inflectional Morphemes in Pak-Pak Language

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

Compositional Semantics

The Structure of Relative Clauses in Maay Maay By Elly Zimmer

BULATS A2 WORDLIST 2

Advanced Grammar in Use

LNGT0101 Introduction to Linguistics

Formulaic Language and Fluency: ESL Teaching Applications

Control and Boundedness

Accurate Unlexicalized Parsing for Modern Hebrew

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

First Grade Curriculum Highlights: In alignment with the Common Core Standards

Prediction of Maximal Projection for Semantic Role Labeling

Universal Grammar 2. Universal Grammar 1. Forms and functions 1. Universal Grammar 3. Conceptual and surface structure of complex clauses

Today we examine the distribution of infinitival clauses, which can be

Pseudo-Passives as Adjectival Passives

Houghton Mifflin Reading Correlation to the Common Core Standards for English Language Arts (Grade1)

Sample Goals and Benchmarks

Intra-talker Variation: Audience Design Factors Affecting Lexical Selections

Linguistic Variation across Sports Category of Press Reportage from British Newspapers: a Diachronic Multidimensional Analysis

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

BASIC ENGLISH. Book GRAMMAR

Using dialogue context to improve parsing performance in dialogue systems

On the Notion Determiner

Ensemble Technique Utilization for Indonesian Dependency Parser

Hindi-Urdu Phrase Structure Annotation

English for Life. B e g i n n e r. Lessons 1 4 Checklist Getting Started. Student s Book 3 Date. Workbook. MultiROM. Test 1 4

Procedia - Social and Behavioral Sciences 154 ( 2014 )

Thornhill Primary School - Grammar coverage Year 1-6

The Evolution of Random Phenomena

Product Feature-based Ratings foropinionsummarization of E-Commerce Feedback Comments

An Interactive Intelligent Language Tutor Over The Internet

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

Author: Justyna Kowalczys Stowarzyszenie Angielski w Medycynie (PL) Feb 2015

What the National Curriculum requires in reading at Y5 and Y6

STT 231 Test 1. Fill in the Letter of Your Choice to Each Question in the Scantron. Each question is worth 2 point.

Tracy Dudek & Jenifer Russell Trinity Services, Inc. *Copyright 2008, Mark L. Sundberg

EdIt: A Broad-Coverage Grammar Checker Using Pattern Grammar

Words come in categories

Specifying a shallow grammatical for parsing purposes

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

What Can Neural Networks Teach us about Language? Graham Neubig a2-dlearn 11/18/2017

PROBLEMS IN ADJUNCT CARTOGRAPHY: A CASE STUDY NG PEI FANG FACULTY OF LANGUAGES AND LINGUISTICS UNIVERSITY OF MALAYA KUALA LUMPUR

Building an HPSG-based Indonesian Resource Grammar (INDRA)

Proof Theory for Syntacticians

Controlled vocabulary

Machine Learning from Garden Path Sentences: The Application of Computational Linguistics

Programma di Inglese

A General Class of Noncontext Free Grammars Generating Context Free Languages

The Internet as a Normative Corpus: Grammar Checking with a Search Engine

CAS LX 522 Syntax I. Long-distance wh-movement. Long distance wh-movement. Islands. Islands. Locality. NP Sea. NP Sea

Language Acquisition Fall 2010/Winter Lexical Categories. Afra Alishahi, Heiner Drenhaus

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

cmp-lg/ Jan 1998

Underlying and Surface Grammatical Relations in Greek consider

L1 and L2 acquisition. Holger Diessel

Subject: Opening the American West. What are you teaching? Explorations of Lewis and Clark

Introduction, Organization Overview of NLP, Main Issues

Transcription:

Context Free Grammars Many slides from Michael Collins

Overview I An introduction to the parsing problem I Context free grammars I A brief(!) sketch of the syntax of English I Examples of ambiguous structures

Parsing (yntactic tructure) IUT: OUTPUT: Boeing is located in eattle. N V Boeing is V PP located P in N eattle

yntactic Formalisms I Work in formal syntax goes back to Chomsky s PhD thesis in the 1950s I Examples of current formalisms: minimalism, lexical functional grammar (LFG), head-driven phrase-structure grammar (HPG), tree adjoining grammars (TAG), categorial grammars

Data for Parsing Experiments I Penn WJ Treebank = 50,000 sentences with associated trees I Usual set-up: 40,000 training sentences, 2400 test sentences An example tree: TOP N N VBD PP PP AD IN CD NN IN RB PP QP PRP$ JJ NN CC JJ NN NN IN $ CD CD PUNC, BAR N PUNC, WHAD WRB DT NN VBZ QP NN PUNC. RB CD Canadian Utilities had 1988 revenue of C$ 1.16 billion, mainly from its natural gas and electric utility businessesin Alberta, where the company serves about 800,000 customers.

The Information Conveyed by Parse Trees (1) Part of speech for each word (N = noun, V = verb, DT = determiner) DT N V the burglar robbed DT N the apartment

The Information Conveyed by Parse Trees (continued) (2) Phrases DT N V the burglar robbed DT N the apartment Noun Phrases (): the burglar, the apartment Verb Phrases (): robbed the apartment entences (): the burglar robbed the apartment

The Information Conveyed by Parse Trees (continued) (3) Useful Relationships subject V verb DT N V the burglar robbed DT N ) the burglar is the subject of robbed the apartment

An Example Application: Machine Translation I English word order is I Japanese word order is subject verb object subject object verb English: Japanese: English: Japanese: IBM bought Lotus IBM Lotus bought ources said that IBM bought Lotus yesterday ources yesterday IBM Lotus bought that said

-A ources, BAR-A, VB said COMP that yesterday -A IBM -A, VB Lotus bought

Overview I An introduction to the parsing problem I Context free grammars I A brief(!) sketch of the syntax of English I Examples of ambiguous structures

Context-Free Grammars Hopcroft and Ullman, 1979 A context free grammar G =(N,,R,) where: I N is a set of non-terminal symbols I is a set of terminal symbols I R is a set of rules of the form X! Y 1 Y 2...Y n for n 0, X 2 N, Y i 2 (N [ ) I 2 N is a distinguished start symbol

A Context-Free Grammar for English N = {,,, PP, DT, Vi, Vt, NN, IN} = = {sleeps, saw, man, woman, telescope, the, with, in} R =!! Vi! Vt! PP! DT NN! PP PP! IN Vi! sleeps Vt! saw NN! man NN! woman NN! telescope DT! the IN! with IN! in Note: =sentence, =verb phrase, =noun phrase, PP=prepositional phrase, DT=determiner, Vi=intransitive verb, Vt=transitive verb, NN=noun, IN=preposition

Left-Most Derivations A left-most derivation is a sequence of strings s 1...s n, where I s 1 =, the start symbol I s n 2, i.e. s n is made up of terminal symbols only I Each s i for i =2...n is derived from s i 1 by picking the left-most non-terminal X in s i 1 and replacing it by some where X! is a rule in R For example: [], [ ], [D N ], [the N ], [the man ], [the man Vi], [the man sleeps] Representation of a derivation as a tree: D the N man Vi sleeps

An Example DERIVATION RULE UED

An Example DERIVATION RULE UED!

An Example DERIVATION DT N RULE UED!! DT N

An Example DERIVATION DT N the N RULE UED!! DT N DT! the

An Example DERIVATION DT N the N the dog RULE UED!! DT N DT! the N! dog

An Example DERIVATION DT N the N the dog the dog VB RULE UED!! DT N DT! the N! dog! VB

An Example DERIVATION DT N the N the dog the dog VB the dog laughs RULE UED!! DT N DT! the N! dog! VB VB! laughs

An Example DERIVATION DT N the N the dog the dog VB the dog laughs RULE UED!! DT N DT! the N! dog! VB VB! laughs DT N the dog VB laughs

Properties of CFGs I A CFG defines a set of possible derivations I A string s 2 is in the language defined by the CFG if there is at least one derivation that yields s I Each string in the language generated by the CFG may have more than one derivation ( ambiguity )

An Example of Ambiguity he PP VB PP IN drove IN down DT NN in DT the NN car the street

An Example of Ambiguity (continued) he VB PP drove IN down PP DT NN IN the street in DT NN the car

The Problem with Parsing: Ambiguity IUT: he announced a program to promote safety in trucks and vans POIBLE OUTPUT: + he he he he announced he announced announced he announced a program announced a program announced PP to promote safety PP a program to promote safety in PP a program in trucks and vans in to promote trucks and vans to promote safety trucks and vans and vans and and vans a program safety PP in vans a program to promote PP to promote trucks safety in safety PP trucks in trucks And there are more...

Overview I An introduction to the parsing problem I Context free grammars I A brief(!) sketch of the syntax of English I Examples of ambiguous structures

Product Details (from Amazon) Hardcover: 1779 pages Publisher: Longman; 2nd Revised edition Language: English IBN-10: 0582517346 IBN-13: 978-0582517349 Product Dimensions: 8.4 x 2.4 x 10 inches hipping Weight: 4.6 pounds

A Brief Overview of English yntax Parts of peech (tags from the Brown corpus): I Nouns NN = singular noun e.g., man, dog, park NN = plural noun e.g., telescopes, houses, buildings N = proper noun e.g., mith, Gates, IBM I Determiners DT = determiner e.g., the, a, some, every I Adjectives JJ = adjective e.g., red, green, large, idealistic

AFragmentofaNounPhraseGrammar N ) NN N ) NN N N ) JJ N N ) N N ) DT N NN ) box NN ) car NN ) mechanic NN ) pigeon DT ) the DT ) a JJ ) fast JJ ) metal JJ ) idealistic JJ ) clay

Prepositions, and Prepositional Phrases I Prepositions IN = preposition e.g., of, in, out, beside, as

An Extended Grammar N ) NN N ) NN N N ) JJ N N ) N N ) DT N PP ) IN N ) N PP NN ) box NN ) car NN ) mechanic NN ) pigeon DT ) the DT ) a JJ ) fast JJ ) metal JJ ) idealistic JJ ) clay IN ) in IN ) under IN ) of IN ) on IN ) with IN ) as Generates: in a box, under the box, the fast car mechanic under the pigeon in the box,...

Verbs, Verb Phrases, and entences I Basic Verb Types Vi = Intransitive verb Vt = Transitive verb Vd = Ditransitive verb e.g., sleeps, walks, laughs e.g., sees, saw, likes e.g., gave I Basic Rules! Vi! Vt! Vd I Basic Rule! Examples of : sleeps, walks, likes the mechanic, gave the mechanic the fast car Examples of : the man sleeps, the dog walks, the dog gave the mechanic the fast car

PPs Modifying Verb Phrases Anewrule:! PP New examples of : sleeps in the car, walks like the mechanic, gave the mechanic the fast car on Tuesday,...

Complementizers, and BARs I Complementizers COMP = complementizer e.g., that I BAR ubordinate clause BAR! COMP Examples: that the man sleeps, that the mechanic saw the dog...

More Verbs I New Verb Types V[5] e.g., said, reported V[6] e.g., told, informed V[7] e.g., bet I New Rules! V[5] BAR! V[6] BAR! V[7] BAR Examples of New s: said that the man sleeps told the dog that the mechanic likes the pigeon bet the pigeon $50 that the mechanic owns a fast car

Coordination I A New Part-of-peech: CC = Coordinator e.g., and, or, but I New Rules! CC N! N CC N! CC! CC BAR! BAR CC BAR

We ve Only cratched the urface... I Agreement The dogs laugh vs. The dog laughs I Wh-movement Long- distance dependency The dog that the cat liked I Active vs. passive The dog saw the cat vs. The cat was seen by the dog I If you re interested in reading more: yntactic Theory: A Formal Introduction, 2nd Edition. Ivan A. ag, Thomas Wasow, and Emily M. Bender.

Overview I An introduction to the parsing problem I Context free grammars I A brief(!) sketch of the syntax of English I Examples of ambiguous structures

ources of Ambiguity I Part-of-peech ambiguity NN! duck Vi! duck PP PP Vt IN V IN saw PRP NN with the telescope saw with the telescope her duck her Vi duck

I PP Vi PP IN drove IN down DT NN in DT the NN car the road

I Vi PP drove IN down PP DT NN IN the road in DT NN the car

Two analyses for: John was believed to have been shot by Bill With the same set of grammar rules

ources of Ambiguity: Noun Premodifiers I Noun premodifiers: D N D N the JJ N the N N fast NN N JJ N NN car NN fast NN mechanic mechanic car