10/14/2015CPSC503 Winter 20091 CPSC 503 Computational Linguistics Lecture 11 Giuseppe Carenini.

Slides:



Advertisements
Similar presentations
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing Semantics (Chapter 17) Muhammed Al-Mulhem March 1, 2009.
Advertisements

CMSC 723: Intro to Computational Linguistics November 24, 2004 Lecture 12: Lexical Semantics Bonnie Dorr Christof Monz.
Syntactic analysis using Context Free Grammars. Analysis of language Morphological analysis – Chairs, Part Of Speech (POS) tagging – The/DT man/NN left/VBD.
Natural Language Processing Lecture 22: Meaning Representation Languages.
Statistical NLP: Lecture 3
LING NLP 1 Introduction to Computational Linguistics Martha Palmer April 19, 2006.
Computational Semantics Ling 571 Deep Processing Techniques for NLP February 7, 2011.
1 Computational Semantics Chapter 18 November 2012 We will not do all of this… Lecture #12.
1 Words and the Lexicon September 10th 2009 Lecture #3.
6/3/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 10 Giuseppe Carenini.
Meaning Representation and Semantic Analysis Ling 571 Deep Processing Techniques for NLP February 9, 2011.
6/9/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 11 Giuseppe Carenini.
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.
CS 4705 Lecture 17 Semantic Analysis: Syntax-Driven Semantics.
Categories – relations or individuals? What are the differences in representing collie as a relation vs. an individual? As a relation: collie(lassie) –
Fall 2004 Lecture Notes #7 EECS 595 / LING 541 / SI 661 Natural Language Processing.
CS 4705 Semantic Analysis: Syntax-Driven Semantics.
CPSC 503 Computational Linguistics
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.
Context Free Grammars Reading: Chap 12-13, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
Natural Language Processing
BİL711 Natural Language Processing
9/8/20151 Natural Language Processing Lecture Notes 1.
Representing Meaning Lecture Sep 2007.
Chapter 14. Representing Meaning From: Chapter 14 of An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition,
Lecture 12: 22/6/1435 Natural language processing Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
For Friday Finish chapter 23 Homework: –Chapter 22, exercise 9.
10/12/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 10 Giuseppe Carenini.
Fall 2005 Lecture Notes #6 EECS 595 / LING 541 / SI 661 Natural Language Processing.
THE BIG PICTURE Basic Assumptions Linguistics is the empirical science that studies language (or linguistic behavior) Linguistics proposes theories (models)
November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.
1 Natural Language Processing Lecture Notes 11 Chapter 15 (part 1)
Semantic Analysis CMSC Natural Language Processing May 8, 2003.
Pattern-directed inference systems
Context Free Grammars Reading: Chap 9, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Rada Mihalcea.
11 Chapter 14 Part 1 Statistical Parsing Based on slides by Ray Mooney.
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
Rules, Movement, Ambiguity
Artificial Intelligence: Natural Language
Section 11.3 Features structures in the Grammar ─ Jin Wang.
CPSC 503 Computational Linguistics
UBC Department of Computer Science Undergraduate Events More
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
10/31/00 1 Introduction to Cognitive Science Linguistics Component Topic: Formal Grammars: Generating and Parsing Lecturer: Dr Bodomo.
Natural Language Processing Vasile Rus
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 22
Statistical NLP: Lecture 3
Natural Language Processing
Representations of Meaning
Natural Language Processing
CPE 480 Natural Language Processing
CPSC 503 Computational Linguistics
CPSC 503 Computational Linguistics
CSCI 5832 Natural Language Processing
CPSC 503 Computational Linguistics
بسم الله الرحمن الرحيم ICS 482 Natural Language Processing
Semantics September 23, /22/2018.
CPSC 503 Computational Linguistics
CPSC 503 Computational Linguistics
CSCI 5832 Natural Language Processing
Semantics: Representations and Analyses
Presentation transcript:

10/14/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 11 Giuseppe Carenini

10/14/2015CPSC503 Winter Knowledge-Formalisms Map (including probabilistic formalisms) Logical formalisms (First-Order Logics) Rule systems (and prob. versions) (e.g., (Prob.) Context-Free Grammars) State Machines (and prob. versions) (Finite State Automata,Finite State Transducers, Markov Models) Morphology Syntax Pragmatics Discourse and Dialogue Semantics AI planner(MDP Markov Decision Processes)

10/14/2015CPSC503 Winter Next three classes What meaning is and how to represent it Semantic Analysis: How to map sentences into their meaning –Complete mapping still impractical –“Shallow” version: Semantic Role Labeling Meaning of individual words (lexical semantics) Computational Lexical Semantics Tasks –Word sense disambiguation –Word Similarity

