Computational Semantics

Similar documents
Control and Boundedness

Parsing of part-of-speech tagged Assamese Texts

LTAG-spinal and the Treebank

Compositional Semantics

Developing a TT-MCTAG for German with an RCG-based 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

CS 598 Natural Language Processing

Efficient Normal-Form Parsing for Combinatory Categorial Grammar

Proof Theory for Syntacticians

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

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

Prediction of Maximal Projection for Semantic Role Labeling

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

Context Free Grammars. Many slides from Michael Collins

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

"f TOPIC =T COMP COMP... OBJ

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

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

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

Chapter 4: Valence & Agreement CSLI Publications

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

Grammars & Parsing, Part 1:

Argument structure and theta roles

Pre-Processing MRSes

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

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

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

The Discourse Anaphoric Properties of Connectives

Some Principles of Automated Natural Language Information Extraction

The Interface between Phrasal and Functional Constraints

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

SEMAFOR: Frame Argument Resolution with Log-Linear Models

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

Natural Language Processing. George Konidaris

Constraining X-Bar: Theta Theory

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

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

Pseudo-Passives as Adjectival Passives

Ch VI- SENTENCE PATTERNS.

Specifying Logic Programs in Controlled Natural Language

Surface Structure, Intonation, and Meaning in Spoken Language

Update on Soar-based language processing

Accurate Unlexicalized Parsing for Modern Hebrew

Type-driven semantic interpretation and feature dependencies in R-LFG

Theoretical Syntax Winter Answers to practice problems

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

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

Som and Optimality Theory

Intra-talker Variation: Audience Design Factors Affecting Lexical Selections

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

Words come in categories

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

The Strong Minimalist Thesis and Bounded Optimality

cambridge occasional papers in linguistics Volume 8, Article 3: 41 55, 2015 ISSN

Specifying a shallow grammatical for parsing purposes

LFG Semantics via Constraints

arxiv:cmp-lg/ v1 16 Aug 1996

Adapting Stochastic Output for Rule-Based Semantics

Ensemble Technique Utilization for Indonesian Dependency Parser

Structure and Intonation in Spoken Language Understanding

Analysis of Probabilistic Parsing in NLP

Hindi-Urdu Phrase Structure Annotation

University of Edinburgh. University of Pennsylvania

Segmented Discourse Representation Theory. Dynamic Semantics with Discourse Structure

Multiple case assignment and the English pseudo-passive *

UCLA UCLA Electronic Theses and Dissertations

SOME MINIMAL NOTES ON MINIMALISM *

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

Hyperedge Replacement and Nonprojective Dependency Structures

A relational approach to translation

BANGLA TO ENGLISH TEXT CONVERSION USING OPENNLP TOOLS

Citation for published version (APA): Veenstra, M. J. A. (1998). Formalizing the minimalist program Groningen: s.n.

Annotation Projection for Discourse Connectives

Chapter 3: Semi-lexical categories. nor truly functional. As Corver and van Riemsdijk rightly point out, There is more

Types and Lexical Semantics

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

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

An Introduction to the Minimalist Program

A First-Pass Approach for Evaluating Machine Translation Systems

Underlying and Surface Grammatical Relations in Greek consider

Feature-Based Grammar

How to analyze visual narratives: A tutorial in Visual Narrative Grammar

Hindi Aspectual Verb Complexes

Language properties and Grammar of Parallel and Series Parallel Languages

Construction Grammar. University of Jena.

An Interactive Intelligent Language Tutor Over The Internet

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

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

Which verb classes and why? Research questions: Semantic Basis Hypothesis (SBH) What verb classes? Why the truth of the SBH matters

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

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

A Grammar for Battle Management Language

A Computational Evaluation of Case-Assignment Algorithms

Intension, Attitude, and Tense Annotation in a High-Fidelity Semantic Representation

The semantics of case *

Extracting Opinion Expressions and Their Polarities Exploration of Pipelines and Joint Models

Character Stream Parsing of Mixed-lingual Text

Dual Content Semantics, privative adjectives, and dynamic compositionality

AQUA: An Ontology-Driven Question Answering System

Focusing bound pronouns

Transcription:

Computational Semantics Introduction to Natural Language Processing Computer Science 585 Fall 2009 University of Massachusetts Amherst David Smith with slides from Dan Klein, Stephen Clark & Eva Banik 1

Overview Last time: What is semantics? First order logic and lambda calculus for compositional semantics Today: How do we infer semantics? Minimalist approach Semantic role labeling Semantically informed grammar Combinatory categorial grammar (CCG) Tree adjoining grammar (TAG) 2

