Compositional Semantics Jacob Andreas
Problem 1 Each of the three girls has a platypus. Each of the three girls climbed the mountain. How many platypuses? How many mountains? 2
Problem 1 Each of the three girls has a platypus. 3
Problem 1 Each of the three girls climbed the mountain. 4
Problem 2 name type coastal There are 128 cities city no Columbia in South Carolina. river yes Cooper city yes Charleston 5
Problem 3 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… Is Barack Obama from the United States? 6
Compositional semantics It’s not enough to have structured representations of syntax: We also need structured representations of meaning . 7
Compositional semantics 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? 8
P ART I What is meaning?
Meaning in formal languages a + b = 17 10
Meaning in formal languages a + b = 17 11
Meaning in formal languages a + b = 17 a = ? b = ? 12
Meanings are sets of valid assignments a + b = 17 {a=0, b=0} {a=17, b=0} {a=3, b=10} {a=10, b=7} {a=5, b=12} {a=5, b=5} 13
Meanings are sets of valid assignments a + b = 17 {a=0, b=0} {a=17, b=0} ✘ ✔ {a=3, b=10} {a=10, b=7} ✘ ✔ {a=5, b=12} {a=5, b=5} ✔ ✘ 14
Meanings are sets of valid assignments a + 3 = 20 - b {a=0, b=0} {a=17, b=0} ✘ ✔ {a=3, b=10} {a=10, b=7} ✘ ✔ {a=5, b=12} {a=5, b=5} ✔ ✘ 15
Meanings are functions that judge validity ⟦ a + b = 17 ⟧ {a=5, b=12} ✔ 16
Meanings are functions that judge validity ⟦ a + b = 17 ⟧ {a=3, b=10} ✘ 17
Lessons from math ⟦ a + b = 17 ⟧ 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=3, b=10} 18
Meaning in natural languages Pat likes Sal. 19
Representing possible worlds Pat Sal Individuals Properties whale sad Relations loves contains 20
Example world Sam Pat Sal Lou 21
Example world loves Sam scared likes Pat worried likes contains likes Sal Lou shark happy 22
Different example world loves sad Sam Pat sad loves loves Sal Lou sad sad 23
Representing possible worlds Pat Sal Individuals Properties whale={Lou}, sad={Pat,Sal} Relations likes={(Pat,Sal),(Sal,Sam)} 24
Interpretations of sentences Pat likes Sal. loves loves scared scared likes Sam likes Sam worried worried Pat Pat likes loves contains likes Sal Sal Lou shark Lou shark happy scared likes Sam loves scared likes Sam worried Pat likes contains worried Pat likes contains likes Sal Lou human likes Sal Lou dog happy happy 25
Interpretations of sentences Lou is a shark. loves loves scared scared likes Sam likes Sam worried worried Pat Pat likes loves contains likes Sal Sal Lou shark Lou shark happy scared likes Sam loves scared likes Sam worried Pat likes contains worried Pat likes contains likes Sal Lou human likes Sal Lou dog happy happy 26
Interpretations of sentences Sam is inside Lou, a shark. loves loves scared scared likes Sam likes Sam worried worried Pat Pat likes loves contains likes Sal Sal Lou shark Lou shark happy scared likes Sam loves scared likes Sam worried Pat likes contains worried Pat likes contains likes Sal Lou human likes Sal Lou dog happy happy 27
K EY IDEA The meaning of a sentence is the set of possible worlds it picks out.
P ART II How is meaning constructed?
Explicit representation is too hard Pat likes Sal. loves loves scared scared likes Sam likes Sam worried worried Pat Pat likes loves contains likes Sal Sal Lou shark Lou shark happy scared likes Sam loves scared likes Sam worried Pat likes contains worried Pat likes contains likes Sal Lou human likes Sal Lou dog happy happy 30
Meanings as functions ⟦ Pat likes Sal ⟧ loves scared likes Sam ✔ worried Pat likes Sal Lou whale happy 31
Meanings as logical statements ⟦ Pat likes Sal ⟧ likes(Pat, Sal) loves scared likes Sam ✔ worried Pat likes likes Sal Lou whale happy 32
Expressing functions with logic Pat likes Sal likes(Pat, Sal) 33
Meanings as logical statements Lou is a shark shark(Lou) 34
Meanings as logical statements Sam is inside Lou, a shark 35
Meanings as logical statements Sam is inside Lou, a shark shark(Lou) ∧ contains(Lou, Sam) 36
Meanings as logical statements Nobody likes Lou 37
Meanings as logical statements Nobody likes Lou ∀ x. ¬likes(x, Lou) 38
Meanings as logical statements Everyone who knows Sal is happy 39
Meanings as logical statements Everyone who knows Sal is happy ∀ x. knows(x, Sal) → happy(x) 40
K EY IDEA Collections of possible worlds can be compactly represented with logical forms.
Compositionality of meaning Pat likes Sal likes(Pat, Sal) Lou is a shark shark(Lou) Sam is inside Lou, shark(Lou) ∧ a shark contains(Lou, Sam) Nobody likes Lou ∀ x.¬likes(x, Lou) 42
Compositionality of meaning Pat likes Sal likes(Pat, Sal) Lou is a shark shark(Lou) Sam is inside Lou, shark(Lou) ∧ a shark contains(Lou, Sam) Nobody likes Lou ∀ x.¬likes(x, Lou) 43
Compositionality of meaning Pat likes Sal likes(Pat, Sal) Lou is a shark shark(Lou) Sam is inside Lou, shark(Lou) ∧ a shark contains(Lou, Sam) Nobody likes Lou ∀ x.¬likes(x, Lou) 44
Compositionality of meaning A Sal le gusta Pat likes(Pat, Sal) Lou es un tiburón shark(Lou) Sam está dentro de shark(Lou) ∧ Lou, un tiburón contains(Lou, Sam) A nadie le gusta Lou ∀ x.¬likes(x, Lou) 45
Compositionality of meaning likes(Pat, Sal) a12 b5 c67 a8 shark(Lou) a12 b5 c0 a0 shark(Lou) ∧ a12 b16 c12 c12 contains(Lou, Sam) a53 ∀ x.¬likes(x, Lou) 46
K EY IDEA Pieces of logical forms correspond to pieces of language
Building a lexicon Sam is inside Lou, a shark shark(Lou) ∧ contains(Lou, Sam) Pat: Pat Sal: Sal Sam: Sam Lou: Lou 48
Building a lexicon Sam is inside Lou, a shark shark(Lou) ∧ contains(Lou, Sam) Pat: Pat shark: λx.whale(x) Sal: Sal Sal: Sal Sam: Sam Sam: Sam Lou: Lou Lou: Lou 49
Building a lexicon Sam is inside Lou, a shark shark(Lou) ∧ contains(Lou, Sam) Pat: Pat shark: λx.shark(x) Sal: Sal Sal: Sal Sam: Sam Sam: Sam Lou: Lou Lou: Lou 50
Building a lexicon Sam is inside Lou, a shark shark(Lou) ∧ contains(Lou, Sam) Pat: Pat shark: λx.shark(x) Sal: Sal likes: λyx.likes(x, y) Sam: Sam nobody: λf. ∀ x.¬f(x) Lou: Lou Lou: Lou ... 51
What do we do now? Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) 52
What do we do now? Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) 53
What do we do now? Ax.letter(x)? Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) 54
What do we do now? letter(λf.Ax.f(x))? Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) 55
What do we do now? ??? Ax.letter(x)? Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) 56
What do we do now? ????? Pat sent Lou urgently . Pat λyzx.sent(x,y,z) Lou ??? 57
Semantic types Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) {Obj,Obj,Obj} Object Object Object Object Bool Bool Bool Bool 58
Semantic types & syntax Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) NP,NP,NP NP NP NP NP S S S S 59
Semantic types & syntax Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) NP NP S|(S|NP) S|NP ((S|NP)|NP)|NP 60
Categorial grammar Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) NP ((S\NP)/NP)/NP NP NP/(S/NP) S/NP 61
Parsing with a categorial grammar Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) NP ((S\NP)/NP)/NP NP NP/(S/NP) S/NP Ax.letter(x) NP 62
Parsing with a categorial grammar Pat sent Lou a letter Pat λyzx.sent(x,y,z) Lou λf.Ax.f(x) λx.letter(x) NP ((S\NP)/NP)/NP NP NP/(S/NP) S/NP λzx.sent(x,Lou,z) Ax.letter(x) (S\NP)/NP NP 63
Recommend
More recommend