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.

Slides:



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

March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing Semantics (Chapter 17) Muhammed Al-Mulhem March 1, 2009.
Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.
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.
Syntax-Semantics Mapping Rajat Kumar Mohanty CFILT.
Statistical NLP: Lecture 3
1 Computational Semantics Chapter 18 November 2012 We will not do all of this… Lecture #12.
Meaning Representation and Semantic Analysis Ling 571 Deep Processing Techniques for NLP February 9, 2011.
Semantics: Representations and Analyses Slides adapted from Kathy McKeown, Dan Jurafsky, Chris Manning and video thanks to Lyn Walker, Michael Johnston,
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.
CS 4705 Semantics: Representations and Analyses. What kinds of meaning do we want to capture? Categories/entities –IBM, Jane, a black cat, Pres. Bush.
Semantics: Representations and Analyses Slides adapted from Julia Hirschberg, Dan Jurafsky, Chris Manning.
CS 4705 Lecture 17 Semantic Analysis: Syntax-Driven Semantics.
Final Review CS4705 Natural Language Processing. Semantics Meaning Representations –Predicate/argument structure and FOPC Thematic roles and selectional.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 2.
Categories – relations or individuals? What are the differences in representing collie as a relation vs. an individual? As a relation: collie(lassie) –
CS 4705 Semantic Analysis: Syntax-Driven Semantics.
CS 4705 Lecture 11 Feature Structures and Unification Parsing.
Categories – relations or individuals? What are the differences in representing collie as a relation vs. an individual? As a relation: collie(lassie) –
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
February 2009Introduction to Semantics1 Logic, Representation and Inference Introduction to Semantics What is semantics for? Role of FOL Montague Approach.
Natural Language Processing
Chapter 15. Semantic Analysis
1 LIN 1310B Introduction to Linguistics Prof: Nikolay Slavkov TA: Qinghua Tang CLASS 14, Feb 27, 2007.
BİL711 Natural Language Processing
CS 4705: Semantic Analysis: Syntax-Driven Semantics
Semantics: Representations and Analyses Slides adapted from Julia Hirschberg, Dan Jurafsky, Chris Manning.
November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.
Chapter 15 Natural Language Processing (cont)
1 Natural Language Processing Lecture Notes 11 Chapter 15 (part 1)
Semantic Analysis CMSC Natural Language Processing May 8, 2003.
Computing Science, University of Aberdeen1 CS4025: Logic-Based Semantics l Compositionality in practice l Producing logic-based meaning representations.
1 Natural Language Processing Chapter 15 (part 2).
For Wednesday Read chapter 23 Homework: –Chapter 22, exercises 1,4, 7, and 14.
Linguistic Essentials
Semantic Construction lecture 2. Semantic Construction Is there a systematic way of constructing semantic representation from a sentence of English? This.
Parsing with Context-Free Grammars for ASR Julia Hirschberg CS 4706 Slides with contributions from Owen Rambow, Kathy McKeown, Dan Jurafsky and James Martin.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Rules, Movement, Ambiguity
Artificial Intelligence: Natural Language
PARSING 2 David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
November 2006Semantics I1 Natural Language Processing Semantics I What is semantics for? Role of FOL Montague Approach.
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.
SYNTAX.
SYNTAX 1 NOV 9, 2015 – DAY 31 Brain & Language LING NSCI Fall 2015.
Meaning and Language Part 1. Plan We will talk about two different types of meaning, corresponding to two different types of objects: –Lexical Semantics:
MENTAL GRAMMAR Language and mind. First half of 20 th cent. – What the main goal of linguistics should be? Behaviorism – Bloomfield: goal of linguistics.
 My office hours will be Wednesday 2-3 this week instead of Wednesday 4-5 (Oct. 7 th )
Lec. 10.  In this section we explain which constituents of a sentence are minimally required, and why. We first provide an informal discussion and then.
Statistical NLP: Lecture 3
Natural Language Processing
Semantics (Representing Meaning)
SYNTAX.
Representations of Meaning
Natural Language Processing
Natural Language Processing
CPE 480 Natural Language Processing
CSCI 5832 Natural Language Processing
CS 4705: Semantic Analysis: Syntax-Driven Semantics
بسم الله الرحمن الرحيم ICS 482 Natural Language Processing
Semantics September 23, /22/2018.
Semantics: Representations and Analyses
CSCI 5832 Natural Language Processing
Semantics: Representations and Analyses
Linguistic Essentials
Semantics: Representations and Analyses
CS4705 Natural Language Processing
Presentation transcript:

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.

 Reading: Ch , (cover material through today); Ch (next time)  Semantic Analysis: translation from syntax to FOPC  Hard problems in semantics

