Computational Semantics Ling 571 Deep Processing Techniques for - - PowerPoint PPT Presentation

computational semantics
SMART_READER_LITE
LIVE PREVIEW

Computational Semantics Ling 571 Deep Processing Techniques for - - PowerPoint PPT Presentation

Computational Semantics Ling 571 Deep Processing Techniques for NLP February 7, 2011 Roadmap Computational Semantics AI-completeness More tractable parts Lexical Semantics Word Sense Disambiguation Semantic


slide-1
SLIDE 1

Computational Semantics

Ling 571 Deep Processing Techniques for NLP February 7, 2011

slide-2
SLIDE 2

Roadmap

— Computational Semantics

— AI-completeness — More tractable parts

— Lexical Semantics — Word Sense Disambiguation — Semantic Role Labeling — Resources

— Meaning Representation

— Representational requirements — First-Order Logic

— Syntax & Semantics

slide-3
SLIDE 3

Tasks in Computational Semantics

— Computational semantics aims to extract, interpret,

and reason about the meaning of NL utterances, and includes: — Defining a meaning representation

slide-4
SLIDE 4

Tasks in Computational Semantics

— Computational semantics aims to extract, interpret,

and reason about the meaning of NL utterances, and includes: — Defining a meaning representation — Developing techniques for semantic analysis, to

convert NL strings to meaning representations

slide-5
SLIDE 5

Tasks in Computational Semantics

— Computational semantics aims to extract, interpret,

and reason about the meaning of NL utterances, and includes: — Defining a meaning representation — Developing techniques for semantic analysis, to

convert NL strings to meaning representations

— Developing methods for reasoning about these

representations and performing inference from them

slide-6
SLIDE 6

Complexity of Computational Semantics

— Requires:

— Knowledge of language: words, syntax, relationships

b/t structure and meaning, composition procedures

slide-7
SLIDE 7

Complexity of Computational Semantics

— Requires:

— Knowledge of language: words, syntax, relationships

b/t structure and meaning, composition procedures

— Knowledge of the world: what are the objects that we

refer to, how do they relate, what are their properties?

slide-8
SLIDE 8

Complexity of Computational Semantics

— Requires:

— Knowledge of language: words, syntax, relationships

b/t structure and meaning, composition procedures

— Knowledge of the world: what are the objects that we

refer to, how do they relate, what are their properties?

— Reasoning: Given a representation and a world, what

new conclusions – bits of meaning – can we infer?

slide-9
SLIDE 9

Complexity of Computational Semantics

— Requires:

— Knowledge of language: words, syntax, relationships b/t

structure and meaning, composition procedures

— Knowledge of the world: what are the objects that we refer

to, how do they relate, what are their properties?

— Reasoning: Given a representation and a world, what new

conclusions – bits of meaning – can we infer?

— Effectively AI-complete

— Need representation, reasoning, world model, etc

slide-10
SLIDE 10

Major Subtasks

— Hopefully more tractable…. — Computational lexical semantics:

— Representing word meaning, interword relations, and

word-structure relations

slide-11
SLIDE 11

Major Subtasks

— Hopefully more tractable…. — Computational lexical semantics:

— Representing word meaning, interword relations, and

word-structure relations

— Word sense disambiguation:

— Selecting the meaning of an ambiguous word in

context

slide-12
SLIDE 12

Major Subtasks

— Hopefully more tractable…. — Computational lexical semantics:

— Representing word meaning, interword relations, and word-

structure relations

— Word sense disambiguation:

— Selecting the meaning of an ambiguous word in context

— Semantic role labeling:

— Identifying the thematic roles played by arguments in

predicate

slide-13
SLIDE 13

Lexical Semantics

— Synonymy:

— Couch/sofa; filbert/hazelnut; car/automobile

slide-14
SLIDE 14

Lexical Semantics

— Synonymy:

— Couch/sofa; filbert/hazelnut; car/automobile

