Computational Semantics GSLT Johan Bos University of Edinburgh - PowerPoint PPT Presentation

1 / 107
About This Presentation
Title:

Computational Semantics GSLT Johan Bos University of Edinburgh

Description:

donkey(y) own(x,y) x y. beat(u,v) u=x. v=y. u v. Interpreting DRSs ... Show examples of the translation. Part II. Building Discourse Representations. Building DRSs ... – PowerPoint PPT presentation

Number of Views:125
Avg rating:3.0/5.0
Slides: 108
Provided by: Joha52
Category:

less

Transcript and Presenter's Notes

Title: Computational Semantics GSLT Johan Bos University of Edinburgh


1
Computational SemanticsGSLTJohan
BosUniversity of Edinburgh
2
This course
  • This course is based on material fromWorking
    with Discourse Representation Theory An
    Advanced Course in Computational Semantics(by
    Patrick Blackburn Johan Bos)
  • It is a continuation of the introductory course
    Representation and Inference
  • More information www.comsem.org

3
Overview
  • Discourse Representation Theory
  • Building Discourse Representations
  • Pronoun Resolution
  • Presupposition Projection
  • Implementation various versions of CURT

4
Part I
  • Discourse Representation Theory

5
Overview of DRT
  • DRT employs a language based on box-like
    structures called DRSs
  • We will be making heavy use of DRSs in this
    course, for different purposes
  • DRSs are Pictures (something like mental
    models)
  • DRSs are Programs (the dynamic perspective)

6
Interpreting Discourse
  • Discourse a sequence of several natural language
    sentences
  • How can we represent the meaning of discourse?
  • It is clearly not just the conjunction of the
    first-order representations of its individual
    sentences
  • We will explain why with a few simple examples

7
Some examples showing that this is not
straightforward
  • Example 1Mia is a woman. She loves Vincent.
  • FOL representationA woman(mia)love(x,vincent)
    B woman(mia)love(mia,vincent)

8
Some examples showing that this is not
straightforward
  • Example 2A woman snorts. She collapses.
  • FOL RepresentationA ?y(woman(y)snort(y))collap
    se(x)B ?y(woman(y)snort(y))collapse(y)C
    ?y(woman(y)snort(y)collapse(y))

9
Some examples showing that this is not
straightforward
  • Example 3If a woman snorts, she collapses.
  • FOL RepresentationA ?y(woman(y)snort(y))?colla
    pse(x)B ?y(woman(y)snort(y))?collapse(y)C
    ?y(woman(y)snort(y)?collapse(y)) D
    ?y(woman(y)snort(y)?collapse(y))

10
Context Change Potential
  • We need to start with the right representation
  • Basic FOL does not seem to give us the right
    means
  • Manipulation with quantifier scope and free
    variables
  • Not the right intuitions about how discourse
    works
  • We need a representation that naturally mirrors
    the context change potential of an utterance

11
Discourse Representation Structures
  • A new discourse starts a new DRS
  • This DRS is meant to represent the meaning of an
    entire discourse
  • When a new sentence is parsed, the DRS is
    expanded
  • The x in the top of the box is adiscourse
    referent
  • The expressions woman(x) and snort(x) are
    DRS-conditions

12
Processing subsequent sentences
  • Lets now interpretShe collapses
  • We will do three things
  • Add a new discourse referent
  • Add condition collapse(y)
  • Add a further condition xy
  • Why did we do this?
  • She is a pronoun
  • Pronouns introduce a discourse referent which get
    identified with an accessible discourse referent

13
Further examples of DRSs
  • Proper namesMia snorts
  • Quantified NPsEvery man smokes.

?
14
Further examples of DRSs
  • NegationMia does not have a car
  • DisjunctionMia smokes or snorts

?
?
15
Syntax of DRSs
  • If x1xn are discourse referents, and C1Cn are
    conditions, then is a DRS

16
Terms
  • A term ? is either a constant or a discourse
    referent

17
Syntax of DRS-conditions
  • If R is a relation symbol of arity n, and tau
    ?1?n are terms, then R(?1?n) is a DRS-condition
  • If ?1 and ?2 are terms then ?1?2 is a
    DRS-condition
  • If B is a DRS, then ?B is a DRS-condition
  • If B1 and B2 are DRSs, then B1?B2 and B1?B2 are
    DRS-conditions

18
Semantics of DRSs
  • Given that a DRS is supposed to be a picture, it
    seems natural to say that a DRS is satisfied in a
    model iff it is an accurate image of the
    information recorded inside the model
  • For instance