Semantic Role Labeling Characterize predicates (e.g., verbs, nouns, adjectives) as relations with roles (slots) [Judge She] blames [Evaluee the Government] [Reason for failing to do enough to help]. Holman would characterize this as blaming [Evaluee the poor]. The letter quotes Black as saying that [Judge white and Navajo ranchers] misrepresent their livestock losses and blame [Reason everything] [Evaluee on coyotes]. We want a bit more than which NP is the subject (but not much more): Relations like subject are syntactic, relations like agent or experiencer are semantic (think of passive verbs) Typically, SRL is performed in a pipeline on top of constituency or dependency parsing and is much easier than parsing. 3

SRL Example 4

PropBank Example 5

PropBank Example 6

PropBank Example 7

Shared Arguments 8

Path Features 9

SRL Accuracy Features Path from target to role-filler Filler s syntactic type, headword, case Target s identity Sentence voice, etc. Lots of other second-order features Gold vs. parsed source trees SRL is fairly easy on gold trees Harder on automatic parses Joint inference of syntax and semantics not a helpful as expected 10

Interaction with Empty Elements 11

Empty Elements In Penn Treebank, 3 kinds of empty elem. Null items Movement traces (WH, topicalization, relative clause and heavy NP extraposition) Control (raising, passives, control, shared arguments) Semantic interpretation needs to reconstruct these and resolve indices 12

English Example 13

German Example 14

Combinatory Categorial Grammar 15

Combinatory Categorial Grammar (CCG) Categorial grammar (CG) is one of the oldest grammar formalisms Combinatory Categorial Grammar now well established and computationally well founded (Steedman, 1996, 2000) Account of syntax; semantics; prodody and information structure; automatic parsers; generation 16

Combinatory Categorial Grammar (CCG) CCG is a lexicalized grammar An elementary syntactic structure for CCG a lexical category is assigned to each word in a sentence walked: S\NP give me an NP to my left and I return a sentence A small number of rules define how categories can combine Rules based on the combinators from Combinatory Logic 17

CCG Lexical Categories Atomic categories: S, N, NP, PP,... (not many more) Complex categories are built recursively from atomic categories and slashes, which indicate the directions of arguments Complex categories encode subcategorisation information intransitive verb: S \NP walked transitive verb: (S \NP )/NP respected ditransitive verb: ((S \NP )/NP )/NP gave Complex categories can encode modification PP nominal: (NP \NP )/NP PP verbal: ((S \NP )\(S \NP ))/NP 18

Simple CCG Derivation interleukin 10 inhibits production NP (S\NP)/NP NP S S\NP > < > forward application < backward application 19

Function Application Schemata Forward (>) and backward (<) application: X /Y Y X (>) Y X \Y X (<) 20

Classical Categorial Grammar Classical Categorial Grammar only has application rules Classical Categorial Grammar is context free S S\NP NP (S\NP)/NP NP interleukin-10 inhibits production 21

Classical Categorial Grammar Classical Categorial Grammar only has application rules Classical Categorial Grammar is context free S VP NP V NP interleukin-10 inhibits production 22

Extraction out of a Relative Clause The company which Microsoft bought NP/N N (NP\NP)/(S/NP) NP (S\NP)/NP NP S/(S\NP) S/NP NP\NP NP > T type-raising > B forward composition Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 23

Extraction out of a Relative Clause The company which Microsoft bought NP/N N (NP\NP)/(S/NP) NP (S\NP)/NP NP > T type-raising NP >T S/(S\NP) S/NP NP\NP Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 24

Extraction out of a Relative Clause The company which Microsoft bought NP/N N (NP\NP)/(S/NP) NP (S\NP)/NP NP NP > T type-raising > B forward composition >T S/(S\NP) NP\NP S/NP >B Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 25

Extraction out of a Relative Clause The company which Microsoft bought NP/N N (NP\NP)/(S/NP) NP (S\NP)/NP >T S/(S\NP) S/NP >B > NP\NP NP Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 26

Extraction out of a Relative Clause The company which Microsoft bought NP/N N (NP\NP)/(S/NP) NP (S\NP)/NP NP > >T S/(S\NP) NP\NP NP S/NP < >B > Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 27

Forward Composition and Type-Raising Forward composition (> B ): X /Y Y/Z X /Z (> B ) Type-raising (T): X T /(T \X ) (> T ) X T \(T /X ) (< T ) Extra combinatory rules increase the weak generative power to mild context -sensitivity Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 28

Non-constituents in ccg Right Node Raising Google sells but Microsoft buys shares NP (S\NP)/NP conj NP (S\NP)/NP NP S/(S\NP) S/NP >T >T > T type-raising S/(S\NP) S/NP S/NP S Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 29

Non-constituents in ccg Right Node Raising Google sells but Microsoft buys shares NP (S\NP)/NP conj NP (S\NP)/NP NP S/(S\NP) >T >T S/NP > T type-raising > B forward composition S/(S\NP) >B >B S/NP S S/NP Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 30

