1/24 Predicate Calculus Representing meaning. 2/24 Revision First-order predicate calculus Typical “semantic” representation Quite distant from syntax.

Slides:



Advertisements
Similar presentations
Natural Language Processing Lecture 2: Semantics.
Advertisements

First-Order Logic (and beyond)
Semantics (Representing Meaning)
Language and Cognition Colombo, June 2011 Day 2 Introduction to Linguistic Theory, Part 4.
Statistical NLP: Lecture 3
PSY 369: Psycholinguistics Some basic linguistic theory part2.
MORPHOLOGY - morphemes are the building blocks that make up words.
CS 4705 Slides adapted from Julia Hirschberg. Homework: Note POS tag corrections. Use POS tags as guide. You may change them if they hold you back.
Meaning Representation and Semantic Analysis Ling 571 Deep Processing Techniques for NLP February 9, 2011.
Language Specfication and Implementation - PART II: Semantics of Procedural Programming Languages Lee McCluskey Department of Computing and Mathematical.
Introduction to Semantics To be able to reason about the meanings of utterances, we need to have ways of representing the meanings of utterances. A formal.
CS 4705 Semantic Analysis: Syntax-Driven Semantics.
Artificial Intelligence 2005/06 From Syntax to Semantics.
What is Syntax?  The rules that govern the structure of utterances; also called grammar  The basic organization of sentences is around syntax  build.
1/27 Semantics Going beyond syntax. 2/27 Semantics Relationship between surface form and meaning What is meaning? Lexical semantics Syntax and semantics.
CS 4705 Semantics: Representations and Analyses. What kinds of meaning do we want to capture? Categories/entities –IBM, Jane, a black cat, Pres. Bush.
CS 4705 Lecture 17 Semantic Analysis: Syntax-Driven Semantics.
CS 4705 Semantic Analysis: Syntax-Driven Semantics.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
1 CSC 594 Topics in AI – Applied Natural Language Processing Fall 2009/ Outline of English Syntax.
Categories – relations or individuals? What are the differences in representing collie as a relation vs. an individual? As a relation: collie(lassie) –
Dr. Ansa Hameed Syntax (4).
Models of Generative Grammar Smriti Singh. Generative Grammar  A Generative Grammar is a set of formal rules that can generate an infinite set of sentences.
Syntax.
Constituency Tests Phrase Structure Rules
Syntax Nuha AlWadaani.
February 2009Introduction to Semantics1 Logic, Representation and Inference Introduction to Semantics What is semantics for? Role of FOL Montague Approach.
BİL711 Natural Language Processing
Lecture 12: 22/6/1435 Natural language processing Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.
SYNTAX Lecture -1 SMRITI SINGH.
1 Natural Language Processing Lecture Notes 11 Chapter 15 (part 1)
Semantic Analysis CMSC Natural Language Processing May 8, 2003.
Unit 5 : PREDICATES.
Computing Science, University of Aberdeen1 CS4025: Logic-Based Semantics l Compositionality in practice l Producing logic-based meaning representations.
1 Prof.Roseline WEEK-4 LECTURE -4 SYNTAX. 2 Prof.Roseline Syntax Concentrate on the structure and ordering of components within a sentence Greater focus.
Introduction to Linguistics Ms. Suha Jawabreh Lecture 19.
Semantic Construction lecture 2. Semantic Construction Is there a systematic way of constructing semantic representation from a sentence of English? This.
Grammars Grammars can get quite complex, but are essential. Syntax: the form of the text that is valid Semantics: the meaning of the form – Sometimes semantics.
November 2006Semantics I1 Natural Language Processing Semantics I What is semantics for? Role of FOL Montague Approach.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 2.
Levels of Linguistic Analysis
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
Syntax.
Pauline Jacobson,  General introduction: compositionality, syntax/semantics interface, notation  The standard account  The variable-free account.
NATURAL LANGUAGE PROCESSING
Artificial Intelligence Logical Agents Chapter 7.
SYNTAX.
The ‘text’ as linguistic unit. Different approaches to the study of texts from a linguistic perspective have been put forward - e.g. text grammar vs.
Statistical NLP: Lecture 3
Semantics (Representing Meaning)
Representations of Meaning
Chapter Eight Syntax.
What is Syntax?  The rules that govern the structure of utterances; also called grammar  The basic organization of sentences is around syntax  build.
CS 4705: Semantic Analysis: Syntax-Driven Semantics
CSC 594 Topics in AI – Applied Natural Language Processing
BBI 3212 ENGLISH SYNTAX AND MORPHOLOGY
Chapter Eight Syntax.
Levels of Linguistic Analysis
Semantics: Representations and Analyses
Linguistic Essentials
Generative Transformation
CS4705 Natural Language Processing
Semantics Going beyond syntax.
Natural Language Processing
Artificial Intelligence 2004 Speech & Natural Language Processing
Habib Ullah qamar Mscs(se)
Presentation transcript:

1/24 Predicate Calculus Representing meaning

2/24 Revision First-order predicate calculus Typical “semantic” representation Quite distant from syntax But still clearly a linguistic level of representation (it uses words, sort of)

3/24 Types of representation The man owned the gun which he used to shoot an elephant 5. Predicate calculus An elephant was shot by the man with his gun The man used his gun to shoot an elephant event(e) & time(e,past) & pred(e,shoot) & man(a) & the(a) &  (b) & dog(b) & shoot(a,b) &  (c) & gun(c) & own(a,c) & use(a,c,e) The man shot an elephant with his gun The man used the gun which he owned to shoot an elephant

4/24 First-order predicate calculus Computationally tractable Well understood, mathematically sound Therefore useful for inferencing, expressing equivalence Can be made quite shallow (almost like a deep structure), or quite abstract Good for expressing facts and relations Therefore good for question-answering, information retrieval

