+ All Categories
Home > Documents > Lecture 18a: Meaning Representation...

Lecture 18a: Meaning Representation...

Date post: 03-Aug-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
30
Natural Language Processing Lecture 18a: Meaning Representation Languages
Transcript
Page 1: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Natural Language Processing

Lecture 18a: Meaning Representation Languages

Page 2: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Semantics Road Map

1. Lexical semantics2. Vector semantics3. Meaning representation languages and

semantic roles4. Compositional semantics, semantic parsing5. Discourse and pragmatics

Page 3: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

INTENSION AND EXTENSION

Page 4: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Two Approaches to Semantics

• Intentional– Assumes that the word or utterance is intrinsically

meaningful– Decompositional approaches to lexical semantics

are intentional• Extentional– Defines words and utterances by the the things in

the world of which they are true– This lecture will concern extentional models of

semantics

Page 5: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

ExtensionThe meaning of red is the set of entities in the universe of which the predicate RED is true. Similarly, the meaning of hit is the set of <x,y> pairs of which HIT(x, y) is true.

Page 6: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

In this lecture…

• We will look at ways of representing the extension of verbs and sentences

• We will also look at semantic roles and how they relate to meaning representation languages (MRLs)

Page 7: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

DESIRABLE PROPERTIES OF MEANING REPRESENTATIONS

Page 8: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Meaning Representation?

For what kinds of tasks?• Answering essay questions on an exam• Deciding what to order at a restaurant• Learning an activity via instructions• Making an investment decision• Recognizing an insult

linguistic inputs

results of parsing/WSD/coref/SRL/etc.

meaning representation

non-linguistic domains

Page 9: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Desirable Qualities: Verifiability

We want to be able to determine the truth of our representations.

“Does Udipi serve vegetarian food”?Is SERVE(Udipi, vegetarian food) in our knowledge base?

What is the relationship between the meaning of a sentence and the world as we know it?

Page 10: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Desirable Qualities: Unambiguous Representation

Let’s eat somewhere near campus.

(e.g., we want to eat at a place near campus)

(e.g., we eat places)

Our MRL must capture precisely one of these meanings—not both.

Page 11: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Desirable Qualities: Canonical Form

• “Mad Mex has vegetarian dishes.”• “They have vegetarian food at Mad Mex.”• “Vegetarian dishes are served at Mad Mex.”• “Mad Mex serves vegetarian fare.”

Inputs that mean the same thing should have the same meaning representation.

Page 12: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Desirable Qualities: Inference, Variables, and Expressiveness

• “Can vegetarians eat at Mad Mex?”

• “I’d like to find a restaurant where I can get vegetarian food.”SERVE(x, vegetarian food)

• “Delta flies Boeing 737s from Boston to New York.”

Page 13: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

One Limitation: Literality

We will focus on the basic requirements for meaning representation.

The basic requirements do not include correctly interpreting statements like:• “Ford was hemorrhaging money.”• “I could eat a horse.”

Page 14: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

What entities do we want to represent?

A meaning representation scheme should let us represent:• objects (e.g., people, restaurants, cuisines)• properties of objects (e.g., pickiness,

noisiness, spiciness)• relations between objects (e.g., SERVE(Oishii

Bento, Japanese))

Page 15: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

The Knowledge Base

Our knowledge base

It contains the things that we

“know”

We can query it

Page 16: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

THE CANDIDATES

Page 17: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

“I have a car.”

Page 18: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

FIRST-ORDER LOGIC

Page 19: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

MRL #1: First-Order LogicDressCode(ThePorch)Cuisine(Udipi)

SERVES(UnionGrill, AmericanFood)RESTAURANT(UnionGrill)

• HAVE(Speaker, FiveDollars) ∧ ¬ HAVE(Speaker, LotOfTime)• ∀x PERSON(x) ⇒ HAVE(x, FiveDollars)• ∃x,y PERSON(x) ∧ RESTAURANT(y) ∧ ¬HASVISITED(x,y)

