Computational Linguistics Introduction

Computational Linguistics
Introduction
NL Dialogue Systems
May 2006
CLINT CS Dialogue
1
References
• Jurafsky & Martin Ch 19.
May 2006
CLINT CS Dialogue
2
What is Dialogue
• A special kind of discourse
–
–
–
–
Prose
Argument
Monologue
Dialogue
• Like all discourse shares the following
– Anaphora - e.g. pronouns and referents
– Coherence
John hid Bill’s car keys. He was drunk
John hid Bill’s car keys. He likes spinach
• But it also has special features…
May 2006
CLINT CS Dialogue
3
What Makes
Dialogue Different?
• Turn Taking
• Grounding
• Implicature
May 2006
CLINT CS Dialogue
4
Turn Taking
• Utterances and Turns.
– One utterance can take several turns
– One turn can include several utterances.
• How do speakers know when is the
proper time to contribute their turn?
• Sacks (1974) proposed that turn-taking
is rule-governed.
May 2006
CLINT CS Dialogue
5
One Utterance, Several Turns
A: yeah yeah the um let me see here we’ve got
you on American flight nine thirty eight
C: yep
A: leaving on the twentieth of June out of
Orange County John Wayne Airport at 7.30
pm
C: 7.30
A: and into uh San Francisco at eight fifty seven
May 2006
CLINT CS Dialogue
6
Several Utterances, One Turn
A: Three two three and seven five one.
OK and then does he know there is a
nonstop that goes from Dulles to San
Fransisco? Instead of connection
through St Louis.
May 2006
CLINT CS Dialogue
7
Turn Taking Rule
(Sacks 1974)
• If during this turn the current speaker
has selected A as the next speaker then
A must speak next
• If the current speaker does not select
the next speaker, any other speaker
may take the next turn
• If no-one else takes the next turn, the
current speaker may take the next turn.
May 2006
CLINT CS Dialogue
8
What Makes
Dialogue Different?
• Turn Taking
• Grounding
• Implicature
May 2006
CLINT CS Dialogue
9
Grounding
• Speaker and hearer must constantly establish
common ground. Ways of establishing
common ground include:
– Continued attention (I am still attending)
– Acknowledgement (I understood what you just
said)
– Demonstration (I will show you part of what I
understood)
• When things go wrong there are ways to
indicate this:
– Repair request (I didn’t get it: please repeat)
May 2006
CLINT CS Dialogue
10
Grounding Examples
Demonstration
A: OK I’ll take the 5ish flight on the night
before on the 11th
B: On the 11th?
Repair Request
A: Why is that?
B: Huh?
A: Why is that?
May 2006
CLINT CS Dialogue
11
What Makes
Dialogue Different?
• Turn Taking
• Grounding
• Implicature
May 2006
CLINT CS Dialogue
12
Implicature
A: And what day in May did you want to travel?
B: I need to be there for a meeting that’s from the 12th
to the 15th.
• B’s answer does not actually answer the question.
• Somehow the speaker communicates more than is
actually said
• Implicature is the mechanism which makes it possible
for tha t communication to take place.
• Implicature is based on a series of heuristics called
Maxims.
May 2006
CLINT CS Dialogue
13
Maxim of Relevance
• If we assume that B’s answer is relevant, we can
infer a connection.
– If speaker has to be at a meeting from 12th to 15th
May then he has to be there by 12th.
– If he has to be there by 12th he has to travel on
11th.
– Therefore, we infer the answer is 12th May
• The problem with such a mechanism is control of
the inference process
• Many other things can be inferred from B’s utterance.
• Computation of relevant inferences is hard.
May 2006
CLINT CS Dialogue
14
Gricean Maxims
• Maxim of Quantity: say exactly enough (no more and
no less)
– Maggie ate some of the chocolate.
– Implicature: she did not eat all of the chocolate
• Maxim of Quality: be truthful
– That will cost the earth
– Implicature: that will cost a great deal
• Maxim of Relevance: be relevant
• Maxim of Manner: be clear (avoid ambiguity,
obscurity, long windedness)
– Are you going to come or aren’t you?
– Implicature: the hearer is witholding the information
May 2006
CLINT CS Dialogue
15
Dialogue Acts
• An important insight about conversation,
originally due to Austin (1962) is that an
utterance in a dialogue is a kind of
action being performed by the speaker
– I name this ship Titanic
– I hereby pronounce you man and wife
– I bet you he’ll lose
May 2006
CLINT CS Dialogue
16
Speech Acts
• Assertives
– Suggest, swear, conclude
• Directives
– Ask, order, invite, advise, beg
• Commissives
– Promise, plan, bet, vow
• Expressives
– Thank, apologise, welcome, deplore
• Declarations
– Resign, volunteer
May 2006
CLINT CS Dialogue
17
Plan Based Theory
of Speech Acts
(Perrault and Cohen 198...)
• To satisfy their goals, people plan
speech acts to to affect their listeners’
beliefs and goals.
• Such language use can be modelled by
viewing speech acts as operators in a
planning system.
• Integration of planning mechanisms for
both physical and social actions.
May 2006
CLINT CS Dialogue
18
Dialogue Games
Levin and Moore (1976)
• A Dialogue Game is a method of attempting
to solve a problem through communicative
actions.
• Each game has a set of problems for which it
is appropriate
• Certain preconditions must hold beforehand
• Exit conditions provide guarantees on the
resulting state.
• One of the possible terminal states includes
the solution of the original problem
May 2006
CLINT CS Dialogue
19
Helping Game
• Parameters: Helpee, Helper, Task
• Parameter Specs:
–
–
–
–
–
–
Helper, Helpee are persons
Helpee wants: helpee perform task
Helpee unable
Helpee permitted
Helper willing to help helpee
Helper able to help helpee
May 2006
CLINT CS Dialogue
20
Helping Game
• Rules
– Helpee describes actions already
performed.
– Helpee describes unexpected outcome
– Helper recommends to Helpee actions
which help Helpee do task.
– If Helper is unable to help
– Helper initiates Cannot Help Game
May 2006
CLINT CS Dialogue
21
Helping Game
• I can’t get RUNOFF to work. Can you help
me?
–
–
–
–
(task is (get RUNOFF to work))
(speaker unable (perform task))
(speaker want (speaker perform task))
(speaker want (hearer help speaker (perform
task)))
• These assertions are matched against
preconditions of game which is then
activated.
May 2006
CLINT CS Dialogue
22
Dialogue Act Markup in
Several Layers (DAMSL)
• Tagging scheme developed by Allen
and Core (1997).
• Codes various levels of dialogue
information
May 2006
CLINT CS Dialogue
23
Levels of Dialogue Information
Levels Include
• Information Level: semantic content of the
utterance.
• Forward Looking Function - how the
current utterance constrains the future beliefs
and actions of the participants – c.f.
promising
• Backward Looking Function - how the
current utterance relates to the previous
discourse – c.f. accepting
May 2006
CLINT CS Dialogue
24
Forward Looking
STATEMENT
INFO REQUEST
CHECK
INFLUENCE ON ADDRESSEE
OPEN OPTION
ACTION DIRECTIVE
INFLUENCE ON SPEAKER
OFFER
COMMIT
CONVENTIONAL
OPENING
CLOSING
THANKING
May 2006
CLINT CS Dialogue
25
Backward Looking
AGREEMENT
ACCEPT
ACCEPT PART
MAYBE
REJECT PART
REJECT
HOLD
ANSWER
UNDERSTANDING
SIGNAL NON-UNDERSTANDING
SIGNAL UNDERSTANDING
ACK
REPEAT REPHRASE
COMPLETION
May 2006
CLINT CS Dialogue
26
May 2006
CLINT CS Dialogue
27
Summary
• Dialogue is a special kind of discourse
• For a computer to participate in dialogues it
has to classify the utterances into types.
• Utterance classification is non-trivial
• Utterance types are like action-types
• Participating in a dialogue involves reasoning
about plans made of action-type instances.
May 2006
CLINT CS Dialogue
28