Satisfied in a model iff It is possible to
associate X and y with entities of the model such
that x is a woman, y is a boxer, and x and y
stand in the admire relation
19
Semantics of complex DRS-conditions
  • A negated DRS will be satisfied if it is not
    possible to embed it in the model
  • A disjunctive DRS-condition will be satisfied if
    at least one of the disjuncts can be embedded in
    the model
  • An implicative DRS-condition will be satisfied if
    every way of embedding the antecedent DRS, gives
    rise to an embedding of the consequent DRS

20
Accessibility
  • Resolving anaphoric pronouns is subject to
    accessibility constraints
  • Accessibility is a geometric concept, defined in
    terms of the ways DRSs are nested into each other
  • A DRS B1 is accessible from DRS B2 when B1 equals
    B2, or when B1 subordinates B2

21
Subordination
  • A DRS B1 subordinates B2 iff
  • B1 immediately subordinates B2
  • There is a DRS B such that B1 subordinates B and
    B subordinates B2
  • B1 immediately subordinates B2 iff
  • B1 contains a condition ?B2
  • B1 contains a condition B2?B or B?B2
  • B1 contains a condition B2 ? B
  • B1 ? B2 is a condition in some DRS B

22
The accessibility constraint
  • Suppose a pronoun has introduced a new discourse
    referent y into the universe of some DRS B.
  • Then we are only free to add the condition yx
    to the conditions of B if x is declared in an
    accessible DRS from B

23
Accessibility examples
  • A woman walks.She collapses.
  • Every woman walks.?She collapses.

?
24
Donkey Sentences
  • If a farmer owns a donkey, he beats it.
  • Every farmer who owns a donkey beats it.

?
25
Interpreting DRSs
  • There are two popular ways of doing this
  • Embedding Semantics (Kamp Reyle)
  • Dynamic Semantics(Groenendijk Stokhof)
  • We will use the translation fromDRSs to
    First-Order Logic

26
From DRT to First-Order Logic
  • DRT and First-Order Logic are obviously related
  • Given a vocabulary, we can use it to build either
    DRSs or first-order languages
  • They are interpreted in the same models
  • Translating DRSs into FOL (and back) is
    straightforward and efficient
  • We will use the function (.)fo to translate DRSs
    into first-order formulas

27
Translating DRT to FOLDRSs
(
)fo ?x1 ?xn((C1)fo(Cn)fo)
28
Translating DRT to FOLDRS-Conditions
(R(x1xn))fo R(x1xn) (x1x2)fo
x1x2 (?B)fo ?(B)fo (B1?B2)fo (B1)fo ?
(B2)fo
29
Translating DRT to FOLImplicative DRS-conditions
?B)fo ?x1?xn(((C1)fo(Cn)fo)?(B)fo)
(
30
Implementation
  • DRT in Prologdrs(D,C) (D and C Prolog
    lists)imp(B1,B2)or(B1,B2)not(B)
  • Prolog Variables as discourse referents
  • Compiling DRSs into First-Order logic drs2fol.pl
  • Show examples of the translation

31
Part II
  • Building Discourse Representations

32
Building DRSs
  • We know now what DRT is, and developed some
    Prolog tools to work with DRSs
  • But how can we construct DRSs for English
    discourses in a systematic and automatic way?
  • There are various ways to do this we will
    explore the lambda-based method

33
Building DRSs with lambdas
  • We will use the lambda-calculus as a tool to
    build DRSs for sentences
  • We will use ? to mark missing information in the
    DRS
  • We call this combination ?-DRT
  • It will allow us to use a number of off-the-shelf
    tools, such as ?-conversion.

34
The Merge
  • We will introduce a new operator
  • The indicates a merge between two DRSs
  • The merge is used to combine two DRSs into one
    larger DRS

)
(

35
Merge Reduction
  • Replacing a merged DRS for a new DRS by taking
    the union of the two universes and conditions
  • The merge is precisely the operation on DRSs we
    need to state in the lexical semantics


(
)
36
Merge-reduction can only be applied after
?-conversion
  • Consider the exampleA woman walks and a woman
    talks
  • This is of course not the result we want!


(
)
37
Lexical SemanticsNouns and proper names
  • boxer
  • Vincent

?x.
?u.(
u_at_x)
38
Lexical SemanticsDeterminers
  • a
  • every

?p.?q.((
p_at_x)q_at_x)
?p.?q.
p_at_x) ?q_at_x
(
39
Lexical SemanticsVerbs
  • dances
  • admires

?x.
?u.?x.u_at_?y.
40
Lexical SemanticsAdjectives
  • big

?u.?x.(
u_at_x)
41
Example derivation
S
VP
NP
IV
N
DET
man
Every
dances
42
Example derivation
S
VP
NP
N
IV
?y.
DET
p_at_x) ?q_at_x
?p.?q. (
?z.
man
dances
Every
43
Example derivation
S
_at_?y.
p_at_x) ?q_at_x
?p.?q. (
VP
NP
Application NP?DET N
N
IV
DET
?z.
man
dances
Every
44
Example derivation
S
?y.
_at_x) ?q_at_x
?q. (
VP
NP
?-conversion
N
IV
DET
?z.
man
dances
Every
45
Example derivation
S
) ?q_at_x