10/14/2015CPSC503 Winter Today 16/10 Semantics / Meaning /Meaning Representations Linguistically relevant Concepts in FOPC/FOL Semantic Analysis

10/14/2015CPSC503 Winter Semantics Def. Semantics: The study of the meaning of words, intermediate constituents and sentences Def1. Meaning: a representation that expresses the linguistic input in terms of objects, actions, events, time, space… beliefs, attitudes...relationships Def2. Meaning : a representation that links the linguistic input to knowledge of the world Language independent ?

10/14/2015CPSC503 Winter Semantic Relations involving Sentences Paraphrase: have the same meaning I gave the apple to John vs. I gave John the apple I bought a car from you vs. you sold a car to me The thief was chased by the police vs. …… Same truth conditions Entailment: “implication” The park rangers killed the bear vs. The bear is dead Nemo is a fish vs. Nemo is an animal Contradiction: I am in Vancouver vs. I am in India

10/14/2015CPSC503 Winter Meaning Structure of Language How does language convey meaning? –Grammaticization –Display a basic predicate-argument structure (e.g., verb complements) –Display a partially compositional semantics –Words

10/14/2015CPSC503 Winter Grammaticization ConceptAffix Past More than one Again Negation -ed -s re- in-, un-, de- Words from Nonlexical categories Obligation Possibility Definite, Specific Indefinite, Non-specific Disjunction Negation Conjunction must may the a or not and

10/14/2015CPSC503 Winter Common Meaning Representations FOL Semantic Nets Frames I have a car Common foundation: structures composed of symbols that correspond to objects and relationships

10/14/2015CPSC503 Winter Requirements for Meaning Representations e.g, Does Maharani serve vegetarian food? -> Yes What restaurants are close to the ocean? -> C and Monks Sample NLP Task: giving advice about restaurants –Accept queries in NL –Generate appropriate responses by consulting a Knowledge Base

10/14/2015CPSC503 Winter Verifiability (in the world?) Example: Does LeDog serve vegetarian food? Knowledge base (KB) expressing our world model (in a formal language) Convert question to KB language and verify its truth value against the KB content Yes / No / I do not know

10/14/2015CPSC503 Winter Non Yes/No Questions Example: I'd like to find a restaurant where I can get vegetarian food. Indefinite reference variable serve(x,VegetarianFood) Matching succeeds only if variable x can be replaced by known object in KB. What restaurants are close to the ocean? -> C and Monks

10/14/2015CPSC503 Winter Canonical Form Paraphrases should be mapped into the same representation. Does LeDog have vegetarian dishes? Do they have vegetarian food at LeDog? Are vegetarian dishes served at LeDog? Does LeDog serve vegetarian fare? …………… -Words with overlapping meanings -Syntactic constructions are systematically related

10/14/2015CPSC503 Winter Inference Consider a more complex request –Can vegetarians eat at Maharani? KB contains Def. System’s ability to draw valid conclusions based on the meaning representations of inputs and its KB serve(Maharani,VegetarianFood) serve( x, VegetarianFood) => CanEat(Vegetarians,At( x ))

10/14/2015CPSC503 Winter Meaning Structure of Language How does language convey meaning? –Grammaticization –Display a basic predicate-argument structure (e.g., verb complements) –Display a partially compositional semantics –Words

10/14/2015CPSC503 Winter Predicate-Argument Structure Subcategorization frames specify number, position, and syntactic category of arguments Examples: give NP2 NP1, find NP, sneeze [] Represent relationships among concepts Some words act like arguments and some words act like predicates: –Nouns as concepts or arguments: red(ball) –Adj, Adv, Verbs as predicates: red(ball)

10/14/2015CPSC503 Winter Semantic (Thematic) Roles Semantic Roles : Participants in an event –Agent: George hit Bill. Bill was hit by George –Theme: George hit Bill. Bill was hit by George Source, Goal, Instrument, Force… This can be extended to the realm of semantics Verb subcategorization: Allows linking arguments in surface structure with their semantic roles Mary gave/sent/read a book to Ming Agent Theme Goal Mary gave/sent/read Ming a book Agent Goal Theme

10/14/2015CPSC503 Winter First Order Predicate Calculus (FOPC) FOPC provides sound computational basis for verifiability, inference, expressiveness… –Supports determination of truth –Supports Canonical Form –Supports question-answering (via variables) –Supports inference –Argument-Predicate structure –Supports compositionality of meaning

10/14/2015CPSC503 Winter Today 16/10 Semantics / Meaning /Meaning Representations Linguistically relevant Concepts in FOPC/FOL Semantic Analysis

