natural language semantics · natural language semantics leonid kof kof@in.tum.de technische...

Post on 06-Feb-2020

12 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Natural Language SemanticsLeonid Kof

kof@in.tum.de

Technische Universitat Munchen

Natural Language Semantics – p. 1

Outline

1. Motivation (→ Turing Test)

2. How is NL–Semantics defined?

3. Is NL–Semantics compositional?

4. How do different sentences interact? (→ DiscourseRepresentation Theory)

5. Non–compositional approachesVerb framesParsing & annotation

Natural Language Semantics – p. 2

Turing Test

Question

AnswerComputer?Human?

Natural Language Semantics – p. 3

Outline

1. Motivation (→ Turing Test)

2. How is NL–Semantics defined?

3. Is NL–Semantics compositional?

4. How do different sentences interact? (→ DiscourseRepresentation Theory)

5. Non–compositional approachesVerb framesParsing & annotation

Natural Language Semantics – p. 4

Semantics Definition

Verb = Main Predicate

Alice loves Bob = love(Alice, Bob)

Alice loves a man = ∃x.(man(x) ∧ love(Alice, x ))

Every woman loves Bob =∀x.(woman(x) → love(x , Bob))

Every woman loves a boxer =∃x.(boxer(x) ∧ (∀y.(woman(y) → love(y , x ))))

Every woman loves a boxer =∀y.(woman(y) → ∃x.(boxer(x) ∧ love(y , x )))

Natural Language Semantics – p. 5

Outline

1. Motivation (→ Turing Test)

2. How is NL–Semantics defined?

3. Is NL–Semantics compositional?

4. How do different sentences interact? (→ DiscourseRepresentation Theory)

5. Non–compositional approachesVerb framesParsing & annotation

Natural Language Semantics – p. 6

Compositionality Problem

Words are in the “wrong” order

Alice loves Bob = love(Alice, Bob) Ã

love, Alice, Bob

Alice loves a man = ∃x.(man(x) ∧ love(Alice, x )) Ã

a, man, love, Alice, . . .

. . .

Natural Language Semantics – p. 7

Sidestep:λ–Calculus

Function abstraction:λx.(function expression)

Function application:expression1 expression2

β–Reduction:(λx.(function expression)) argument =function expression[x/argument]

Natural Language Semantics – p. 8

Semantics withλ–Terms

Special λ–term for every word class

Proper names: Alice = λP.(P@Alice)

Common names: woman = λy.(woman(y))

Intransitive verbs: walks = λx.(walk(x ))

Transitive verbs: loves = λX.(λz.(X@(λx.love(z , x ))))

“every”: every = λP.(λQ.(∀x.((P@x) → (Q@x))))

“a”: a = λP.(λQ.(∃y.((P@y) ∧ (Q@y))))

Natural Language Semantics – p. 9

Does it really work?

Alice loves Bob =

(λP.(P@Alice))@((λX.(λz.(X@(λx.love(z , x )))))@(λP.P@Bob)) =(λP.(P@Alice))@(λz.((λP.P@Bob)@(λx.love(z , x )))) =(λP.(P@Alice))@(λz.(λx.love(z , x )@Bob)) =(λP.(P@Alice))@(λz.love(z , Bob)) =(λz.love(z , Bob))@Alice =love(Alice, Bob)

Natural Language Semantics – p. 10

Outline

1. Motivation (→ Turing Test)

2. How is NL–Semantics defined?

3. Is NL–Semantics compositional?

4. How do different sentences interact? (→ DiscourseRepresentation Theory)

5. Non–compositional approachesVerb framesParsing & annotation

Natural Language Semantics – p. 11

Sentence Interaction

Alice is a woman. She loves Bob.

What is a possible λ–term for “she”?

Natural Language Semantics – p. 12

Sentence Interaction

There is no λ–term for “she”!!!

Natural Language Semantics – p. 13

Discourse Representation Structures 1/4

x1, x2, x3

P1(x1, x2, x3)

P2(x1, x2, x3)

P3(x1, x2, x3)

Natural Language Semantics – p. 14

Discourse Representation Structures 2/4

Alice loves Bob

Alice, Bob

love(Alice, Bob)

Natural Language Semantics – p. 15

Discourse Representation Structures 3/4

Alice loves a man

Alice, x

man(x)

love(Alice, x)

Natural Language Semantics – p. 16

Discourse Representation Structures 4/4

Every women loves a boxer

x

woman(x)

y

boxer(y)love(x, y)

Natural Language Semantics – p. 17

Anaphora Resolution

A woman loves a boxer. She walks

x, y, z

woman(x), boxer(y)

loves(x, y)

z = x

walk(z)

Natural Language Semantics – p. 18

Outline

1. Motivation (→ Turing Test)

2. How is NL–Semantics defined?

3. Is NL–Semantics compositional?

4. How do different sentences interact? (→ DiscourseRepresentation Theory)

5. Non–compositional approachesVerb framesParsing & annotation

Natural Language Semantics – p. 19

Verb Frames

Verb frame = verb with its arguments

Component X sends message Y to component Z=

send (Component X, message Y, component Z)

Verb frame defines:

Verb type (predicate type)

Predicate argument structure

Natural Language Semantics – p. 20

Sidestep: Part–of–Speech Tagging

Each word is assigned a Part–of–Speech tag:

Coponent X sends message Y to component Z Ã

Component/NN X/NN sends/VBZ message/NN Y/NN to/TOcomponent/NN Z/NN

Natural Language Semantics – p. 21

Verb Frames as Templates

templatename=communicationframe

sender(POS=NN, syn=subject, sem=agent)comm-action(pos=VB, syn=verb-phrase,

default=’send’)message (...)prep (..., default=’to’)receiver (...)

end

Natural Language Semantics – p. 22

Semantics Computation with Frames

Finite number of possible frames

POS–tagging as preprocessing

Semantics computation is matching of actual sentenceswith predefined frames(Ã POS–Sequence matching)

Natural Language Semantics – p. 23

Frame example

Component/NN X/NN sends/VBZ message/NN Y/NN to/TOcomponent/NN Z/NN Ã

Component/NN X/NN sendersends/VBZ send

message/NN Y/NN messageto/TOcomponent/NN Z/NN receiver

à send (Coponent X, message Y, component Z)

Natural Language Semantics – p. 24

Outline

1. Motivation (→ Turing Test)

2. How is NL–Semantics defined?

3. Is NL–Semantics compositional?

4. How do different sentences interact? (→ DiscourseRepresentation Theory)

5. Non–compositional approachesVerb framesParsing & annotation

Natural Language Semantics – p. 25

Sidestep: NL Parsing

Oversimplified:

Chomsky–2 Grammar

Each rule is assigned a probability

The parser calculates the most probable parse tree

Probability distribution is calculated on the basis ofmanually crafted training data

Natural Language Semantics – p. 26

Training Data Example

Alice loves Bob =

NN/Alice

S/loves

NPB/Alice

VBZ/loves

VP/loves

NPB/Bob

NN/Bob

Natural Language Semantics – p. 27

Semantics Annotation in Training Data

Alice loves Bob =

NN/Alice

Actor/Alice VBZ/loves Patient/Bob

Predicate/loves

S/loves

NN/Bob

Natural Language Semantics – p. 28

Summary

Goal: Extract predicates (verbs) with their arguments

Firm and statistical approaches

None is really working

Natural Language Semantics – p. 29

That’s all, folks !!!

Natural Language Semantics – p. 30

top related