?q. (
VP
NP
?-conversion
N
IV
DET
?z.
man
dances
Every
46
Example derivation
S
?q.
?q_at_x
VP
NP
-reduction
N
IV
DET
?z.
man
dances
Every
47
Example derivation
S
?q.
?q_at_x
VP
?z.
NP
No operation required VP?IV
N
IV
DET
man
dances
Every
48
Example derivation
_at_?z.
?q.
?q_at_x
S
Application S?NP VP
VP
NP
N
IV
DET
man
dances
Every
49
Example derivation
? ?z. _at_x
S
?-conversion
VP
NP
N
IV
DET
man
dances
Every
50
Example derivation
?
S
?-conversion
VP
NP
N
IV
DET
man
dances
Every
51
Implementation
  • Grammar, Lexicon
  • Semantic rules, lexical semantics
  • Merge reduction
  • Alpha-conversion for DRSs
  • Prolog lambdaDRT.pl
  • alphaConversionDRT.pl, mergeDRT.pl

52
Adding Inference
  • Use theorem prover and model builder for
    performing inferences on DRSs
  • We will use the translation from DRT to
    First-Order Logic
  • We will apply this method to consistency and
    informativeness checking

53
Consistency Checking
  • Assume B is the DRS of a discourse
  • And ? the translation of B (B)fo?
  • Now we give ? to a model builder, and ?? to a
    theorem prover
  • If the theorem prover finds a proof, B is
    inconsistent
  • If the model builder finds a model, B is
    consistent

54
Informativeness Checking
  • Assume B is the DRS of a discourse
  • And ? the translation of B (B)fo?
  • Now we give ? to a theorem prover, and ?? to a
    model builder
  • If the theorem prover finds a proof, B is not
    informative
  • If the model builder finds a model, B is
    informative

55
Demo of CURT (curtDRT.pl)
  • Examples
  • Showing readings and models
  • Inference consistency, informativeness
  • What we really want
  • Pronouns!

56
Part III
  • Pronoun Resolution

57
Pronoun Resolution
  • We will concentrate on 3rd person singular
    personal pronouns in English
  • he/him/himself
  • she/her/herself
  • it/itself
  • We will focus on anaphoric pronouns
  • In this course we wont consider
  • Deictic pronouns
  • Cataphoric useAfter he lost the match, Butch
    left town.
  • Pleonastic use of pronounsIts about nine
    oclock in the morning.

58
Recall DRS structure constrains antecedents
  • DRS implication
  • A woman snorts. She collapses
  • Every woman snorts. She collapses
  • DRS negation
  • Mia ordered a five dollar shake. Vincent tasted
    it.
  • Mia didnt order a five dollar shake. Vincent
    tasted it.

59
Grammatical agreement
  • In English, pronouns come with a gender and
    number feature
  • Only refer to antecedents carrying the same
    feature values
  • he (singular, male)
  • men/boys, male animals
  • she (singular, female)
  • women/girls, female animals, things
    regarded as female, e.g. vehicles or ships
  • it (singular, neuter) things, animals, children

60
Ambiguity
  • Butch1 threw a TV2 at the window3.It2,3 broke.
  • Butch1 threw a vase2 at the wall3.It2 broke.
  • Butch1 walks into his1 modest kitchen2. He1 opens
    the refrigerator3. He1 takes out a milk4 and
    drinks it4.

61
Reflexive Pronouns and Binding Theory
  • Examples
  • Vincent1 goes to the toilet, and Jules2 enjoys
    himself2.
  • Vincent1 enters the restaurant, and Jules2
    watches him1.
  • Pronouns obey rules of binding!

62
Implementation
  • Decide how to represent (unresolved) pronouns in
    DRSs
  • Add pronouns to lexicon and grammar
  • Design semantic templates for pronouns
  • Extend ontology with semantic features of
    pronouns
  • Add rules for the binding constraints
  • Prolog curtPDRT.pl

63
Representing pronouns
  • We wont resolve pronouns rightaway, but instead
    represent them with Alfa-DRSs first
  • Example he walks

?
(
)
64
Extend Grammar and Lexicon
  • New grammar rules
  • T ? S TT ? S NP ? ProPro ? shePro ? herPro
    ? herself

65
Lexical Semantics Pronouns
  • He/him/himself
  • She/her/herself
  • It/itself

?u.(
u_at_x)
?u.(
u_at_x)
?u.(
u_at_x)
66
Extend the ontology
  • New axioms
  • ?x(plant(x)?neuter(x))?x(object(x)?neuter(x))?x
    (event(x)?neuter(x))?x(man(x)?male(x))?x(woman(x
    )?female(x))
  • Axioms for disjointness?x(neuter(x)??male(x))?x
    (neuter(x)??female(x))?x(female(x)??male(x))

67
Rules for Binding Theory (1)
  • Feature for reflexive noun phrasesVP ?
    TVrefX NPrefXNPrefX ?
    ProrefXProrefyes?himselfProrefno?him
  • Lexical semantics for TVs

TVrefX,sem?u.?x.u_at_?y.
?love
68
Rules for Binding Theory (2)
  • This will give us
  • Vincent1 loves him1
  • Vincent1 loves himself1
  • Exclude DRSs if
  • The feature refyes is attached to conditions
    with different variables
  • The feature refno is attached to conditions with
    identical variables

69
Demo of CURT (curtPDRT.pl)
  • Examples
  • Vincent likes Mia. She smokes.
  • Vincent likes himself/him/her/herself
  • No man loves himself/herself
  • If a man walks, he smokes.
  • What do we learn from this
  • Use of expensive theorem proving for rather
    obvious cases
  • Sometimes rather funny judgements (negation,
    implication)

70
Add sortal check
  • Some readings obtained are obviously wrong
    (inconsistent)
  • Use information from ontology to weed out such
    cases
  • This handles some cases, but not all
  • Cases with equality
  • Conflicts that cover more than one DRS
  • It is a sound but incomplete inference technique,
    but it is efficient it to use complementary to
    our theorem prover

71
Part IV
  • Presupposition Projection

72
Presupposition Projection- Overview -
  • We will learn what the typical problems
    associated with presuppositions are
  • Concentrate on a DRT based approach of Rob van
    der Sandt
  • Extend our earlier implementation of pronoun
    resolution
  • Access to further inference methods

73
Presuppositions (1)
  • Examples
  • The couple that won the dance contest was pleased
  • Jody loves her husband
  • Vincent regrets that Mia is married
  • These examples force us to take something for
    granted
  • There is a couple that won the dance contest
  • Jody is married
  • Mia is married

74
Presuppositions (2)
  • Given contexts with contrary information, these
    sentences do not make sense at all
  • Jody is not married. ?? She loves her husband.
  • Mia is not married.Vincent regrets that Mia is
    married.

75
Presuppositions (3)
  • Whatever were dealing with here, it is not
    ordinary entailment
  • Both
  • Jody loves her husband.
  • Jody does not love her husband.
  • imply that Jody is married

76
Presuppositions (4)
  • We are dealing with presuppositions!
  • The sentences Jody loves her husband and Jody
    doesnt love her husband both imply that Jody
    has a husband
  • We say that Jody has a husband is presupposed
    by these sentences
  • This presuppositions is triggered by the
    possessive pronoun her

77
Presupposition Triggers
  • Definite NPs (the man, Mias husband)
  • Factive verbs (to regret, to know)
  • Implicative verbs (to manage)
  • Certain adjectives (other, new)
  • Clefts (it was Butch who killed Vincent)
  • Iterative adverbs (too, again)

78
Dealing with Presupposition
  • Fine why not go through our lexicon, mark all
    presupposition triggers, and when analysing a
    sentence, check if the context agrees with the
    presuppositions of that sentence.
  • Issues we need to deal with
  • The Binding Problem
  • The Projection Problem
  • Presuppositional Accommodation

79
The Binding Problem
  • ExampleA boxer nearly escaped from his
    apartment.
  • Trigger his apartment presupposes that someone
    has an apartment.
  • But who? A boxer? Any boxer?

80
The Projection Problem
  • Examples
  • (1) Mias husband is out of town
  • (2) If Mia has a husband, then Mias husband is
    out of town.
  • (3) If Mia dates Vincent, thenMias husband is
    out of town.
  • Example (1) presupposes that Mia is married, (2)
    does not, and (3) does!
  • Complex sentences sometimes neutralise
    presuppositions

81
Accommodation
  • Accommodation can be thought of as a way of
    obtaining a robust and realistic treatment of
    presupposition
  • ExampleVincent informed his boss.
  • Presupposition Vincent has a boss.
  • What if we dont have a clue whether Vincent has
    a boss or not?
  • Accommodation incorporating missed information
    as long as this not conflicting with other
    information

82
Van der Sandts Theory
  • We will use a method due to Rob van der Sandt
  • Presuppositions are essentially extremely rich
    anaphoric pronouns
  • Presuppositions introduce new DRSs that need to
    be incorporated in the discourse context
  • This is a good way of dealing with the binding,
    projection, and accommodation problems

83
Presuppositions in DRT
  • We need to carry out two tasks
  • Select presupposition triggers in the lexicon
  • Indicate what they presuppose
  • We will use the alpha-operator
  • Example The woman collapses.
  • Preliminary DRS

(
?
)
84
Binding Presuppositions
  • ExampleA woman snorts. The woman collapses.
  • Step 1 Merge with previous discourse.

?
(
(
))
85
Binding Presuppositions
  • ExampleA woman snorts. The woman collapses.
  • Step 2 Identify with possible antecedent
    discourse referent

?
(
(
))
86
Binding Presuppositions
  • ExampleA woman snorts. The woman collapses.
  • Step 3 Move information to antecedent

?
(
(
))
87
Binding Presuppositions
  • ExampleA woman snorts. The woman collapses.
  • Step 4 replace ? by merge


(
(
))
88
Binding Presuppositions
  • ExampleA woman snorts. The woman collapses.
  • Step 5 perform merge reduction

89
Binding Presuppositions
  • ExampleA woman snorts. The woman collapses.
  • Note we will use unification instead of explicit
    equality conditions

90
Accommodating Presuppositions
  • ExampleIf Mia dates Vincent, then her husband
    is out of town

?
?(
)
91
Global Accommodation
  • ExampleIf Mia dates Vincent, then her husband
    is out of town

?
?(
)
92
Global Accommodation
  • ExampleIf Mia dates Vincent, then her husband
    is out of town

?
93
Sometimes global accommodation is not a good
option! (projection problem)
  • Slightly different exampleIf Mia is married,
    then her husband is out of town

?
94
Intermediate Accommodation
  • ExampleIf Mia is married, then her husband is
    out of town

?
?(
)
95
Intermediate Accommodation
  • ExampleIf Mia is married, then her husband is
    out of town

?
96
Local Accommodation
  • ExampleIf Mia is married, then her husband is
    out of town

?
97
Van der Sandts Algorithm
  • Generate a DRS for the input sentence, with all
    elementary presuppositions marked by ?
  • Merge this DRS with the DRS of the discourse so
    far processed
  • Traverse the DRS, and on encountering an ?-DRS
    try to
  • Bind the presupposed information to an accessible
    antecedent, or
  • Accommodate the information to a superordinated
    level of DRS
  • Remove those DRSs from the set of potential
    readings that violate the acceptability
    constraints

98
The acceptability constraints
  • DRSs should not contain free variables
  • DRSs should be consistent and informative
  • DRSs should also be locally consistent and
    informative

99
Free Variable Check (1)
  • Consider the exampleEvery man likes his car
  • DRS obtained with Local Accommodation

?
100
Free Variable Check (2)
  • Consider the exampleEvery man likes his car
  • DRS obtained with Intermediate Accommodation

?
101
Free Variable Check (3)
  • Consider the exampleEvery man likes his car
  • DRS obtained with Global Accommodation

?
102
The presupposition projection problem solved
  • Recall our exampleIf Mia is married, then her
    husband is out of town
  • Local constraints play a crucial role here!

Locally informative
Locally uninformative
?
103
The binding problem solved
  • ExampleA boxer nearly escaped from his
    apartment.
  • Preliminary DRS

?
(
))
(
  • Final DRS

104
Proper Names
  • Proper Names can be treated as presupposition
    triggers
  • Only global accommodation is permitted for proper
    names
  • This assures they will always end up in the
    global (outermost) DRS, accessible for subsequent
    pronouns
  • ExampleEvery man knows Mia. She is Marselluss
    wife.

?
105
Implementation
  • Work in the lexicon
  • Implementing accommodation
  • Free variable trapping
  • The Local Constraints
  • Prolog curtPPDRT.pl

106
Summary
  • Weve looked at various semantic phenomena
  • Pronouns, presupposition,
  • And weve implemented a fragment of English
    incorporating these phenomena
  • Weve hooked up first-order tools to do genuine
    inference

107
Whereto from here?
  • Work on Representation
  • Plurals
  • Events
  • Tense Aspect
  • Work on Inference
  • Incremental inference
  • Use sorts to reduce search space
  • Model size estimation
Write a Comment
User Comments (0)
About PowerShow.com