SEMANTICS? Truth Verification A man is playing the accordion. A - - PowerPoint PPT Presentation

semantics truth verification
SMART_READER_LITE
LIVE PREVIEW

SEMANTICS? Truth Verification A man is playing the accordion. A - - PowerPoint PPT Presentation

The Parallel Meaning Bank TODAY: Computational Semantics, Meaning Representations and Discourse Representation Theory FRIDAY: Producing Meaning Representations Johan Bos WHAT IS COMPUTATIONAL SEMANTICS? Truth Verification A man is playing


slide-1
SLIDE 1

The Parallel Meaning Bank

TODAY: Computational Semantics, Meaning Representations and Discourse Representation Theory FRIDAY: Producing Meaning Representations

Johan Bos

slide-2
SLIDE 2

WHAT IS

COMPUTATIONAL SEMANTICS?

slide-3
SLIDE 3

Truth Verification

Two boys are making music. A man is playing the accordion. Two boys are making music. A man is playing the accordion.

slide-4
SLIDE 4

Reinterpretation

Turn left and or right to reach San Marco.

What is semantics about?

slide-5
SLIDE 5

Checking for new information

.. when there's more trade, there's more commerce!

slide-6
SLIDE 6

Checking for new information

.. when there's more trade, there's more commerce!

slide-7
SLIDE 7

Checking for new information

.. when there's more trade, there's more commerce!

slide-8
SLIDE 8

Contradiction Checking

slide-9
SLIDE 9

Contradiction Checking

slide-10
SLIDE 10

Creating Interpretations

  • How do you put an elephant in a fridge?

x y x is an elephant y is a fridge put x in y x y e x is an elephant y is a fridge e is a “put” event Theme of e is x

Destination of e is y

slide-11
SLIDE 11

The big idea of computational semantics

  • Automate the process of associating semantic

representations with expressions of natural language

  • Use logical representations of natural language to

automate the process of drawing inferences

Human Language

(ambiguous)

Logical Language

(unambiguous)

slide-12
SLIDE 12

Controlling Inference

expressive power

higher-order logic second-order logic first-order logic (predicate logic) description logics modal logics ¬ ∧ → v Discourse Representation Structure

reasoning efficiency

propositional logic

∀x ∃x

λx λP

∀P ∃P [] <>

A b s t r a c t M e a n i n g R e p r e s e n t a t i

  • n
slide-13
SLIDE 13

Planet X

slide-14
SLIDE 14

Planet Semantics

Proofs Models Representations

slide-15
SLIDE 15

Planet Semantics

Proof-Theoretic Semantics Model-Theoretic Semantics Representation of Semantics

studies relation between natural language and meanings studies relation between meanings and meanings studies relation between meanings and situations

slide-16
SLIDE 16

Representation

Proofs Models Lexical Semantics Compositional Semantics Discourse Semantics

slide-17
SLIDE 17

Proof-Theoretical Semantics

Proofs Models Lexical Semantics Compositional Semantics Discourse Semantics

Inductive Inference Abductive Inference Deductive Inference

slide-18
SLIDE 18

Model-Theoretic Semantics

Proofs Models Lexical Semantics Compositional Semantics Discourse Semantics

slide-19
SLIDE 19

Model-Theoretic Semantics

Proofs Models Lexical Semantics Compositional Semantics Discourse Semantics

Model Extraction Model Building Model Checking

slide-20
SLIDE 20

Models

§ Model-theoretic semantics § Alfred Tarski

slide-21
SLIDE 21

Models: approximations of reality

slide-22
SLIDE 22

An example model

slide-23
SLIDE 23

An example model

d1 d2 d3 d4 d5 d6 d7 d8

slide-24
SLIDE 24

An example model

d1 d2 d3 d4 d5 d6 d7 d8 (non-logical) symbols: man/1, woman/1, house/1, dog/1, bird/1, car/1, tree/1, happy/1, near/2, at/2

slide-25
SLIDE 25

An example model

d1 d2 d3 d4 d5 d6 d7 d8 (non-logical) symbols: man/1, woman/1, house/1, dog/1, bird/1, car/1, tree/1, happy/1, near/2, at/2 VOCABULARY

slide-26
SLIDE 26

An example model

M=<D,F> D={d1,d2,d3,d4,d5,d6,d7,d8} F(man)={d1} F(woman)={d2} F(house)={d3,d4} F(dog)={d5} F(bird)={d6} F(tree)={d7} F(car)={d8} F(happy)={d1,d2} F(near)={(d5,d2),(d2,d5)} F(at)={(d6,d3)}