Non-constituents in ccg Right Node Raising Google sells but Microsoft buys shares NP (S\NP)/NP conj NP (S\NP)/NP NP S/(S\NP) >T >T S/NP S/(S\NP) >B >B S/NP S S/NP <Φ> Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 31

Non-constituents in ccg Right Node Raising Google sells but Microsoft buys shares NP (S\NP)/NP conj NP (S\NP)/NP NP S/(S\NP) >T >T S/NP S/(S\NP) >B >B S/NP S S/NP <Φ> > Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 32

Combinatory Categorial Grammar ccg is mildly context sensitive Natural language is provably non-context free Constructions in Dutch and Swiss German (Shieber, 1985) require more than context free power for their analysis these have crossing dependencies (which ccg can handle) Type 0 languages Context sensitive languages Mildly context sensitive languages = natural languages (?) Context free languages Regular languages Stephen Clark Practical Linguistically Motivated Parsing JHU, June 2009 33

CCG Semantics Categories encode argument sequences Parallel syntactic combinator operations and lambda calculus semantic operations 34

CCG Semantics Left arg. Right arg. Operation Result X/Y : f Y : a Forward application X : f(a) Y : a X\Y : f Backward application X : f(a) X/Y : f Y/Z : g Forward composition X/Z : λx.f(g(x)) X : a Type raising T/(T\X) : λf.f(a) etc. 35

Tree Adjoining Grammar 36

TAG Building Blocks Elementary trees (of many depths) Substitution at Tree Substitution Grammar equivalent to CFG α 3 NP peanuts α 1 NP Harry α 2 S NP VP V likes NP 37

TAG Building Blocks Auxiliary trees for adjunction Adds extra power beyond CFG α 1 NP Harry α 2 S NP VP V likes NP α 3 NP peanuts β VP VP* Adv passionately 38

Derivation Tree Derived Tree α 2 Harry α 1 likes β passionately α 3 peanuts NP Harry S VP 1 VP 2 V NP Adv passionately likes peanuts Semantics Harry(x) likes(e, x, y) peanuts(y) passionately(e) 4 39

Semantic representation - derived or derivation tree? Derived tree not monotonic (e.g. immediate domination) contains nodes that are not needed for semantics Derivation tree in TAG shows what elementary and auxiliary trees were used how the trees were combined where the trees were adjoined / substituted Derivation tree provides a natural representation for compositional semantics 5 40

Elementary Semantic Representations description of meaning (conjunction of formulas) list of argument variables β say S NP VP V S say say(e 1, x, e 2 ) arg: < x, 00 >, < e 2, 011 > 10 41

Composition of Semantic Representations sensitive to way of composition indicated in the derivation tree sensitive to order of traversal Substitution: a new argument is inserted in σ(α) unify the variable corresponding to the argument node (e.g. x in thought(e, x)) with the variable in the substituted tree (e.g. NP: P eter(x 5 )) semantic representations are merged 11 42

Adjoining: σ(β) applied to σ(α) predicate: semantic representation of adjoined auxiliary tree argument: a variable in the host tree 12 43

Harry likes peanuts passionately. Harry(x) arg: - likes(e, x, y) arg: < x, 00 >, < y, 011 > peanuts(y) arg: - passionately(e) arg: e Result: likes(e, x, y) Harry(x) peanuts(y) passionately(e) arg: - 13 44

Extensions and Multi-Component LTAG To what extent can we obtain a compositional semantics by using derivation trees? Problem: Representation of Scope Every boy saw a girl. (suppose there are 5 boys in the world, how many girls have to exist for the sentence to be true?) 14 45

Quantifiers have two parts: predicate-argument structure scope information The two parts don t necessarily stay together in the final semantic representation. 15 46

Multi-Component Lexicalized Tree Adjoining Grammar Building blocks are sets of trees (roughly corresponding to split-up LTAG elementary trees) Locality constraint: a multi-component elementary tree has to be combined with only one elementary tree (tree locality; Tree local MC-TAG is as powerful as LTAG) We use at most two components in each set Constraint on multiple adjunction 16 47

Representation of Quantifiers in MC-TAG β 1 α 4 S, NP Det every N 17 48

Derivation Tree with Two Quantifiers - underspecified scope Some student loves every course. β 1 0 00 011 0 α 4 α 1 α 2 α 3 01 01 α 5 β 2 18 49

CCG & TAG Lexicon is encoded as combinators or trees Extended domain of locality: information is localized in the lexicon and spread out during derivation Greater than context-free power; polynomial-time parsing; O(n 5 ) and up Spurious ambiguity: multiple derivations for a single derived tree 50