◦ The entities and actions/states represented (predicates and arguments, or, nouns and verbs) ◦ The way they are ordered and related:  The syntax of the representation may correspond to the syntax of the sentence  Can we develop a mapping between syntactic representations and formal representations of meaning?

S eat(Dan) NP VP Nom V N Dan eats  Goal: Link syntactic structures to corresponding semantic representation to produce representation of the ‘meaning’ of a sentence while parsing it

 Don’t want to have to specify for every possible parse tree what semantic representation it maps to  Do want to identify general mappings from parse trees to semantic representations  One way: ◦ Augment lexicon and grammar ◦ Devise mapping between rules of grammar and rules of semantic representation ◦ Rule-to-Rule Hypothesis: such a mapping exists

 Extend every grammar rule with `instructions’ on how to map components of rule to a semantic representation, e.g. S  NP VP {VP.sem(NP.sem)}  Each semantic function defined in terms of semantic representation of choice  Problem: how to define semantic functions and how to specify their composition so we always get the `right’ meaning representation from the grammar

 Associating constants with constituents ◦ ProperNoun  McDonalds {McDonalds} ◦ PluralNoun  burgers {burgers}  Defining functions to produce these from input ◦ NP  ProperNoun {ProperNoun.sem} ◦ NP  PluralNoun {PluralNoun.sem} ◦ Assumption: meaning representations of children are passed up to parents when non- branching (e.g. ProperNoun.sem(X) = X)  But…verbs are where the action is

◦ V  serves {Э(e,x,y) (Isa(e,Serving) ^ Agent(e,x) ^ Patient (e,y))} where e = event, x = agent, y = patient ◦ Will every verb needs its own distinct representation? McDonalds hires students.  Predicate(Agent, Patient) McDonalds gave customers a bonus.  Predicate(Agent, Patient, Beneficiary)

 Once we have the semantics for each constituent, how do we combine them? ◦ E.g. VP  V NP {V.sem(NP.sem)} ◦ If goal for VP semantics of ‘serve’ is the representation (Э e,x) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,burger)) then ◦ VP.sem must tell us  Which variables to be replaced by which arguments?  How is replacement accomplished?

 Extension to First Order Predicate Calculus λ x P(x): λ + variable(s) + FOPC expression in those variables  Lambda reduction Apply lambda-expression to logical terms to bind lambda-expression’s parameters to terms xP(x) xP(x)(car) P(car)

 Parameter list (e.g. x in x) in lambda expression makes variables (x) in logical expression (P(x)) available for binding to external arguments (car) provided by semantics of other constituents ◦ P(x): loves(Mary,x) ◦ xP(x)car: loves(Mary,car)

 Recall we have VP  V NP {V.sem(NP.sem)}  Target semantic representation is: {Э(e,x,y) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,y))}  Define V.sem as: { y Э(e,x) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,y))} ◦ Now ‘y’ will be available for binding when V.sem applied to NP.sem of direct object

 application binds x to value of NP.sem (burgers) y Э(e,x) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,y)) (burgers)  -reduction replaces y within -expression with burgers  Value of V.sem(NP.sem) is now Э(e,x) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,burgers))

 Need to define semantics for ◦ S  NP VP {VP.sem(NP.sem)} ◦ Where is the subject? ◦ Э(e,x) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,burgers)) ◦ Need another -expression in V.sem so the subject NP can be bound later in VP.sem ◦ V.sem, version 2  y x Э(e) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,y))

◦ VP  V NP {V.sem(NP.sem)} y x Э(e) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,y))(burgers) x Э(e) (Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,burgers)) ◦ S  NP VP {VP.sem(NP.sem)} x Э(e) Isa(e,Serving) ^ Agent(e,x) ^ Patient(e,burgers)}(McDonald’s) Э(e) Isa(e,Serving) ^ Agent(e,McDonald’s) ^ Patient(e,burgers)

