October 2004CSA4050: Semantics III1 CSA4050: Advanced Topics in NLP Semantics III Quantified Sentences.

Slides:



Advertisements
Similar presentations
Problems of syntax-semantics interface ESSLLI 02 Trento.
Advertisements

Computational Semantics Aljoscha Burchardt, Alexander Koller, Stephan Walter, Universität des Saarlandes,
October 2004CSA4050: Semantics III1 CSA4050: Advanced Topics in NLP Semantics III Quantified Sentences.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Natural Language Processing Lecture 2: Semantics.
November 2008NLP1 Natural Language Processing Definite Clause Grammars.
CSA2050: DCG I1 CSA2050 Introduction to Computational Linguistics Lecture 8 Definite Clause Grammars.
First-Order Logic (and beyond)
07/05/2005CSA2050: DCG31 CSA2050 Introduction to Computational Linguistics Lecture DCG3 Handling Subcategorisation Handling Relative Clauses.
CSA4050: Advanced Topics in NLP Semantics IV Partial Execution Proper Noun Adjective.
Semantics (Representing Meaning)
Semantic Analysis Read J & M Chapter 15.. The Principle of Compositionality There’s an infinite number of possible sentences and an infinite number of.
CSA2050: DCG IV1 CSA2050: Definite Clause Grammars IV Handling Gaps II Semantic Issues.
April 2010CSA50061 Logic, Representation and Inference Simple Question Answering NL Access to Databases Semantics of Questions and Answers Simple Interpreters.
DEFINITE CLAUSE GRAMMARS Ivan Bratko University of Ljubljana Faculty of Computer and Information Sc.
CAS LX 502 8a. Formal semantics Truth and meaning The basis of formal semantics: knowing the meaning of a sentence is knowing under what conditions.
LING 388: Language and Computers Sandiway Fong Lecture 15.
Linguistic Theory Lecture 8 Meaning and Grammar. A brief history In classical and traditional grammar not much distinction was made between grammar and.
LTAG Semantics on the Derivation Tree Presented by Maria I. Tchalakova.
Natural Language Processing - Feature Structures - Feature Structures and Unification.
NLP and Speech Course Review. Morphological Analyzer Lexicon Part-of-Speech (POS) Tagging Grammar Rules Parser thethe – determiner Det NP → Det.
NLP and Speech 2004 Feature Structures Feature Structures and Unification.
Meaning Representation and Semantic Analysis Ling 571 Deep Processing Techniques for NLP February 9, 2011.
LING 364: Introduction to Formal Semantics Lecture 10 February 14th.
LING 364: Introduction to Formal Semantics Lecture 9 February 9th.
Parsing: Features & ATN & Prolog By
LING 364: Introduction to Formal Semantics
Artificial Intelligence 2005/06 From Syntax to Semantics.
LING 364: Introduction to Formal Semantics Lecture 4 January 24th.
CS 4705 Lecture 17 Semantic Analysis: Syntax-Driven Semantics.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Natural Language Query Interface Mostafa Karkache & Bryce Wenninger.
LING 364: Introduction to Formal Semantics Lecture 5 January 26th.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong 1.
February 2009Introduction to Semantics1 Logic, Representation and Inference Introduction to Semantics What is semantics for? Role of FOL Montague Approach.
October 2004csa4050: Semantics II1 CSA4050: Advanced Topics in NLP Semantics II The Lambda Calculus Semantic Representation Encoding in Prolog.
Prolog for Linguists Symbolic Systems 139P/239P John Dowding Week 7, November 12, 2001
LING 388: Language and Computers Sandiway Fong Lecture 17.
October 2008csa3180: Setence Parsing Algorithms 1 1 CSA350: NLP Algorithms Sentence Parsing I The Parsing Problem Parsing as Search Top Down/Bottom Up.
October 2004CSA4050 Advanced Techniques in NLP 1 CSA4050: Advanced Topics in NLP Semantics 6 Semantics of Questions and Assertions involving Quantification.
IV. SYNTAX. 1.1 What is syntax? Syntax is the study of how sentences are structured, or in other words, it tries to state what words can be combined with.
November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.
Semantic Analysis CMSC Natural Language Processing May 8, 2003.
Today Phrase structure rules, trees Constituents Recursion Conjunction
Computing Science, University of Aberdeen1 CS4025: Logic-Based Semantics l Compositionality in practice l Producing logic-based meaning representations.
Artificial Intelligence: Natural Language
CSA2050 Introduction to Computational Linguistics Lecture 1 Overview.
Semantic Construction lecture 2. Semantic Construction Is there a systematic way of constructing semantic representation from a sentence of English? This.
Interpreting Language (with Logic)
Rules, Movement, Ambiguity
CSA2050 Introduction to Computational Linguistics Parsing I.
Computational Semantics Day II: A Modular Architecture
Building a Semantic Parser Overnight
November 2006Semantics I1 Natural Language Processing Semantics I What is semantics for? Role of FOL Montague Approach.
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
LING 388: Language and Computers Sandiway Fong Lecture 16.
CAS LX 502 9b. Formal semantics Pronouns and quantifiers.
April 2010Semantic Grammar1 A short guide to Blackburn’s Grammar of English.
Logic Programming Lecture 6: Parsing and Definite Clause Grammars.
October 2004csa4050: Semantics V1 CSA4050: Advanced Topics in NLP Semantics V NL Access to Databases Semantics of Questions and Answers Simple Interpreters.
Pauline Jacobson,  General introduction: compositionality, syntax/semantics interface, notation  The standard account  The variable-free account.
November 2008NL Semantics V1 Advanced Topics in NLP Semantics V NL Access to Databases Semantics of Questions and Answers Simple Interpreters for Questions.
Semantics (Representing Meaning)
Natural Language Processing
LING 581: Advanced Computational Linguistics
CSA4050: Advanced Topics in NLP
Natural Language Processing
CSA4050: Advanced Topics in NLP
Semantics 2: Syntax-Semantics Interface
Presentation transcript:

October 2004CSA4050: Semantics III1 CSA4050: Advanced Topics in NLP Semantics III Quantified Sentences

October 2004CSA4050: Semantics III2 Outline Language Sentences Determiners Noun Phrases Syntactic Structure Logic Generalised Quantifiers Higher order functions Translation into Prolog Syntax-Semantics Interface

October 2004CSA4050: Semantics III3 Determiners and Quantifiers in Language and Logic A dog barked  x dog(x) & bark(x) Every dog barked  x dog(x)  bark(x) Fido chased a cat  x cat(x) & chase(fido,x) Every dog chased a cat  x dog(x)  (  y cat(x) & chase(x,y)))

October 2004CSA4050: Semantics III4 Syntactic Shape vs. Semantic Shape John walks semantics: walk(suzie). Every man talks semantics: all(X, man(X)  talk(X)) S NP VP Suzie walks S NP VP Det N talks Every man

October 2004CSA4050: Semantics III5 Problem Similar syntactic shape Dissimilar semantic shape How is this possible if the syntax drives the combination of semantic fragments as per rule-to-rule hypothesis? Answer: be creative about logical forms and semantic combination rules

October 2004CSA4050: Semantics III6 Montague Solution Reorganising the semantic combination rules operating between VP and NP in rules such as s(S) --> np(NP), vp(VP). We will be considering [NP]([VP]) versus [VP]([NP]). NPs as higher order functions Analyse LF of quantified sentences

October 2004CSA4050: Semantics III7 LF of Quantified Sentences LF of quantified sentences has a general shape involving –a restrictor predicate R –a scope predicate S R restricts the set of things we are talking about S says something further about set element(s) –a logical quantifier Q –a bound variable V –a logical operator O connecting R and S

October 2004CSA4050: Semantics III8 Anatomy of Quantified Sentences LogicQVROS  x m(x)  w(x)  xm(x)  w(x)  x d(x) & b(x)  xd(x)&b(x)  x d(x)  (h(x) & b(x))  xd(x)  h(x) & b(x)

October 2004CSA4050: Semantics III9 Generalized Quantifiers We adopt the following generalized quantifier representation for LF in which quantifier is a 3- place predicate: Q(,, ) Operator is omitted. Examples all(X,man(X),walk(X)) exist(X,man(X),walk(X)) the(X,man(X),climbed(X,everest)) most(X,lecturer(X),poor(X))

October 2004CSA4050: Semantics III10 NP as higher order function NP Q^all(X,man(X),Q) every man VP Y^walk(Y) walks S all(X,man(X),walk(X))

October 2004CSA4050: Semantics III11 Encoding in Prolog The VP remains as before, ie X^walks(X) The quantified NP every man will be of the form Q^all(X,man(X) => Q) The semantic rule for S now ensures that the NP function is applied to the VP function. s(S)--> np(NP),vp(VP), {reduce(NP,VP,S)}