Functions

Predicates

Page 20: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

First Order Logic and Semantics

• Nouns correspond to one-place predicates:RESTAURANT(x) is true if x is a member of the set of restaurants

• Adjectives correspond to one-place predicates:VEGETARIAN(x) is true if x is a member of the set of things that are vegetarian

• Verbs correspond to one-place, two-place, or three-place predicates

DINE(x) as in Noah dined.EAT(x, y) as in Noah ate American food.GIVE(x, y, z) as in The bad sushi gave Noah a stomach ache.

Page 21: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Modus Ponens and Forward Chaining

As individual facts are added to a knowledge base, modus ponens can be used to fire applicable implication rules.

<latexit sha1_base64="xaOK769s7M7s4w50+CCfpEjQ07Y=">AAAC73icjVJNixNBEO0ZdV3jV1aPXhqDkoCEyV50bwuCeFzF7C5kQqjpqUya7ekeumuyCcP8Ci8eVLz6d7z5b+xJQtBExIKGx3v1XZ0USjqKop9BeOPmrYPbh3dad+/df/CwffTo3JnSChwKo4y9TMChkhqHJEnhZWER8kThRXL1utEv5midNPoDLQsc55BpOZUCyFOTo+AgTjCTugIlM41p3XrO4zwxiyomXJAT1RwzJLAStEVHUFrQVHeHqSxkr47jxn9qLCjFF/8RWHcXPR6/l9nMS9Zc7xRzaOfoGq8XG+V8m+WNMWnd8xXjWTPtXqPb2DW96rD+VxrU6XbsSbsT9aOV8X0w2IAO29jZpP0jTo0oc9QkFDg3GkQFjSuwJIXCuhWXDgsQV5DhyEMNObpxtTpYzZ95JuV+bf5p4iv294gKcueWeeI9c6CZ29Ua8m/aqKTpq3EldVESarEuNC0VJ8Ob6/NUWhSklh6AsNL3ysUMLAjyf6TllzDYHXkfDI/7J/3Bu6hz2t1s45A9YU9Zlw3YS3bK3rIzNmQiyIOPwefgS2jDT+HX8NvaNQw2MY/ZHxZ+/wUk4vL8</latexit>

Page 22: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

First Order Logic: Advantages

• Flexible• Well-understood• Widely used

Page 23: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

DESCRIPTION LOGICS

Page 24: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

MRL #2: Description Logics

• Goal of description logics: understand and specify semantics for slot-filler representations

• More restrictive than FOL

Page 25: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

TBox and ABox

• TBox: contains the knowledge about categories or concepts in the application domainAll bistros are restaurantsAll restaurants are businesses

• ABox: facts about individuals in the domainUdipi is an Indian restaurant

Page 26: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Categories and Subsumption

IndianRestaurant(Udipi)category domain element

Udipi is an Indian restaurant.

IndianRestaurant ⊑ Restaurantsubsumed subsumerAll Indian restaurants are restaurants.

Page 27: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Negation and Disjunction

IndianRestaurant ⊑ not ItalianRestaurantIndian restaurants can’t also be Italian restaurants.

Restaurant ⊑ (or ItalianRestaurantIndianRestaurant MexicanRestaurant)Restaurants are Italian restaurants, Indian restaurants, or Mexican restaurant.

Page 28: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

Advantages

• Intuitive hierarchical representation• Compatible with existing work on ontologies

Page 29: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

LOOKING FORWARD

Page 30: Lecture 18a: Meaning Representation Languagesdemo.clab.cs.cmu.edu/NLP/S20/files/slides/18a-mrls.pdf · Lecture 18a: Meaning Representation Languages. Semantics Road Map 1.Lexical

The Missing Link

Compositional semantics / semantic parsing

linguistic inputs

results of parsing/WSD/coref/SRL/etc.

meaning representation

non-linguistic domains


Recommended