Natural Language Processing

Similar documents
Context Free Grammars. Many slides from Michael Collins

CS 598 Natural Language Processing

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

Grammars & Parsing, Part 1:

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

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

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

Natural Language Processing. George Konidaris

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

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

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

Parsing of part-of-speech tagged Assamese Texts

Construction Grammar. University of Jena.

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

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

Argument structure and theta roles

Constraining X-Bar: Theta Theory

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

LTAG-spinal and the Treebank

Proof Theory for Syntacticians

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

Compositional Semantics

BANGLA TO ENGLISH TEXT CONVERSION USING OPENNLP TOOLS

Language acquisition: acquiring some aspects of syntax.

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

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

Developing Grammar in Context

Chapter 4: Valence & Agreement CSLI Publications

Control and Boundedness

Accurate Unlexicalized Parsing for Modern Hebrew

LNGT0101 Introduction to Linguistics

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

Ch VI- SENTENCE PATTERNS.

Sight Word Assessment

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

Parsing natural language

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

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

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

The Interface between Phrasal and Functional Constraints

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

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

Name: Class: Date: ID: A

The stages of event extraction

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

Ensemble Technique Utilization for Indonesian Dependency Parser

Words come in categories

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

Some Principles of Automated Natural Language Information Extraction

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

Aspectual Classes of Verb Phrases

The Structure of Relative Clauses in Maay Maay By Elly Zimmer

Hindi Aspectual Verb Complexes

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

EdIt: A Broad-Coverage Grammar Checker Using Pattern Grammar

"f TOPIC =T COMP COMP... OBJ

Prediction of Maximal Projection for Semantic Role Labeling

A Usage-Based Approach to Recursion in Sentence Processing

GERM 3040 GERMAN GRAMMAR AND COMPOSITION SPRING 2017

Korean ECM Constructions and Cyclic Linearization

Unit 8 Pronoun References

Analysis of Probabilistic Parsing in NLP

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

Pseudo-Passives as Adjectival Passives

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

Building an HPSG-based Indonesian Resource Grammar (INDRA)

Theoretical Syntax Winter Answers to practice problems

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

Basic: Question Words: Who, What, Where, When week 1

Controlled vocabulary

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

Using dialogue context to improve parsing performance in dialogue systems

The building blocks of HPSG grammars. Head-Driven Phrase Structure Grammar (HPSG) HPSG grammars from a linguistic perspective

Sleeping Coconuts Cluster Projects

AQUA: An Ontology-Driven Question Answering System

SINGLE DOCUMENT AUTOMATIC TEXT SUMMARIZATION USING TERM FREQUENCY-INVERSE DOCUMENT FREQUENCY (TF-IDF)

a) analyse sentences, so you know what s going on and how to use that information to help you find the answer.

Multiple case assignment and the English pseudo-passive *

A Grammar for Battle Management Language

Underlying and Surface Grammatical Relations in Greek consider

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

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

Hindi-Urdu Phrase Structure Annotation

L1 and L2 acquisition. Holger Diessel

Som and Optimality Theory

On the Notion Determiner

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

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

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

SAMPLE PAPER SYLLABUS

6.863J Natural Language Processing Lecture 12: Featured attraction. Instructor: Robert C. Berwick

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

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

Hyperedge Replacement and Nonprojective Dependency Structures

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

An Interactive Intelligent Language Tutor Over The Internet

SEMAFOR: Frame Argument Resolution with Log-Linear Models

Psychology and Language

Probabilistic Latent Semantic Analysis

COMPUTATIONAL COMPLEXITY OF LEFT-ASSOCIATIVE GRAMMAR

Transcription:

Natural Language Processing Syntactic Parsing Based on slides from Yoav Goldberg, Jason Eisner, Michael Collins, Shuli Wintner

Final project Project proposals: 20/5 Class presentations: last two classes 20/6 and 27/6 Final project due: 10/9 ACL style paper (8 pages double column) Code + documentation that allows to easily re-produce all empirical results (consider using coda lab)

So far Word vectors Language modeling n-gram models neural models Tagging HMMs locally-normalized linear models globally-normalized linear models Deep learning models: replace linear scoring function with non-linear neural network

Plan for today - syntax Grammars Parsing Context-free grammars The syntax of English

Grammars

What are grammars? set of structural rules governing the composition of clauses, phrases, and words in any given natural language... Formalism A method for describing the structure of language (CFG, TAG, HPSG, LFG, ) Instance An implementation of a formalism in a particular language Defines the (infinite set of grammatical sentences)

Sequence model? Subject Verb Object {I, you, we, } {eat, drink, } {sushi, pizza, } Undergeneration: I sleep Overgeneration: I sleep sushi, I drink pizza Subcategorization: different verbs take a different number of arguments Selectional perference: verb take certain types for semantic arguments

Sequence model? {sleep, yawn, } Intrans. verb Subject Trans. verb Object {I, you, we, } {eat, drink, } {sushi, pizza, }

Language is recursive the ball the big ball the big red ball the big red heavy ball Nouns can take an infinite number of adjectives *English is weird about adjective order (opinion, size, shape, age, color, nationality material) the big round old red house the red old round big house

Recursive sequence model Det. Adj. Noun {the, a, } {red, big, } {house, chair, }

Hierarchical recursive structure the cat likes tuna the cat the dog chased likes tuna the cat the dog the rat bit chased likes tuna the cat the dog the rat the elephant admired bit chased likes tuna a n b n construction (not a regular langauge) Competence vs. performance (Chomsky): Competence: idealized capacity Performance: what we actually utter Example from Shuli Wintner

