compositional semanticsjda/slides/jda_info159.pdf · 2020-02-18 · compositional semantics 8...

88
Compositional Semantics Jacob Andreas

Upload: others

Post on 22-Jul-2020

6 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Compositional Semantics

Jacob Andreas

Page 2: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 1

2

Each of the three girls has a platypus.

Each of the three girls climbed the mountain.

How many platypuses?

How many mountains?

Page 3: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 1

3

Each of the three girls has a platypus.

Page 4: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 1

4

Each of the three girls climbed the mountain.

Page 5: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 2

5

name type coastal

Columbia city no

Cooper river yes

Charleston city yes

There are 128 cities in South Carolina.

Page 6: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 3

6

Is Barack Obama from the United States?

Barack Obama was the 44th President of the United States. Obama was born on August 4 in Honolulu, Hawaii. In late August 1961, Obama's mother moved with him to the University of Washington in Seattle for a year…

Page 7: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Compositional semantics

7

It’s not enough to have structured representations of syntax: We also need structured representations of meaning.

Page 8: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Compositional semantics

8

It’s not enough to have structured representations of syntax: We also need structured representations of meaning.

Today: How do we get from language to meaning?

Page 9: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

PART IWhat is meaning?

Page 10: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

10

a + b = 17

Meaning in formal languages

Page 11: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

11

a + b = 17

Meaning in formal languages

Page 12: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

12

a + b = 17

a = ? b = ?

Meaning in formal languages

Page 13: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

13

{a=0, b=0}

{a=3, b=10}

{a=5, b=12}

{a=17, b=0}

{a=10, b=7}

{a=5, b=5}

a + b = 17

Meanings are sets of valid assignments

Page 14: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

{a=0, b=0}

{a=5, b=12}14

{a=3, b=10}

{a=17, b=0}

{a=10, b=7}

{a=5, b=5}

✔✘

a + b = 17

Meanings are sets of valid assignments

Page 15: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

{a=0, b=0}

{a=5, b=12}15

{a=3, b=10}

{a=17, b=0}

{a=10, b=7}

{a=5, b=5}

✔✘

a + 3 = 20 - b

Meanings are sets of valid assignments

Page 16: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

{a=5, b=12}16

⟦a + b = 17⟧

Meanings are functions that judge validity

Page 17: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

17

⟦a + b = 17⟧

{a=3, b=10} ✘

Meanings are functions that judge validity

Page 18: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Lessons from math

18

The meaning of a statement is the set of possible worlds consistent with that statement.

Here, a “possible world” is an assignment of values to variables.

⟦a + b = 17⟧

{a=3, b=10}

Page 19: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

19

Pat likes Sal.

Meaning in natural languages

Page 20: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Representing possible worlds

20

Individuals

Properties

Relations

Pat Sal

whale

loves

sad

contains

Page 21: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

21

Pat

Sal

Sam

Lou

Example world

Page 22: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

worried

22

Pat

Sal

Sam

Lou

likes

likes

contains

loves

likes

happy

scared

shark

Example world

Page 23: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

23

Pat

Sal

Sam

Louloves

loves

lovessad

sad

sad

sad

Different example world

Page 24: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Representing possible worlds

24

Individuals

Properties

Relations

Pat Sal

whale={Lou},sad={Pat,Sal}

likes={(Pat,Sal),(Sal,Sam)}

Page 25: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

25

Pat likes Sal.

worried Pat

Sal

Sam

Lou

likes

likes

loves

likes

happy

scared

shark

worried Pat

Sal

Sam

Lou

loves contains

loves

likes scared

shark

worried Pat

Sal

Sam

Lou

likes

likes

contains

likes

happy

scared

human

worried Pat

Sal

Sam

Lou

likes

likes

contains

loves

likes

happy

scared

dog

Interpretations of sentences

Page 26: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

26

Lou is a shark.

worried Pat

Sal

Sam

Lou

likes

likes

loves

likes

happy

scared

shark

worried Pat

Sal

Sam

Lou

loves contains

loves

likes scared

shark

worried Pat

Sal

Sam

Lou

likes

likes

contains

likes

happy

scared

human

worried Pat

Sal

Sam

Lou

likes

likes

contains

loves

likes

happy

scared

dog

Interpretations of sentences

Page 27: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

27

Sam is inside Lou, a shark.

worried Pat

Sal

Sam

Lou

likes

likes

loves

likes

happy

scared

shark

worried Pat

Sal

Sam

Lou

loves contains

loves

likes scared

shark

worried Pat

Sal

Sam

Lou

likes

likes

contains

likes

happy

scared

human

worried Pat

Sal

Sam

Lou

likes

likes

contains

loves

likes

happy

scared

dog

Interpretations of sentences

Page 28: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEAThe meaning of a sentence is the set

of possible worlds it picks out.

Page 29: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

PART IIHow is meaning constructed?

Page 30: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

30

Pat likes Sal.

worried Pat

Sal

Sam

Lou

likes