— Antonymy:

— Up/down; in/out;

slide-15
SLIDE 15

Lexical Semantics

— Synonymy:

— Couch/sofa; filbert/hazelnut; car/automobile

— Antonymy:

— Up/down; in/out;

— Hyponymy:

— Car ISA vehicle; mango ISA fruit; dog ISA mammal

slide-16
SLIDE 16

Lexical Semantics

— Synonymy:

— Couch/sofa; filbert/hazelnut; car/automobile

— Antonymy:

— Up/down; in/out;

— Hyponymy:

— Car ISA vehicle; mango ISA fruit; dog ISA mammal

— Decomposition:

— Swim: GO FROM place1 TO place2 by SWIMMING

slide-17
SLIDE 17

Word Sense Disambiguation

— Bank:

— I withdrew money from the bank

slide-18
SLIDE 18

Word Sense Disambiguation

— Bank:

— I withdrew money from the bank

— Financial institution

— After the boat capsized, he climbed up the muddy

bank

slide-19
SLIDE 19

Word Sense Disambiguation

— Bank:

— I withdrew money from the bank

— Financial institution

— After the boat capsized, he climbed up the muddy

bank — Riverside

— The plane had to bank steeply.

slide-20
SLIDE 20

Word Sense Disambiguation

— Bank:

— I withdrew money from the bank

— Financial institution

— After the boat capsized, he climbed up the muddy

bank — Riverside

— The plane had to bank steeply.

— Turn

slide-21
SLIDE 21

Example: “Plant” Disambiguation

There are more kinds of plants and animals in the rainforests than anywhere else on

  • Earth. Over half of the millions of known species of plants and animals live in the
  • rainforest. Many are found nowhere else. There are even plants and animals in the

rainforest that we have not yet discovered. Biological Example The Paulus company was founded in 1938. Since those days the product range has been the subject of constant expansions and is brought up continuously to correspond with the state of the art. We’re engineering, manufacturing and commissioning world- wide ready-to-run plants packed with our comprehensive know-how. Our Product Range includes pneumatic conveying systems for carbon, carbide, sand, lime and many others. We use reagent injection in molten metal for the… Industrial Example

Label the First Use of “Plant”

slide-22
SLIDE 22

Semantic Role Labeling

— John broke the window. — John broke the window with a rock. — The rock broke the window. — The window was broken by John.

slide-23
SLIDE 23

Semantic Role Labeling

— JohnAGENT broke the windowTHEME.

slide-24
SLIDE 24

Semantic Role Labeling

— JohnAGENT broke the windowTHEME. — JohnAGENT broke the windowTHEME with a rockINSTRUMENT.

slide-25
SLIDE 25

Semantic Role Labeling

— JohnAGENT broke the windowTHEME. — JohnAGENT broke the windowTHEME with a rockINSTRUMENT. — The rockINSTRUMENT broke the windowTHEME. — .

slide-26
SLIDE 26

Semantic Role Labeling

— JohnAGENT broke the windowTHEME. — JohnAGENT broke the windowTHEME with a rockINSTRUMENT. — The rockINSTRUMENT broke the windowTHEME. — The windowTHEME was broken by JohnAGENT.

slide-27
SLIDE 27

Semantic Resources

— Growing number of large-scale computational semantic

knowledge bases — Dictionaries:

— Longman Dictionary of Contemporary English (LDOCE)

— WordNet(s) — PropBank — FrameNet — Semantically annotated corpora: SEMCOR, etc

slide-28
SLIDE 28

WordNet

— Large-scale, manually constructed sense hierarchy

— ISA hierarchy, other links

— Pod:

— 1(n) {pod, cod, seedcase} (the vessel that contains the seeds of a — plant (not the seeds themselves) — 2 (n) {pod, seedpod} (a several-seeded dehiscent fruit as e.g. of a — leguminous plant) — 3 (n) {pod} (a group of aquatic mammals) — 4 (n) {pod, fuel pod} (a detachable container of fuel on an airplane) — 5 (v) {pod} (take something out of its shell or pod) pod peas or — beans — 6 (v) {pod} (produce pods, of plants)

slide-29
SLIDE 29

WordNet Taxonomy View

slide-30
SLIDE 30

Tasks in Computational Semantics

— Computational semantics aims to extract, interpret,

and reason about the meaning of NL utterances, and includes: — Defining a meaning representation — Developing techniques for semantic analysis, to

convert NL strings to meaning representations

— Developing methods for reasoning about these

representations and performing inference from them

slide-31
SLIDE 31

Representing Meaning

First-order Logic Semantic Network Conceptual Dependency Frame-Based

slide-32
SLIDE 32

Meaning Representations

— All structures from set of symbols

— Representational vocabulary

slide-33
SLIDE 33

Meaning Representations

— All structures from set of symbols

— Representational vocabulary

— Symbol structures correspond to:

— Objects

slide-34
SLIDE 34

Meaning Representations

— All structures from set of symbols

— Representational vocabulary

— Symbol structures correspond to:

— Objects — Properties of objects

slide-35
SLIDE 35

Meaning Representations

— All structures from set of symbols

— Representational vocabulary

— Symbol structures correspond to:

— Objects — Properties of objects — Relations among objects

slide-36
SLIDE 36

Meaning Representations

— All structures from set of symbols

— Representational vocabulary

— Symbol structures correspond to:

— Objects — Properties of objects — Relations among objects

— Can be viewed as:

slide-37
SLIDE 37

Meaning Representations

— All structures from set of symbols

— Representational vocabulary

— Symbol structures correspond to:

— Objects — Properties of objects — Relations among objects

— Can be viewed as:

— Representation of meaning of linguistic input

slide-38
SLIDE 38

Meaning Representations

— All structures from set of symbols

— Representational vocabulary

— Symbol structures correspond to:

— Objects — Properties of objects — Relations among objects

— Can be viewed as:

— Representation of meaning of linguistic input — Representation of state of world

slide-39
SLIDE 39

Representational Requirements

— Verifiability — Unambiguous representations — Canonical Form — Inference and Variables — Expressiveness

— Should be able to express meaning of any NL sent

slide-40
SLIDE 40

Verifiability

— Can a system compare

— Description of state given by representation to — State of some world modeled by a knowledge base (kb)?

slide-41
SLIDE 41

Verifiability

— Can a system compare

— Description of state given by representation to — State of some world modeled by a knowledge base (kb)?

— Is the proposition encoded by the representation true?

slide-42
SLIDE 42

Verifiability

— Can a system compare

— Description of state given by representation to — State of some world modeled by a knowledge base (kb)?

— Is the proposition encoded by the representation true? — E.g.

— Input: Does Maharani server vegetarian food? — Representation: Serves(Maharani,VegetarianFood) — KB: Set of assertions about restaurants

slide-43
SLIDE 43

Verifiability

— Can a system compare

— Description of state given by representation to — State of some world modeled by a knowledge base (kb)?

— Is the proposition encoded by the representation true? — E.g.

— Input: Does Maharani server vegetarian food? — Representation: Serves(Maharani,VegetarianFood) — KB: Set of assertions about restaurants — If representation matches in KB -> True

slide-44
SLIDE 44

Verifiability

— Can a system compare

— Description of state given by representation to — State of some world modeled by a knowledge base (kb)?

— Is the proposition encoded by the representation true? — E.g.

— Input: Does Maharani server vegetarian food? — Representation: Serves(Maharani,VegetarianFood) — KB: Set of assertions about restaurants — If representation matches in KB -> True — If not, False

slide-45
SLIDE 45

Verifiability

— Can a system compare

— Description of state given by representation to — State of some world modeled by a knowledge base (kb)?

— Is the proposition encoded by the representation true? — E.g.

— Input: Does Maharani server vegetarian food? — Representation: Serves(Maharani,VegetarianFood) — KB: Set of assertions about restaurants — If representation matches in KB -> True — If not, False or Don’t Know

— Is KB assumed complete or incomplete?

slide-46
SLIDE 46

Unambiguous Representations

— Semantics is ambiguous:

— I wanna eat someplace close to UW

slide-47
SLIDE 47

Unambiguous Representations

— Semantics is ambiguous:

— I wanna eat someplace close to UW

— Eat at someplace OR eat the restaurant

— (Final) Representation must be unambiguous, e.g.,

— E1=want(I,E2) — E2=eat(I,O1,Loc1)

slide-48
SLIDE 48

Unambiguous Representations

— Semantics is ambiguous:

— I wanna eat someplace close to UW

— Eat at someplace OR eat the restaurant

— (Final) Representation must be unambiguous, e.g.,

— E1=want(I,E2) — E2=eat(I,O1,Loc1)

— Resolving the ambiguity?

— Later

slide-49
SLIDE 49

Canonical Form

— Input can have many meanings, and — Many inputs can have same meaning

— Flights from Seattle to Chicago

slide-50
SLIDE 50

Canonical Form

— Input can have many meanings, and — Many inputs can have same meaning

— Flights from Seattle to Chicago — Are there any flights from Seattle to Chicago?

slide-51
SLIDE 51

Canonical Form

— Input can have many meanings, and — Many inputs can have same meaning

— Flights from Seattle to Chicago — Are there any flights from Seattle to Chicago? — Do flights go from Seattle to Chicago?

slide-52
SLIDE 52

Canonical Form

— Input can have many meanings, and — Many inputs can have same meaning

— Flights from Seattle to Chicago — Are there any flights from Seattle to Chicago? — Do flights go from Seattle to Chicago? — Which flights are flown from Seattle to Chicago?

— Could all have different forms

slide-53
SLIDE 53

Canonical Form

— Input can have many meanings, and — Many inputs can have same meaning

— Flights from Seattle to Chicago — Are there any flights from Seattle to Chicago? — Do flights go from Seattle to Chicago? — Which flights are flown from Seattle to Chicago?

— Could all have different forms

— Difficult to test in KB

slide-54
SLIDE 54

Canonical Form

— Input can have many meanings, and — Many inputs can have same meaning

— Flights from Seattle to Chicago — Are there any flights from Seattle to Chicago? — Do flights go from Seattle to Chicago? — Which flights are flown from Seattle to Chicago?

— Could all have different forms

— Difficult to test in KB

— Single canonical form allows consistent verification

slide-55
SLIDE 55

Canonical Form

— Issue:

slide-56
SLIDE 56

Canonical Form

— Issue:

— Pushes ambiguity resolution into semantic analysis

— Different surface forms, but same underlying meaning

slide-57
SLIDE 57

Canonical Form

— Issue:

— Pushes ambiguity resolution into semantic analysis

— Different surface forms, but same underlying meaning

— Words: E.g, food, fare, dishes

— Word senses, synonymy — Word sense disambiguation

slide-58
SLIDE 58

Canonical Form

— Issue:

— Pushes ambiguity resolution into semantic analysis

— Different surface forms, but same underlying meaning

— Words: E.g, food, fare, dishes

— Word senses, synonymy — Word sense disambiguation

— Syntactic alternations:

— E.g. active vs passive — Interrogative vs declarative forms, topicalization, etc

slide-59
SLIDE 59

Inference

— Can vegetarians eat at Maharani? — Does Maharani serve vegetarian food?

slide-60
SLIDE 60

Inference

— Can vegetarians eat at Maharani? — Does Maharani serve vegetarian food?

— Meanings are not identical, but

slide-61
SLIDE 61

Inference

— Can vegetarians eat at Maharani? — Does Maharani serve vegetarian food?

— Meanings are not identical, but — Linked by facts in the world — Inference allows system to draw valid conclusions

from meaning rep. and KB — Serves(Maharani,VegetarianFood) => — CanEat(Vegetarians,AtMaharani)

slide-62
SLIDE 62

Inference

— Can vegetarians eat at Maharani? — Does Maharani serve vegetarian food?

— Meanings are not identical, but — Linked by facts in the world

slide-63
SLIDE 63

Inference

— Can vegetarians eat at Maharani? — Does Maharani serve vegetarian food?

— Meanings are not identical, but — Linked by facts in the world — Inference allows system to draw valid conclusions

from meaning rep. and KB — Serves(Maharani,VegetarianFood) => — CanEat(Vegetarians,AtMaharani)

slide-64
SLIDE 64

Variables

— I want a restaurant that serves vegetarian food.

— Can we match this in KB?

slide-65
SLIDE 65

Variables

— I want a restaurant that serves vegetarian food.

— Can we match this in KB?

— No restaurant specified, so no simple assertion match

— Solution:

— Variables

— Serves(x, VegetarianFood)

slide-66
SLIDE 66

Variables

— I want a restaurant that serves vegetarian food.

— Can we match this in KB?

— No restaurant specified, so no simple assertion match

— Solution:

— Variables

— Serves(x, VegetarianFood)

— True if variable can be replaced by some object s.t.

resulting proposition can match some assertion in KB

slide-67
SLIDE 67

Meaning Structure of Language

— Human languages

— Display basic predicate-argument structure — Employ variables — Employ quantifiers — Exhibit a (partially) compositional semantics

slide-68
SLIDE 68

Predicate-Argument Structure

— Represent concepts and relationships — Words behave like predicates:

slide-69
SLIDE 69

Predicate-Argument Structure

— Represent concepts and relationships — Words behave like predicates:

— Verbs, Adj, Adv:

— Eat(John,VegetarianFood); Red(Ball)

— Some words behave like arguments:

slide-70
SLIDE 70

Predicate-Argument Structure

— Represent concepts and relationships — Words behave like predicates:

— Verbs, Adj, Adv:

— Eat(John,VegetarianFood); Red(Ball)

— Some words behave like arguments:

— Nouns: Eat(John,VegetarianFood); Red(Ball)

— Subcategorization frames indicate:

slide-71
SLIDE 71

Predicate-Argument Structure

— Represent concepts and relationships — Words behave like predicates:

— Verbs, Adj, Adv:

— Eat(John,VegetarianFood); Red(Ball)

— Some words behave like arguments:

— Nouns: Eat(John,VegetarianFood); Red(Ball)

— Subcategorization frames indicate:

— Number, Syntactic category, order of args

slide-72
SLIDE 72

Semantic Roles

— Roles of entities in an event

— E.g. JohnAGENT hit BillPATIENT

— Semantic restrictions constrain entity types

— The dog slept. — ?The rocks slept.

— Verb subcategorization links surface syntactic

elements with semantic roles

slide-73
SLIDE 73

First-Order Logic

— Meaning representation:

— Provides sound computational basis for verifiability,

inference, expressiveness

— Supports determination of propositional truth — Supports compositionality of meaning — Supports inference — Supports generalization through variables

slide-74
SLIDE 74

First-Order Logic

— FOL terms:

— Constants: specific objects in world;

— A, B, Maharani — Refer to exactly one object; objects referred by many

slide-75
SLIDE 75

First-Order Logic

— FOL terms:

— Constants: specific objects in world;

— A, B, Maharani — Refer to exactly one object; objects referred by many

— Functions: concepts refer to objects, e.g. Frasca’s loc

— LocationOf(Frasca) — Refer to objects, avoid using constants

slide-76
SLIDE 76

First-Order Logic

— FOL terms:

— Constants: specific objects in world;

— A, B, Maharani — Refer to exactly one object; objects referred by many

— Functions: concepts refer to objects, e.g. Frasca’s loc

— LocationOf(Frasca) — Refer to objects, avoid using constants

— Variables:

— x, e; as in LocationOf(x)

slide-77
SLIDE 77

FOL Representation

— Predicates:

— Relations among objects

— Maharani serves vegetarian food. => — Serves(Maharani, VegetarianFood) — Maharani is a restaurant. => — Restaurant(Maharani)

slide-78
SLIDE 78

FOL Representation

— Predicates:

— Relations among objects

— Maharani serves vegetarian food. => — Serves(Maharani, VegetarianFood) — Maharani is a restaurant. => — Restaurant(Maharani)

— Logical connectives:

— Allow compositionality of meaning

— Maharani serves vegetarian food and is cheap.

slide-79
SLIDE 79

FOL Representation

— Predicates:

— Relations among objects

— Maharani serves vegetarian food. => — Serves(Maharani, VegetarianFood) — Maharani is a restaurant. => — Restaurant(Maharani)

— Logical connectives:

— Allow compositionality of meaning

— Maharani serves vegetarian food and is cheap. — Serves(Maharani,VegetarianFood) ∧ Cheap(Maharani)

slide-80
SLIDE 80

FOL Representation

— Predicates:

— Relations among objects

— Maharani serves vegetarian food. => — Serves(Maharani, VegetarianFood) — Maharani is a restaurant. => — Restaurant(Maharani)

— Logical connectives:

— Allow compositionality of meaning

— Maharani serves vegetarian food and is cheap. — Serves(Maharani,VegetarianFood) ∧ Cheap(Maharani)

slide-81
SLIDE 81

Variables & Quantifiers

— Variables refer to:

slide-82
SLIDE 82

Variables & Quantifiers

— Variables refer to:

— Anonymous objects

slide-83
SLIDE 83

Variables & Quantifiers

— Variables refer to:

— Anonymous objects — All objects in some collection

— Quantifiers:

slide-84
SLIDE 84

Variables & Quantifiers

— Variables refer to:

— Anonymous objects — All objects in some collection

— Quantifiers:

— : existential quantifier: “there exists”

— Indefinite NP

, one such object for truth

— A cheap restaurant that serves vegetarian food

—

!

!xRestaurant(x)"Serves(x,VegetarianFood)"Cheap(x)

slide-85
SLIDE 85

Variables & Quantifiers

— Variables refer to:

— Anonymous objects — All objects in some collection

— Quantifiers:

— : existential quantifier: “there exists”

— Indefinite NP

, one such object for truth

— A cheap restaurant that serves vegetarian food

— : universal quantifier: “for all”

— All vegetarian restaurants server vegetarian food.

!

!

!xRestaurant(x)"Serves(x,VegetarianFood)"Cheap(x)

!xVegetarianRestaurant(c) " Serves(x,VegetarianFood)

slide-86
SLIDE 86

Lambda Expressions

— Lambda notation: (Church, 1940)

— Just like lambda in Python — Allows abstraction over FOL formulas

— Supports compositionality

— Applied to logical terms to form exp.

— Binds formal params to term

— Essentially unnamed function w/params

— Application substitutes terms for formal params

slide-87
SLIDE 87

Examples

!x.P(x) !x.P(x)(A) P(A) !x.!y.Near(x, y) !x.!y.Near(x, y)(Bacaro) !y.Near(Bacaro, y) !y.Near(Bacaro, y)(Centro) Near(Bacaro,Centro)

slide-88
SLIDE 88

Lambda Expressions

— Currying;

— Converting multi-arguments preds to sequence of

single argument preds

— Why?

slide-89
SLIDE 89

Lambda Expressions

— Currying;

— Converting multi-arguments preds to sequence of

single argument preds

— Why?

— Incrementally accumulates multiple arguments spread

  • ver different parts of parse tree