S  NP VP {VP.sem(NP.sem)} VP  V NP {V.sem(NP.sem)} V  serves { x y E(e) (Isa(e,Serving) ^ Agent(e,y) ^ Patient(e,x))} NP  Propernoun {Propernoun.sem} NP  Pluralnoun {Pluralnoun.sem} Propernoun  McDonalds Pluralnoun  burgers

 Modify parser to include operations on semantic attachments as well as syntactic constituents ◦ E.g., change an Early-style parser so when constituents are completed, their attached semantic function is applied and a meaning representation created and stored with state  Or… let parser run to completion and then walk through resulting tree, applying semantic attachments from bottom-up

S  NP VP {VP.sem(NP.sem)} ◦ VP.sem has been stored in state representing VP ◦ NP.sem stored with the state for NP ◦ When rule completed, retrieve value of VP.sem and of NP.sem, and apply VP.sem to NP.sem ◦ Store result in S.sem.  As fragments of input parsed, semantic fragments created  Can be used to block ambiguous representations

 John slept.  John gave Mary the book.  The door opened  Any others?

 Terms can be complex A restaurant serves burgers. ◦ ‘a restaurant’: Э x Isa(x,restaurant) ◦ Э e Isa(e,Serving) ^ Agent(e, ) ^ Patient(e,burgers) ◦ Allows quantified expressions to appear where terms can by providing rules to turn them into well-formed FOPC expressions  Issues of quantifier scope Every restaurant serves a burger.

 Adjective phrases:  Happy people, cheap food, purple socks  Intersective semantics works for some… Nom  Adj Nom { x (Nom.sem(x) ^ Isa(x,Adj.sem))} Adj  cheap {Cheap} x Isa(x, Food) ^ Isa(x,Cheap) But….fake gun? Local restaurant? Former friend? Would-be singer? Ex Isa(x, Gun) ^ Isa(x,Fake)

 To incorporate semantics into grammar we must ◦ Determine `right’ representation for each basic constituent ◦ Determine `right’ representation constituents that take these basic constituents as arguments ◦ Incorporate semantic attachments into each rule of our CFG

 You also perform semantic analysis on orphaned constituents that play no role in final parse  Case for pipelined approach: Do semantics after syntactic parse

 Some meaning isn’t compositional ◦ Non-compositional modifiers: fake, former, local, so-called, putative, apparent,… ◦ Metaphor:  You’re the cream in my coffee. She’s the cream in George’s coffee.  The break-in was just the tip of the iceberg. This was only the tip of Shirley’s iceberg. ◦ Idiom:  The old man finally kicked the bucket. The old man finally kicked the proverbial bucket. ◦ Deferred reference: The ham sandwich wants his check.  Solution: special rules? Treat idiom as a unit?

 How do we represent time and temporal relationships between events? It seems only yesterday that Martha Stewart was in prison but now she has a popular TV show. There is no justice.  Where do we get temporal information? ◦ Verb tense ◦ Temporal expressions ◦ Sequence of presentation  Linear representations: Reichenbach ‘47

◦ Utterance time (U): when the utterance occurs ◦ Reference time (R): the temporal point-of-view of the utterance ◦ Event time (E): when events described in the utterance occur George is eating a sandwich. -- E,R,U  George had eaten a sandwich (when he realized…) E – R – U  George will eat a sandwich. --U,R – E  While George was eating a sandwich, his mother arrived.

 Statives: states or properties of objects at a particular point in time I am hungry.  Activities: events with no clear endpoint I am eating.  Accomplishments: events with durations and endpoints that result in some change of state I ate dinner.  Achievements: events that change state but have no particular duration – they occur in an instant I got the bill.

 Very hard to represent internal speaker states like believing, knowing, wanting, assuming, imagining ◦ Not well modeled by a simple DB lookup approach so.. ◦ Truth in the world vs. truth in some possible world George imagined that he could dance. George believed that he could dance.  Augment FOPC with special modal operators that take logical formulae as arguments, e.g. believe, know

Believes(George, dance(George)) Knows(Bill,Believes(George,dance(George)))  Mutual belief: I believe you believe I believe…. ◦ Practical importance: modeling belief in dialogue ◦ Clark’s grounding

 Hypothesis: Principle of Compositionality ◦ Semantics of NL sentences and phrases can be composed from the semantics of their subparts  Rules can be derived which map syntactic analysis to semantic representation (Rule-to-Rule Hypothesis) ◦ Lambda notation provides a way to extend FOPC to this end ◦ But coming up with rule to rule mappings is hard  Idioms, metaphors and other non-compositional aspects of language makes things tricky (e.g. fake gun)

 Read Ch 19: 1-5