likes

loves

likes

happy

scared

shark

worried Pat

Sal

Sam

Lou

loves contains

loves

likes scared

shark

worried Pat

Sal

Sam

Lou

likes

likes

contains

likes

happy

scared

human

worried Pat

Sal

Sam

Lou

likes

likes

contains

loves

likes

happy

scared

dog

Explicit representation is too hard

Page 31: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

31

⟦Pat likes Sal⟧

worried Pat

Sal

Sam

Lou

likes

loves

likes

happy

scared

whale

Meanings as functions

Page 32: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

32

⟦Pat likes Sal⟧

worried Pat

Sal

Sam

Lou

likes

likes

loves

likes

happy

scared

whale

likes(Pat,Sal)

Meanings as logical statements

Page 33: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

33

Pat likes Sallikes(Pat,Sal)

Expressing functions with logic

Page 34: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

34

Lou is a sharkshark(Lou)

Meanings as logical statements

Page 35: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

35

Sam is inside Lou, a shark

Meanings as logical statements

Page 36: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

36

Sam is inside Lou, a sharkshark(Lou)∧contains(Lou,Sam)

Meanings as logical statements

Page 37: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

37

Nobody likes Lou

Meanings as logical statements

Page 38: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

38

Nobody likes Lou∀x.¬likes(x,Lou)

Meanings as logical statements

Page 39: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

39

Everyone who knows Sal is happy

Meanings as logical statements

Page 40: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

40

Everyone who knows Sal is happy

∀x.knows(x,Sal)→happy(x)

Meanings as logical statements

Page 41: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEACollections of possible worlds can be

compactly represented with logical forms.

Page 42: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

likes(Pat,Sal)

shark(Lou)

shark(Lou)∧contains(Lou,Sam)

∀x.¬likes(x,Lou)42

Pat likes Sal

Lou is a shark

Sam is inside Lou,a shark

Nobody likes Lou

Compositionality of meaning

Page 43: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

likes(Pat,Sal)

shark(Lou)

shark(Lou)∧contains(Lou,Sam)

∀x.¬likes(x,Lou)43

Pat likes Sal

Lou is a shark

Sam is inside Lou,a shark

Nobody likes Lou

Compositionality of meaning

Page 44: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

likes(Pat,Sal)

shark(Lou)

shark(Lou)∧contains(Lou,Sam)

∀x.¬likes(x,Lou)44

Pat likes Sal

Lou is a shark

Sam is inside Lou,a shark

Nobody likes Lou

Compositionality of meaning

Page 45: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

likes(Pat,Sal)

shark(Lou)

shark(Lou)∧contains(Lou,Sam)

∀x.¬likes(x,Lou)45

A Sal le gusta Pat

Lou es un tiburón

Sam está dentro deLou, un tiburón

A nadie le gusta Lou

Compositionality of meaning

Page 46: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

likes(Pat,Sal)

shark(Lou)

shark(Lou)∧contains(Lou,Sam)

∀x.¬likes(x,Lou)46

a12 b5 c67 a8

a12 b5 c0 a0

a12 b16 c12 c12

a53

Compositionality of meaning

Page 47: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEAPieces of logical forms

correspond to pieces of language

Page 48: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

48

Pat: Pat

Sal: Sal Sam: Sam

Lou: Lou

shark(Lou)∧contains(Lou,Sam)Sam is inside Lou, a shark

Building a lexicon

Page 49: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

49

Pat: Pat

Sal: Sal Sam: Sam

Lou: Lou

shark: λx.whale(x)

Sal: Sal Sam: Sam

Lou: Lou

shark(Lou)∧contains(Lou,Sam)Sam is inside Lou, a shark

Building a lexicon

Page 50: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

50

Pat: Pat

Sal: Sal Sam: Sam

Lou: Lou

shark: λx.shark(x)

Sal: Sal Sam: Sam

Lou: Lou

shark(Lou)∧contains(Lou,Sam)Sam is inside Lou, a shark

Building a lexicon

Page 51: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

51

Pat: Pat

Sal: Sal Sam: Sam

Lou: Lou

shark: λx.shark(x)

likes: λyx.likes(x,y) nobody: λf.∀x.¬f(x)

Lou: Lou...

shark(Lou)∧contains(Lou,Sam)Sam is inside Lou, a shark

Building a lexicon

Page 52: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

52

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

What do we do now?

Page 53: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

53

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

What do we do now?

Page 54: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

54

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

What do we do now?

Ax.letter(x)?

Page 55: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

55

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

What do we do now?

letter(λf.Ax.f(x))?

Page 56: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

56

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

What do we do now?

???

Ax.letter(x)?

Page 57: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

57

Pat sent Lou urgently .???λyzx.sent(x,y,z) LouPat

What do we do now?

?????

Page 58: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

58

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

ObjectBool

ObjectObject

Bool

{Obj,Obj,Obj}

Bool

Object

Bool

Semantic types

Page 59: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

59

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

NPS

NPNP