5/24 First-order predicate calculus Predicates – express relationships between objects, e.g. father(x,y), or properties of objects, e.g. man(x) Functions –can be evaluated to objects, e.g. fatherof(x) Constants – specific objects in the “world” being described Operators (and, or, implies, not) and quantifiers ( ,  )

6/24 Logic operators and quantifiers Universal quantifier  (‘all’) –All dogs are mammals:  x dog(x)  mammal(x) –Dogs are mammals, The dog is a mammal –A dog is a mammal Existential quantifier  (‘there exists’) –John has a car :  x car(x) & own(john,x)

7/24 Quantifier scope Every man loves a woman –Ambiguous in natural language  x man(x)  x woman(y) love(x,y)  x woman(y)  x man(x) love(x,y) Every farmer who owns a donkey beats it –What does ‘it’ refer to?  x (farmer(x) &  y donkey(y) own(x,y))  beat(x,y)

8/24 Quantifiers Natural language has many and various quantifiers, some of which are difficult to express in FOPC: –many, most, some, few, one, three, at least one,... –often, usually, might,...

9/24 Ambiguity with negatives Every student did not pass an exam  x student(x)  x exam(y)  pass(x,y)  y exam(y)  x student(x)  pass(x,y)  x student(x)  x exam(y) pass(x,y) All women don’t love fur coats No smoking seats are available I don’t think he will come (neg raising) I don’t know he will come ~ I know he won’t come

10/24 Combinatorial explosion Quantifier ambiguities can be compounded “Many people feel that most sentences exhibit too few quantifier scope ambiguities for much effort to be devoted to this problem, but a casual inspection of several sentences from any text should convince almost everyone otherwise.” (Jerry Hobbs) On top of other ambiguities (e.g. attachment) QuantifiersReadings

11/24 First-order predicate calculus In a quite shallow FOPC representation we can closely map verbs, nouns and adjectives onto predicates –man(x), fat(x), standup(x), see(x,y), give(x,y,z) –Proper names map onto objects, e.g. man(john), see(john,mary)

12/24 Grammatical meanings can be expressed as predicates e.g. A man eats icecream with a spoon  X man(x) &  y icecream(y) &  z spoon(z) & eats(x,y) & uses(x,z) A man shot an elephant in his pyjamas  x man(x) &  y elephant(y) & shot(x,y) &  z pyjamas(z) & owns (x,z) &... wearing(x,z) loc(y,z) (wearing(x,z) | wearing(y,z) | loc(y,z)) | loc(x,z)) wearing(y,z) loc(x,z)

13/24 First-order predicate calculus We can use operators of predicate calculus to express aspects of meaning that are implicit, and thereby extract new meaning from new utterances e.g. eats(x,_) & uses(x,y)  holds(x,y) Or make inferences e.g. gives(x,y,z)  has(x,z) &  has(x,y)

14/24 Tense and time Representing text, we need to represent tense –John eats a cake  X cake(X) & eats(john,X) –John ate a cake  X cake(X) & ate(john,X)  X cake(X) & eats(john,X,past)  X cake(X) & eats(john,X,pres)  event(E) eating(E) & agent(E,john) &  X cake(X) & object(E,X) & past(E) time(E,past)

15/24 Tense and time Relationship between tense and time by no means straightforward –I fly to Delhi on Monday –I fly to Delhi on Mondays –I fly to Delhi and find they have lost my luggage –I fly to Delhi if I win the competition –He will be in Delhi now You might want a deeper representation rather than just a mirror of the surface tense

16/24 Tense and time Reichenbach’s approach Tense is determined by three perspectives: –Event time –Reference time –Utterance time These can be ordered relative to time Also, they can be points or durations

17/24 Tense and time I had eaten E < R < U I ate E=R < U I have eaten E < R=U I eat E=R=U I will eat U=R < E I will have eaten U < E < R I am eating U=R  E I was eating R  E < U I will have been eating

18/24 Linguistic issues There are many other similarly tricky linguistic phenomena –Modality (could, should, would, must, may) –Aspect (completed, ongoing, resulting) –Determination (the, a, some, all, none) –Fuzzy sets (often, some, many, usually)

19/24 Semantic analysis Syntax-driven semantic analysis –Compositionality Semantic grammars –Procedural view of semantics

20/24 Syntax-driven semantic analysis Based on syntactic grammars CFG rules augmented by semantic annotations Compositionality –Meaning of the whole is the sum of the meaning of its parts –But not just the parts, but also the way they fit together

21/24 Pipeline architecture input parser semantic analyzer represent- ation

22/24 Semantic augmentations to PSG rules - example NP  det, adj, n {sem(NP,X) = qtf(det,X) sem(adj,X) & sem(n,X)} a = det {qtf(X,exists(X))} fat = adj {sem(X,fat(X))} man = n {sem(X,male(X) & hum(X)} a fat man exists(X) fat(X) & male(X) & hum(X)

23/24 Semantic augmentations to PSG rules - example S  NP, VP {sem(S,X,Y) = sem(NP,X) & sem(VP,X,Y)} NP  det, adj, n {sem(NP,X) = qtf(det,X) sem(adj,X) & sem(n,X)} VP  v, NP {sem(VP,X,Y) = sem(v,X,Y) sem(NP,Y)} eats = v {sem(X,Y,eats(X,Y) & tense(pres)} cake = n {sem(X,cake(X)} a fat man eats a cake exists(X) fat(X) & male(X) & hum(X) & exists(Y) & cake(Y) & eats(X,Y) & tense(pres)

24/24 How to do this Quite complex Fortunately, there is a mechanism Lambda calculus (Church 1940) See J&M ;-) Such representations often called “quasi logical forms” because of their (too) close relation to syntax