Context-free? Chomsky (1957): English is not a regular language As for context-free languages, I do not know whether or not English is itself literally outside the range of such analyses Jan sait das (Jan said that):...mer d'chind em Hans es huus lönd hälfe aastriiche we the children-acc Hans-DAT house-acc let help paint...we let the children help Hans paint the house.

Johnson, 1965 Language has structure Subjects asked to memorize sentences Probability of error related to phrase structure Conclusion: our representation will be hierarchical

Strong vs. weak capacity Formal language theory: Language is a set of strings We can about generating the right set Formal syntax: Language is a set of strings with structure We care about strings having the right structure

Constituency vs. dependency S NP VP like NN NNS VB NP flies banana fruit flies like DT NN fruit a a banana Constituency: words are leaves with part-of-speech tags as parents. Other nodes are syntactic categories Dependency: All nodes are words. Each word is a modifier to a single head

Parsing

Goal Input: sentence S Fruit flies like an arrow NP VP Output: constituency parse tree NN NNS VB NP fruit flies like DT NN Method: supervised learning a banana Given (x,y) pairs of sentences and parse trees, learn a mapping from sentences to parse trees

What is it good for? Information extraction Question answering

What is it good for? Summarization/simplification The first new product, ATF Protype, is a line of digital postscript typefaces that will be sold in packages of up to six fonts. ATF Protype is a line of digital postscript typefaces that will be sold in packages of up to six fonts.

What is it good for? Machine translation: re-ordering of parse trees for English- Japanese translation [SUBJECT] + TIME + PLACE/IMPLEMENT + INDIRECT OBJECT + OBJECT + ACTION VERB Sources said that IBM bought Lotus yesterday Sources yesterday IBM Lotus bought that said

Why is it hard? Real sentences are long: Former Beatle Paul McCartney today was ordered to pay nearly $50M to his estranged wife as their bitter divorce battle came to an end. Welcome to our Columbus hotels guide, where you ll find honest, concise hotel reviews, all discounts, a lowest rate guarantee, and no booking fees.

Why is it hard? Ambiguities: prepositional attachment S NP VP S PRP VBD NP NP VP I saw DT NP PRP VBD NP PP the NN PP I saw DT NN IN NP man IN NP the man with DT NN with DT NN the telescope the telescope

Why is it hard? Ambiguities: NP NP DT NP DT NP the JJ NP the NP NN fast NN NN JJ NN mechanic car mechanic fast car

Why is it hard? Ambiguities: She announced a program to promote safety in trucks and vans

Context-free grammars

Context-free grammars A context-free grammar (CFG) is a 4-tuple G =(N,,R,S): N is a set of non-terminal symbols is a set of terminal symbols R is a set of rules X! Y 1 Y 2...Y n,n 0,X 2 N,Y i 2 N [ S 2 N is a special start symbol

Example N = {S, NP, VP, PP, DT, Vi, Vt, NN, IN} Σ = {sleeps, saw, man, woman, telescope, the, with, in} R: S > NP VP Vi > sleeps VP > Vi Vt > saw VP > Vt NP NN > man VP > VP PP NN > woman NP > DT NN NN > telescope NP > NP PP DT > the PP > IN NP IN > with IN > in

Left-most derivations Sequence of strings s1 sn, where s1=s sn is a string in Σ* Each si for i=2 n is derived from si-1 by picking the left-most non-terminal X in si-1 and replacing it by some β where X > β is a rule in R

Example Derivation Rule s 1 S S! NP VP s 2 NP VP NP! DT NN s 3 DT NN V P DT! the s 4 the NN VP NN! dog s 5 the dog VP VP! VB s 6 the dog VBZ VBZ! laughs s 7 the dog laughs S NP DT NN the dog VP VBZ laughs

Properties of CFGs A CFG defines a set of derivations A string is in the language if there is a derivations that yields it Ambiguity is when the same string can be derived in multiple ways with left-most derivations

The syntax of English

English syntax Parts-of-speech (saw that already)

Noun phrase grammar Ñ > NN NN > box Ñ > NN Ñ NN > car Ñ > JJ Ñ NN > mechanic Ñ > Ñ Ñ NN > pigeon NP > DT Ñ DT > the DT > a JJ > fast JJ > metal JJ > idealistic JJ > clay We can generate: the car, the fast car, the fast metal car the car mechanic, the fast car mechanic

Prepositions Ñ > NN NN > box Ñ > NN Ñ NN > car Ñ > JJ Ñ NN > mechanic Ñ > Ñ Ñ NN > pigeon NP > DT Ñ DT > the PP > IN NP DT > a Ñ > Ñ PP JJ > fast JJ > metal JJ > idealistic JJ > clay IN > in under We can generate: the fast car mechanic under the pigeon in the box

Verbs, verb phrases and sentences Verb types Vi: intransitive verbs (sleeps, walks, yawns) Vt: transitive verbs (see, like, hug, kiss) Vd: ditransitive verbs (give, send) VP rule VP > Vi VP > Vt NP VP > Vd NP NP Sentence rule S > NP VP The dog gave the mechanic the fast car

PPs modifying verb phrases VP >VP PP sleeps in the car, walks like the mechanic, gave the mechanic the fast car on Tuesday

Complementizer and SBARs COMP > that which SBAR > COMP S that the man sleeps, that the mechanic saw the dog

More verb types V[5] >said reported V[6] >told informed V[7] >bet VP > V[5] SBAR VP > V[6] NP SBAR VP > V[7] NP NP SBAR 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 CC > and or but NP > NP CC NP Ñ > Ñ and Ñ VP > VP CC VP S > S CC S SBAR > SBAR CC SBAR

There s more Agreement the dog laughs vs. the dogs laugh Wh-movement The dog that the cat liked Active vs. passive the dog saw the cat vs. the cat was seen by the dog