S

NP,NP,NP

S

NP

S

Semantic types & syntax

Page 60: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

60

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

NP NP S|NP((S|NP)|NP)|NP S|(S|NP)

Semantic types & syntax

Page 61: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

61

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

NP NP S/NPNP/(S/NP)((S\NP)/NP)/NP

Categorial grammar

Page 62: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

62

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

NP NP S/NPNP/(S/NP)((S\NP)/NP)/NP

NPAx.letter(x)

Parsing with a categorial grammar

Page 63: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

63

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

NP NP S/NPNP/(S/NP)

NP

((S\NP)/NP)/NP

Ax.letter(x)(S\NP)/NP

λzx.sent(x,Lou,z)

Parsing with a categorial grammar

Page 64: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

64

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

NP NP S/NPNP/(S/NP)

NP

((S\NP)/NP)/NP

Ax.letter(x)(S\NP)/NP

λzx.sent(x,Lou,z)

λx.sent(x,Lou,Ax.letter(x)) S\NP

Parsing with a categorial grammar

Page 65: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

65

Pat sent Lou a letterλx.letter(x)λf.Ax.f(x)λyzx.sent(x,y,z) LouPat

NP NP S/NPNP/(S/NP)

NP

((S\NP)/NP)/NP

Ax.letter(x)(S\NP)/NP

λzx.sent(x,Lou,z)

λx.sent(x,Lou,Ax.letter(x)) S\NP

sent(Pat,Lou,Ax.letter(x)) S

Parsing with a categorial grammar

Page 66: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

66

Pat sent Lou a letter

Semantics → Synax!

Page 67: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

67

Pat sent Lou a letter

Semantics → Synax!

Page 68: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEATypes in logic correspond to

grammatical categories in language

Page 69: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 1

69

Each of the three girls has a platypus.

Each of the three girls climbed the mountain.

∀x.girl(x)→∃y.platypus(y)∧has(x,y)

∃y.mountain(y)∧∀x.girl(x)→climbed(x,y)

Page 70: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 2

70

name type coastal

Columbia city no

Cooper river yes

Charleston city yes

There are 128 cities in South Carolina

Page 71: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 2

71

name type coastal

Columbia city no

Cooper river yes

Charleston city yes

There are 128 cities in South Carolina

same(128,countx.city(x)∧in(x,SouthCarolina)∧

Page 72: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 3

72

Is Barack Obama from the United States?

Barack Obama was the 44th President of the United States. Obama was born on August 4 in Honolulu, Hawaii. In late August 1961, Obama's mother moved with him to the University of Washington in Seattle for a year…

Page 73: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 3

73

Is Barack Obama from the United States?

Barack Obama was the 44th President of the United States. Obama was born on August 4 in Honolulu, Hawaii. In late August 1961, Obama's mother moved with him to the University of Washington in Seattle for a year…

from(Obama,UnitedStates)

born(Obama,Hawaii,August4)

Page 74: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Problem 3

74

Is Barack Obama from the United States?

Barack Obama was the 44th President of the United States. Obama was born on August 4 in Honolulu, Hawaii. In late August 1961, Obama's mother moved with him to the University of Washington in Seattle for a year…

born(Obama,Hawaii,August4)

from(Obama,UnitedStates)

born(x,y,z)→from(x,y)

from(x,y)∧in(y,z)→from(x,z)in(Hawaii,UnitedStates)∧

Page 75: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEAThe meaning of a sentence is the set

of possible worlds it picks out.

Page 76: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEACollections of possible worlds can be

compactly represented with logical forms.

Page 77: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEAPieces of logical forms

correspond to pieces of language

Page 78: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEATypes in logic correspond to

grammatical categories in language

Page 79: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

BONUS ROUNDWhat’s missing?

Page 80: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

80

Q: How do you like my cooking?

Saying what we mean

Page 81: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

81

Q: How do you like my cooking? A: It’s extremely interesting.

Saying what we mean

Page 82: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

82

Q: How do you like my cooking? A: It’s extremely interesting.

Q: Do you know what time it is?

Saying what we mean

Page 83: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

83

Q: How do you like my cooking? A: It’s extremely interesting.

Q: Do you know what time it is? A: Yes, I do.

Saying what we mean

Page 84: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

84

Sal might have seen a unicorn.

Pat thinks Sal saw a unicorn.

Pat wants to find a unicorn.

Belief & possibility

Page 85: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

KEY IDEANot all meaning is literal!

Page 86: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

BONUS ROUNDHistorical Notes

Page 87: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Alfred Tarski Richard Montague

Page 88: Compositional Semanticsjda/slides/jda_info159.pdf · 2020-02-18 · Compositional semantics 8 It’s not enough to have structured representations of syntax: We also need structured

Learn more

88

ling121: “Logical Semantics”

Ted Briscoe’s lecture notes: https://www.cl.cam.ac.uk/teaching/1011/L107/semantics.pdf

Mark Steedman, “The Syntactic Process”