10/14/2015CPSC503 Winter Linguistically Relevant Concepts in FOPC Categories & Events (Reification) Representing Time Beliefs (optional, read if relevant to your project) Aspects (optional, read if relevant to your project) Description Logics (optional, read if relevant to your project)

10/14/2015CPSC503 Winter Categories & Events Events: can be described in NL with different numbers of arguments… –I ate –I ate a turkey sandwich –I ate a turkey sandwich at my desk –I ate at my desk –I ate lunch –I ate a turkey sandwich for lunch –I ate a turkey sandwich for lunch at my desk Categories: –VegetarianRestaurant (Joe’s) - relation vs. object –MostPopular(Joe’s,VegetarianRestaurant) Reification –ISA (Joe’s,VegetarianRestaurant) –AKO (VegetarianRestaurant,Restaurant)

10/14/2015CPSC503 Winter MUC-4 Example INCIDENT: DATE30 OCT 89 INCIDENT: LOCATIONEL SALVADOR INCIDENT: TYPEATTACK INCIDENT: STAGE OF EXECUTIONACCOMPLISHED INCIDENT: INSTRUMENT ID INCIDENT: INSTRUMENT TYPE PERP: INCIDENT CATEGORYTERRORIST ACT PERP: INDIVIDUAL ID"TERRORIST" PERP: ORGANIZATION ID "THE FMLN" PERP: ORG. CONFIDENCEREPORTED: "THE FMLN" PHYS TGT: ID PHYS TGT: TYPE PHYS TGT: NUMBER PHYS TGT: FOREIGN NATION PHYS TGT: EFFECT OF INCIDENT PHYS TGT: TOTAL NUMBER HUM TGT: NAME HUM TGT: DESCRIPTION"1 CIVILIAN" HUM TGT: TYPE CIVILIAN: "1 CIVILIAN" HUM TGT: NUMBER1: "1 CIVILIAN" HUM TGT: FOREIGN NATION HUM TGT: EFFECT OF INCIDENTDEATH: "1 CIVILIAN" HUM TGT: TOTAL NUMBER On October 30, 1989, one civilian was killed in a reported FMLN attack in El Salvador.

10/14/2015CPSC503 Winter Reification Again Reification Advantages: –No need to specify fixed number of arguments to represent a given sentence –You can easily specify inference rules involving the arguments “I ate a turkey sandwich for lunch”  w: Isa(w,Eating)  Eater(w,Speaker)  Eaten(w,TurkeySandwich)  MealEaten(w,Lunch)

10/14/2015CPSC503 Winter Representing Time Events are associated with points or intervals in time. We can impose an ordering on distinct events using the notion of precedes. Temporal logic notation: (  w,x,t) Arrive(w,x,t) Constraints on variable t I arrived in New York (  t) Arrive(I,NewYork,t)  precedes(t,Now)

10/14/2015CPSC503 Winter Interval Events Need t start and t end “She was driving to New York until now”  t start,t end,e, i ISA(e,Drive) Driver(e, She) Dest(e, NewYork)  IntervalOf(e,i) Endpoint(i, t end ) Startpoint(i, t end ) Precedes(t start,Now)  Equals(t end,Now)

10/14/2015CPSC503 Winter Relation Between Tenses and Time Relation between simple verb tenses and points in time is not straightforward Present tense used like future: –We fly from Baltimore to Boston at 10 Complex tenses: –Flight 1902 arrived late –Flight 1902 had arrived late Representing them in the same way seems wrong….

10/14/2015CPSC503 Winter Reference Point Reichenbach (1947) introduced notion of Reference point (R), separated out from Utterance time (U) and Event time (E) Example: –When Mary's flight departed, I ate lunch –When Mary's flight departed, I had eaten lunch Departure event specifies reference point.

10/14/2015CPSC503 Winter Today 15/10 Semantics / Meaning /Meaning Representations Linguistically relevant Concepts in FOPC / FOL Semantic Analysis

10/14/2015CPSC503 Winter Semantic Analysis Syntax-driven Semantic Analysis Sentence Literal Meaning Discourse Structure Meanings of words Meanings of grammatical structures Context Common-Sense Domain knowledge Intended meaning Further Analysis INFERENCEINFERENCE

10/14/2015CPSC503 Winter Compositional Analysis Principle of Compositionality –The meaning of a whole is derived from the meanings of the parts What parts? –The constituents of the syntactic parse of the input

10/14/2015CPSC503 Winter Compositional Analysis: Example AyCaramba serves meat

10/14/2015CPSC503 Winter Augmented Rules Augment each syntactic CFG rule with a semantic formation rule The class of actions performed by f will be quite restricted. Abstractly i.e., The semantics of A can be computed from some function applied to the semantics of its parts.