October 2004CSA4050: Semantics III12 DCG with Quantification Program 1 % grammar s(S) --> np(NP), vp(VP), {reduce(NP,VP,S)} vp(VP) --> v(V). % lexicon v(X^walk(X)) --> [walks]. np(Q^all(X,man(X),Q)) --> [every,man].

October 2004CSA4050: Semantics III13 Result ?- s(X,[every,man,walks],[]). X = all(_G397, man(_G397)=>_G405^walk(_G405)) What is wrong with this? How can we fix it?

October 2004CSA4050: Semantics III14 Result ?- s(X,[every,man,walks],[]). X = all(_G397, man(_G397), _G405^walk(_G405)) What is wrong with this? –The variables _G397 and _G405 are distinct. They should be identical. –The consequent of the implication is a λ expression How can we fix it?

October 2004CSA4050: Semantics III15 Result ?- s(X,[every,man,walks],[]). X = all(_G397, man(_G397), G405^walk(_G405)) What is wrong with this? –The variables _G397 and _G405 are distinct. They should be identical. –The consequent of the implication is a λ expression How can we fix these problems? –We need to force the variables to be same using reduce.

October 2004CSA4050: Semantics III16 DCG with Quantification Program 2 % grammar s(S) --> np(NP), vp(VP), {reduce(VP,NP,S)} vp(VP) --> v(V). % lexicon v(X^walk(X)) --> [walks]. np(Q^all(X,man(X) => P)) --> [every,man], {reduce(Q,X,P)}.

October 2004CSA4050: Semantics III17 Result ?- s(X,[every,man,walks],[]). X = all(_G397, man(_G397),walk(_G397)) The effect of the reduce clause is –to identify the appropriate variables –to remove the λ variable

October 2004CSA4050: Semantics III18 Handling Quantified NPs Before we cheated by having every man as a lexical item. np(Q^all(X,man(X) => P)) --> [every,man], { reduce(Q,X,P)}. Now we see what is involved in analysing the NP from its parts. Step 1 is to write a new syntactic rule np(NP) --> d(D), n(N). How does the semantics work?

October 2004CSA4050: Semantics III19 LF of determiners Key idea is determiner has LF of a 2 argument function corresponding to R and S which become bound during processing. λR.λS.Q(V,R,S) where Q is associated with the particular determiner When we apply this function to the adjacent noun, we obtain the LF of the NP.

October 2004CSA4050: Semantics III20 How NP is created D R^S^all(X,R,S) every N Y^man(Y) man NP S^all(X,man(X),S)

October 2004CSA4050: Semantics III21 Fitting the Semantics Together Handle the quantified NP np(NP) --> d(D), n(N), {reduce(D,N,NP)}. Add lexical entry for every d(RL^SL^all(X,R => S)) -->[every], {reduce(RL,X,R), reduce(SL,X,S) }.

October 2004CSA4050: Semantics III22 DCG with Quantification Program 3 % grammar s(S) --> np(NP), vp(VP), {reduce(NP,VP,S)}. np(NP) --> d(D), n(N), {reduce(D,N,NP) }. vp(VP) --> v(VP). % lexicon v(X^walk(X)) --> [walks]. n(X^man(X)) --> [man]. det(RL^SL^all(X,R => S) --> [every], {reduce(RL,X,R), reduce(SL,X,S) }.

October 2004CSA4050: Semantics III23 Trace >: (7) s(_G510, [every, man, walks], []) >: (8) np(_L183, [every, man, walks], _L184) >: (9) d(_L205, [every, man, walks], _L206) <: (9) d((X^R)^ (X^S)^all(X, R, S), [every, man, walks], [man, walks]) >: (9) n(_L207, [man, walks], _L208) <: (9) n(Z^man(Z), [man, walks], [walks]) >: (9) reduce((X^R)^ (X^S)^all(X, R, S), Z^man(Z), _L183) <: (9) reduce((X^man(X))^ (X^S)^all(X, man(X), S), X^man(X), (X^S)^all(X, man(X), S)) <: (8) np((X^S)^all(X, man(X), S), [every, man, walks], [walks]) >: (8) vp(_L185, [walks], _L186) >: (9) v(_L185, [walks], _L186) <: (9) v(Y^walk(Y), [walks], []) <: (8) vp(Y^walk(Y), [walks], []) >: (8) reduce((X^S)^all(X, man(X), S), Y^walk(Y), _G510) <: (8) reduce((X^walk(X))^all(X, man(X), walk(X)), X^walk(X), all(X, man(X), walk(X))) <: (7) s(all(X, man(X), walk(X)), [every, man, walks], [])