d1 d2 d3 d4 d5 d6 d7 d8 (non-logical) symbols: man/1, woman/1, house/1, dog/1, bird/1, car/1, tree/1, happy/1, near/2, at/2

slide-27
SLIDE 27

A first-order model

  • A first-order model <D,F> has two parts:
  • D: a domain (the universe) of objects (entities)
  • F: an interpretation function
  • The interpretation functions maps symbols from our

vocabulary to members of the domain

  • Zero-place symbols (constants) are mapped to a single domain

member

  • One-place symbols (predicates) are mapped to a set of domain

members

  • Two-place symbols (relations) are mapped to a set of ordered

pairs of domain members

slide-28
SLIDE 28

An example model

M=<D,F> D={d1,d2,d3,d4} F(mia)=d2 F(honey-bunny)=d1 F(vincent)=d4 F(yolanda)=d3 F(customer)={d1,d2,d4} F(robber)={d3} F(love)=Ø

slide-29
SLIDE 29

A very small model

M=<D,F> D={d5}

slide-30
SLIDE 30

A very large model M=<D,F> D={d1,d2,d3,d4,d5,d6,d7,d8,d9,d10 F(man)={d1,d4,d12} F(woman)={d2,d3} F(car)={d14,d13} F(love)={(d2,d1), (d4,d4)} F(hate)={(d5,d1), (d1,d4),(d2,d2)} F(chopper)={d10}

slide-31
SLIDE 31

Finite models

  • In practice we can only work with finite models

(obviously)

  • But it is easy to find a description that is satisfiable 


but does not have a finite model

slide-32
SLIDE 32

Alternative names for models

  • Interpretation
  • Structure
slide-33
SLIDE 33

Model Extraction

  • The task of mapping sensory input (an image, video, or

audio) to a model
 Input: image
 Output: model

M=<D,F> D={d1,d2,d3,d4,d5} F(Jacket)={d2} F(LongHair)={d3} F(Has)={(d1,d3)} ....

source: Joo, Wang & Zhu (2013)

slide-34
SLIDE 34

FIRST-ORDER LOGIC (FOL) FORMULA IN FOL = MEANING REPRESENTATION = SEMANTIC REPRESENTATION

slide-35
SLIDE 35

Ingredients of a first-order language

  • 1. All symbols in the vocabulary – the non-logical symbols
  • f the first-order language
  • 2. Enough variables (a countably infinite collection):

x, y, z, etc.

  • 3. The connectives ¬ (negation), ∧ (conjunction),

∨ (disjunction), and → (implication)

  • 4. The quantifiers ∀ (the universal quantifier) and

∃ (the existential quantifier)

  • 5. Some punctuation symbols:

brackets and the comma.

slide-36
SLIDE 36

The satisfaction definition for FOL

slide-37
SLIDE 37

Model Checking

  • The task of the determining whether a given model

satisfies a formula (or a set of formulas)
 Input: model + formula
 Output: true or false

slide-38
SLIDE 38

Model Checking

M=<D,F> D={d1,d2,d3,d4} F(mia)=d1 F(honey-bunny)=d2 F(vincent)=d3 F(yolanda)=d4 F(customer)={d1,d3} F(robber)={d2,d4} F(love)={(d4,d2),(d3,d1)}

Q1: Does M satisfy: ∃x(customer(x) ∧ ∃y(customer(y) ∧ love(x,y))) Q2: Does M satisfy: ∃x(robber(x) ∧ love(x,x))

slide-39
SLIDE 39

The Parallel Meaning Bank

  • Input:

texts (English, Dutch, German, Italian)

  • Output:

Discourse Representation Structures (DRS) DRSs are the meaning representations proposed by Discourse Representation Theory. They are first-order representations.

slide-40
SLIDE 40

A SIMPLE EXAMPLE

slide-41
SLIDE 41

Tom is grinning.

slide-42
SLIDE 42

Tom is grinning.

There are three discourse referents in this DRS

slide-43
SLIDE 43

Tom is grinning.

There are seven conditions in this DRS

slide-44
SLIDE 44

Tom is grinning.

The non-logical symbols in this DRS

slide-45
SLIDE 45

Tom is grinning.

The constants in this DRS

slide-46
SLIDE 46

Tom is grinning.

There are three concept conditions in this DRS

slide-47
SLIDE 47

Tom is grinning.

There are three role conditions in this DRS

slide-48
SLIDE 48

Tom is grinning.

There is one comparison condition in this DRS

slide-49
SLIDE 49

Tom is grinning.

x1 is a male person with the name “tom”

slide-50
SLIDE 50

Tom is grinning.

e1 represents a a grinning event with agent x1 and time t1

slide-51
SLIDE 51

Tom is grinning.

t1 is a time point equal to the utterance time

slide-52
SLIDE 52

Tom is grinning.

in first-order logic ∃x∃e∃t(male(x)&Name(x,tom)&grin(e)&Time(e,t)&Agent(e,t)&time(t)&t=now)

slide-53
SLIDE 53

Tom is grinning.

A first-order model M=<D,F> D={d1,d2,d3,d4} F(male)={d1} F(grin)={d3} F(time)={d4} F(Time)={(d3,d4)} F(Agent)={(d3,d1)} F(Name)={(d1,d2)} F(now)=d4 F(tom)=d2

slide-54
SLIDE 54

AN EXAMPLE WITH NEGATION

slide-55
SLIDE 55

Tom is not famous.

slide-56
SLIDE 56

Tom is not famous.

Negation introduces the operator ¬ connected to an embedded DRS

slide-57
SLIDE 57

Tom is not famous.

Why use the symbol “celebrated” here?

slide-58
SLIDE 58

Tom is not famous.

Why use the symbol “celebrated” here?

slide-59
SLIDE 59

Tom is not famous.

in first-order logic ∃x(male(x)&Name(x,tom)&¬∃e∃t(celebrated(e)&Time(e,t)&Theme(e,x)&time(t)&t=now)

slide-60
SLIDE 60

Tom is not famous.

A first-order model M=<D,F> D={d1,d2,d3} F(male)={d1} F(celebrated)={} F(time)={} F(Time)={} F(Theme)={} F(Name)={(d1,d2)} F(now)=d3 F(tom)=d2

slide-61
SLIDE 61

AN EXAMPLE WITH IMPLICATION

slide-62
SLIDE 62

Everyone smiled at me.

slide-63
SLIDE 63

Everyone smiled at me.

Universal quantification Introduces the operator => connecting two embedded DRSs

slide-64
SLIDE 64

Everyone smiled at me.

in first-order logic ∀x(person(x)à∃e∃t(smile(e)&Recipient(e,speaker)&Time(e,t)&Agent(e,x)& …)

slide-65
SLIDE 65

The Big Picture

natural language statement

TRUE

  • r

FALSE

real world

slide-66
SLIDE 66

The Big Picture

Semantic Parsing Semantic Parsing Model Extraction Model Checking meaning model natural language statement

TRUE

  • r

FALSE

slide-67
SLIDE 67

Motivation u Integrate Lexical and Formal Semantics u Gold-standard meanings u Multi-lingual (not just English) u Resource for parsing/translation pmb.let.rug.nl

slide-68
SLIDE 68

Discourse Representation Theory

Hans Kamp, Irene Heim, Nirit Kadmon, Rob van der Sandt, Bart Geurts, David Beaver, Jan van Eijck, Uwe Reyle, Robin Cooper, Reinhard Muskens, Nicholas Asher, Alex Lascarides

slide-69
SLIDE 69

DRS example

Damon showed me his stamp album.

slide-70
SLIDE 70

Most likely interpretation

41/2289: Tom is stuck in his sleeping bag.

sleeping_bag.n.01(x) bag.n.01(x) sleep.v.01(e) Agent(e,x) z Z Z Z

slide-71
SLIDE 71

Quantification

Whoever guesses the number wins.

slide-72
SLIDE 72

Negation

My uncle isn't young, but he's healthy.

slide-73
SLIDE 73

Pronouns

My uncle isn't young, but he's healthy.

slide-74
SLIDE 74

Verb phrase coordination

Tom grabbed his umbrella and headed for the elevator.

slide-75
SLIDE 75

Possessives

Jane Austen’s books are very beautiful!

slide-76
SLIDE 76

Spatial expressions

There's a parrot in the birdcage.

slide-77
SLIDE 77

Measure phrases

Tom bet $300 on the race.

slide-78
SLIDE 78

Comparison

More than 1,500 people died when the Titanic sank in 1912.

slide-79
SLIDE 79

Lists

I visited cities such as New York, Chicago and Boston.

slide-80
SLIDE 80

Discourse relations

Tom will be absent today because he has a cold.

slide-81
SLIDE 81

Date expressions

Carl Smith died

  • n August 8.
slide-82
SLIDE 82

Kamp 2018

It rained yesterday.

slide-83
SLIDE 83

Evaluating Meaning Representations

Semantic Evaluation

§ Check for logical

equivalence

§ Use standard theorem

provers for first-order logic (Blackburn & Bos 2005)

§ Discrete score:

0 (no proof) 1 (proof) Syntactic Evaluation

§ Check matching clauses § Implementations:

§ Allen et al. 2008 § Smatch (Cai & Knight 2013) § Counter (van Noord et al.

2018) § Continuous score:

0.00 (no matches) 0.X (some but not all) 1.00 (perfect match)

slide-84
SLIDE 84

Clause Notation

It rained yesterday. 012345678901234567890

slide-85
SLIDE 85

Van Noord et al. 2018

slide-86
SLIDE 86

DRS and interlinguality

Logical symbols

☐negation ☐conditionals ☐scope (boxes) ☐variables

Non-logical symbols

☐predicates (concepts) ☐constants (names) ☐relations (roles) ☐comparison operators

slide-87
SLIDE 87

DRS and interlinguality

Logical symbols

þnegation ☐conditionals ☐scope (boxes) ☐variables

Non-logical symbols

☐predicates (concepts) ☐constants (names) ☐relations (roles) ☐comparison operators

slide-88
SLIDE 88

DRS and interlinguality

Logical symbols

þnegation þconditionals ☐scope (boxes) ☐variables

Non-logical symbols

☐predicates (concepts) ☐constants (names) ☐relations (roles) ☐comparison operators

slide-89
SLIDE 89

DRS and interlinguality

Logical symbols

þnegation þconditionals þscope (boxes) ☐variables

Non-logical symbols

☐predicates (concepts) ☐constants (names) ☐relations (roles) ☐comparison operators

slide-90
SLIDE 90

DRS and interlinguality

Logical symbols

þnegation þconditionals þscope (boxes) þvariables

Non-logical symbols

☐predicates (concepts) ☐constants (names) ☐relations (roles) ☐comparison operators

slide-91
SLIDE 91

DRS and interlinguality

Logical symbols

þnegation þconditionals þscope (boxes) þvariables

Non-logical symbols

☐predicates (concepts) ☐constants (names) ☐relations (roles) þcomparison operators

slide-92
SLIDE 92

DRS and interlinguality

Logical symbols

þnegation þconditionals þscope (boxes) þvariables

Non-logical symbols

☐predicates (concepts) ☐constants (names) þrelations (roles) þcomparison operators

slide-93
SLIDE 93

DRS and interlinguality

Logical symbols

þnegation þconditionals þscope (boxes) þvariables

Non-logical symbols

☐predicates (concepts) ýconstants (names) þrelations (roles) þcomparison operators

slide-94
SLIDE 94

Kamp 2018

It rained yesterday.

slide-95
SLIDE 95

Representing Predicate Symbols

  • Wordnet Synsets
  • Wordnet encodings
  • Word embeddings
  • static: word2vec
  • dynamic: Elmo, Bert, XLNet
slide-96
SLIDE 96

WordNet

  • words meanings via synonym sets (synsets)
  • relations between synsets (hyperonymy)

{plant, factory} {plant, flora}

slide-97
SLIDE 97

WordNet

  • words meanings via synonym sets (synsets)
  • relations between synsets (hyperonymy)

{plant.n.01, factory.n.01} {plant.n.02, flora.n.01}

slide-98
SLIDE 98

WordNet

  • words meanings via synonym sets (synsets)
  • relations between synsets (hyperonymy)

08293644 :: {plant.n.01, factory.n.01} 07253221 :: {plant.n.02, flora.n.01}

slide-99
SLIDE 99

Interlingual WordNet

  • words meanings via synonym sets (synsets)
  • relations between synsets (hyperonymy)

{plant.n.01.en, factory.n.01.en, fabriek.n.01.nl} {plant.n.02.en, flora.n.01.en, pflanze.n.01.de}

slide-100
SLIDE 100

Knowledge in WordNet

  • words meanings via synonym sets (synsets)
  • relations between synsets (hyperonymy)

{organism,being} {plant,flora} {animal,beast,fauna} {tulip} {rose} {lily} {bird} {mammal,mammalian} {wood lily, Lilium philadelphicum}

slide-101
SLIDE 101

Representing Concepts: WordNet

x1 e1 t1 08293641(x1) 15160774(t1) YearOfCentury(t1,1650) t1 < now 02431950(e1) Time(e1,t1) Theme(e1,x1) This school was founded in 1650.

slide-102
SLIDE 102

Representing Concepts: WordNet

x1 e1 t1 school.n.01(x1) time.n.08(t1) YearOfCentury(t1,1650) t1 < now found.v.02(e1) Time(e1,t1) Theme(e1,x1) This school was founded in 1650.

slide-103
SLIDE 103

The Parallel Meaning Bank

TODAY: Computational Semantics, Meaning Representations and Discourse Representation Theory FRIDAY: Producing Meaning Representations Tokenisation, Semantic Tagging, Composition