10/14/2015CPSC503 Winter Simple Extension of FOL: Lambda Forms –Lambda-reduction: variables are bound by treating the lambda form as a function with formal arguments –A FOL sentence with variables in it that are to be bound.

10/14/2015CPSC503 Winter Augmented Rules: Example –PropNoun -> AyCaramba –MassNoun -> meat Attachments {AyCaramba} {MEAT} assigning FOL constants copying from daughters up to mothers. –NP -> PropNoun –NP -> MassNoun Attachments {PropNoun.sem} {MassNoun.sem} Simple non-terminals Concrete entities

10/14/2015CPSC503 Winter Augmented Rules: Example Verb -> serves {VP.sem(NP.sem)} {Verb.sem(NP.sem) Semantics attached to one daughter is applied to semantics of the other daughter(s). S -> NP VP VP -> Verb NP lambda-form

10/14/2015CPSC503 Winter Example S -> NP VP VP -> Verb NP Verb -> serves NP -> PropNoun NP -> MassNoun PropNoun -> AyCaramba MassNoun -> meat {VP.sem(NP.sem)} {Verb.sem(NP.sem) {PropNoun.sem} {MassNoun.sem} {AC} {MEAT} MEAT ……. y y AC

10/14/2015CPSC503 Winter Next Time Read Chp. 19 (Lexical Semantics)

10/14/2015CPSC503 Winter Non-Compositionality Unfortunately, there are lots of examples where the meaning of a constituent can’t be derived from the meanings of the parts - metaphor, (e.g., corporation as person) –metonymy, (??) –idioms, –irony, –sarcasm, –indirect requests, etc

10/14/2015CPSC503 Winter English Idioms “buy the farm” “bite the bullet” “bury the hatchet” etc… Lots of these… constructions where the meaning of the whole is either –Totally unrelated to the meanings of the parts (“kick the bucket”) –Related in some opaque way (“run the show”)

10/14/2015CPSC503 Winter The Tip of the Iceberg –“Enron is the tip of the iceberg.” NP -> “the tip of the iceberg” {….} –“the tip of an old iceberg” –“the tip of a 1000-page iceberg” –“the merest tip of the iceberg” NP -> TipNP of IcebergNP {…} TipNP: NP with tip as its head IcebergNP NP with iceberg as its head

10/14/2015CPSC503 Winter Handling Idioms –Mixing lexical items and grammatical constituents –Introduction of idiom-specific constituents –Permit semantic attachments that introduce predicates unrelated with constituents NP -> TipNP of IcebergNP {small-part(), beginning()….} TipNP: NP with tip as its head IcebergNP NP with iceberg as its head

10/14/2015CPSC503 Winter Attachments for a fragment of English (Sect. 18.5) old edition Sentences Noun-phrases Verb-phrases Prepositional-phrases Based on “The core Language Engine” 1992

10/14/2015CPSC503 Winter Full story more complex To deal properly with quantifiers –Permit lambda-variables to range over predicates. E.g., –Introduce complex terms to remain agnostic about final scoping

10/14/2015CPSC503 Winter Similarly to PP attachment, number of possible interpretations exponential in the number of complex terms Solution: Quantifier Scope Ambiguity likelihood of different orderings Mirror surface ordering Domain specific knowledge Weak methods to prefer one interpretation over another:

10/14/2015CPSC503 Winter Integration with a Parser Assume you’re using a dynamic-programming style parser (Earley or CKY). Two basic approaches –Integrate semantic analysis into the parser (assign meaning representations as constituents are completed) –Pipeline… assign meaning representations to complete trees only after they’re completed

10/14/2015CPSC503 Winter Pros and Cons Integration –use semantic constraints to cut off parses that make no sense –assign meaning representations to constituents that don’t take part in any correct parse Pipeline –assign meaning representations only to constituents that take part in a correct parse –parser needs to generate all correct parses

10/14/2015CPSC503 Winter How to Produce a Canonical Form Words have different senses –food ___ –dish ___|____one overlapping meaning sense –fare ___| Meaning of alternative syntactic constructions are systematically related serverthing-being-served –[S [NP Maharani] serves [NP vegetarian dishes]] thing-being-served server [S [NP vegetarian dishes] are served at [NP Maharani]]

10/14/2015CPSC503 Winter Non-verbal predicate-argument structures Semantic (Selectional) Restrictions : Constrain the types of arguments verbs take –George assassinated the senator –*The spider assassinated the fly Selectional Restrictions A Spanish restaurant under the bridge Under(SpanishRestaurant, bridge)