compositional semantics
play

Compositional Semantics Jacob Andreas Problem 1 Each of the three - PowerPoint PPT Presentation

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


  1. Compositional Semantics Jacob Andreas

  2. 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

  3. Problem 1 Each of the three girls has a platypus. 3

  4. Problem 1 Each of the three girls climbed the mountain. 4

  5. Problem 2 name type coastal There are 128 cities 
 city no Columbia in South Carolina. river yes Cooper city yes Charleston 5

  6. 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

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

  8. 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

  9. P ART I 
 What is meaning?

  10. Meaning in formal languages a + b = 17 10

  11. Meaning in formal languages a + b = 17 11

  12. Meaning in formal languages a + b = 17 a = ? b = ? 12

  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} 13

  14. 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

  15. 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

  16. Meanings are functions that judge validity ⟦ a + b = 17 ⟧ {a=5, b=12} ✔ 16

  17. Meanings are functions that judge validity ⟦ a + b = 17 ⟧ {a=3, b=10} ✘ 17

  18. 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

  19. Meaning in natural languages Pat likes Sal. 19

  20. Representing possible worlds Pat Sal Individuals Properties whale sad Relations loves contains 20

  21. Example world Sam Pat Sal Lou 21

  22. Example world loves Sam scared likes Pat worried likes contains likes Sal Lou shark happy 22

  23. Different example world loves sad Sam Pat sad loves loves Sal Lou sad sad 23

  24. Representing possible worlds Pat Sal Individuals Properties whale={Lou}, sad={Pat,Sal} Relations likes={(Pat,Sal),(Sal,Sam)} 24

  25. 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

  26. 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

  27. 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

  28. K EY IDEA 
 The meaning of a sentence is the set of possible worlds it picks out.

  29. P ART II 
 How is meaning constructed?

  30. 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

  31. Meanings as functions ⟦ Pat likes Sal ⟧ loves scared likes Sam ✔ worried Pat likes Sal Lou whale happy 31

  32. Meanings as logical statements ⟦ Pat likes Sal ⟧ likes(Pat, Sal) loves scared likes Sam ✔ worried Pat likes likes Sal Lou whale happy 32

  33. Expressing functions with logic Pat likes Sal likes(Pat, Sal) 33

  34. Meanings as logical statements Lou is a shark shark(Lou) 34

  35. Meanings as logical statements Sam is inside Lou, a shark 35

  36. Meanings as logical statements Sam is inside Lou, a shark shark(Lou) ∧ contains(Lou, Sam) 36

  37. Meanings as logical statements Nobody likes Lou 37

  38. Meanings as logical statements Nobody likes Lou ∀ x. ¬likes(x, Lou) 38

  39. Meanings as logical statements Everyone who knows Sal is happy 39

  40. Meanings as logical statements Everyone who knows Sal is happy ∀ x. knows(x, Sal) → happy(x) 40

  41. K EY IDEA 
 Collections of possible worlds can be compactly represented with logical forms.

  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) 42

  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) 43

  44. 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

  45. 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

  46. 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

  47. K EY IDEA 
 Pieces of logical forms correspond to pieces of language

  48. Building a lexicon Sam is inside Lou, a shark shark(Lou) ∧ contains(Lou, Sam) Pat: Pat Sal: Sal Sam: Sam Lou: Lou 48

  49. 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

  50. 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

  51. 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

  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) 52

  53. 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

  54. 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

  55. 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

  56. 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

  57. What do we do now? ????? Pat sent Lou urgently . Pat λyzx.sent(x,y,z) Lou ??? 57

  58. 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

  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,NP NP NP NP NP S S S S 59

  60. 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

  61. 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

  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 Ax.letter(x) NP 62

  63. 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