Lecture 16 - Coherence in Text and Dialogue

advertisement
Coherence in Text and Dialogue
Read J & M Chapters 18.2, 18.3, 19
Why is Coherence a Computational Issue?
•Anaphora resolution
•Question answering
•Text extraction
•Text summarization
•Discourse
•Generation
Question Answering
John arrived at the station later than he’d hoped. He rushed to the
ticket booth, then ran to the platform. He got there just before the
conductor closed the doors.
Did John get on the train?
Did John have enough money for the ticket?
Or a news wire example:
http://www.csi.uottawa.ca/tanka/QA/sample.html
Text Extraction
The alphas have a long-standing hatred of the betas. Their leaders
have decided that the time has come to launch an attack. They are
considering the Thanksgiving weekend, but that’s long ways away.
They know they’ll have to count on the fact that they are much better
shots than the betas are.
attack (status <planned, imminent, active, completed>)
(attacker
)
(attackee
)
(location
)
(mode-of-attack
)
(time-of-attack
)
(credit-claimer
)
Text Summarization
Generating long summaries:
http://www1.cs.columbia.edu/nlp/newsblaster/
Suppose Google (http://channels.netscape.com/ns/search/default.jsp)
returned a summary of a page, not just the first line:
domestic robots
Discourse
What we don’t want:
http://www.dcs.shef.ac.uk/~walker/Seinf.mpg
What we do want:
I want to see The Matrix tonight.
It isn’t playing anywhere in town.
Two Kinds of Knowledge
•Task/domain knowledge:
John offered to go stop by Bill’s house to pick up the report. He didn’t
have a key but the door was unlocked.
•Linguistic/social conventions that govern the way we use language:
•Local linguistic clues:
John went to the mall but he didn’t buy anything.
* John went to the mall so he didn’t buy anything.
•Conventions:
Do you know what time it is?
Can we come up with a single mechanism for representing and
reasoning with all of these things?
Task/Domain Knowledge - Scripts
Scripts or frames represent facts about the world as we know it:
Example: a train-taking script
Scene 1 (arrival): S arrives at station
Scene 2: (ticket purchase): S goes to ticket window
S tells C destination and class
C tells S the price
S hands over money
C hands over ticket
Scene 3: (boarding):
S goes to platform
S gets on train
P closes doors
train pulls away
Scene 4: travelling
etc.
Task/Domain Knowledge – Pre and Post
Conditions
Actions are especially important, particularly in interactive dialogue
systems. Actions can be represented as:
•Preconditions
•Postconditions
•Body (sequence of subactions)
The first two may be able to be represented in FOPC. Sometimes the
latter is too, or in a separate action language. But we may need a
higher order system.
Pre and Post Conditions May Involve Beliefs
Do you know what time it is?
(Action (Tell, P, R, A)
**P tells R A
(precondition: Know(P, A)  Contact(P, R))
(postcondition: Know(R, A)
or maybe
Know (R, Believe(P, A)))
Know(Tim, time(now, 2:00)) or Know(Tim Believe (I, time(now, 2:00)))
Linguistic Cues
John went to the mall but he didn’t buy anything.
John went to the mall so he didn’t go to the movie.
John went to the mall and he went to the movie.
John went to the mall after he went to the movie.
John went to the mall so that he could go to the movie.
John went to the mall even though he didn’t have any money.
The Structure of Text – Relations
The pieces have to hang together, typically in some tree like structure
that represents relations among the pieces. Some relations:
Result: John forgot to set his alarm. So he missed the exam.
Explanation: John missed the exam. He’d forgotten to set his alarm.
Parallel/contrast: John always brings ham and cheese. Mary always
brings peanut butter.
Elaboration: John went to the Friday night dance. He brought Mary
and arrived in a white limousine.
Sequence: The police arrested a tall man for the burglary. They
brought him to the station and read him his rights. Then they locked
him up until morning.
The Structure of Text – Hanging Together
The police are searching for a tall white man. They canvassed the
neighborhood and interviewed everyone they could find. Then they
examined several security cameras in the area. They think the robbery
was caught on at least one of them. They are also requesting cell
phone records at the time of the robbery. They are reasonably certain
that they will be able to find their man.
The Structure of Dialogue – Typed vs.
Spoken
In addition to all of the issues we must confront with typed dialogues,
spoken dialogue management must also consider:
•Conventions for interruptions and turn taking.
•The need for grounding to confirm success over a noisy channel
•False starts
•Ungrammaticality
When’s the next um or any cheap flights to Boston?
Let’s see. There’s one tomorrow at 8:00.
The Structure of Dialogue – Speech Acts
Talking (or writing) is just one kind of action that we can take when
we want to achieve a goal. So we should analyze each utterance of a
dialogue just as we would analyze any other action. Some utterances
have an effect just by virtue of being uttered:
I name this ship the Titanic.
I second that motion.
I bet you five dollars that it will snow.
I hereby announce my candidacy for governor.
Speech Acts – Three Levels
But most utterances are actions because of the effect they have on
their listeners. We can analyze utterances on three levels:
Locutionary act: the utterance of some sentence with some
particular linguistic meaning.
Illocutionary act: the act of asking or answering or telling or
ordering promising or whatever.
Perlocutionary act: the production of some specific effect on the
addressee as a result of the act.
Speech Acts – An Example
I’m freezing.
Locutionary force: DCL(e time(e, now)  cold(e)  AE(e, speaker))
Illocutionary force: IMP(e close(e)  AE(e, window)  Agent(e, you)
Perlocutionary force: closed(window)
Speech Acts
There are several main classes of speech acts (illocutionary forces):
Assertives/statements (commits the speaker to S being the case)
Directives (asking, ordering, requesting, inviting, advising, begging)
Commissives (commits the speaker to some future action)
Expressives
Indirect Speech Acts
Utterances in which the locutionary force and the illocutionary force
are different.
I’m freezing.
Do you know what time it is?  Please tell me the time.
Planning Speech Acts
Sequences of utterances require the same kind of planning as do
sequences of any other actions.
•Planning to generate utterances
•Inferring plans in understanding utterances
Conversational Implicature
Grice’s maxims:
•The Maxim of Quantity:
Be as informative as required.
Don’t be more so.
•The Maxim of Quality:
Do not way what you believe to be false.
Do not say that for which you lack sufficient evidence.
•Maxim of relevance: Be relevant
•Maxim of manner:
Avoid obscurity of expression
Avoid ambiguity
Be brief.
Be orderly.
Grice’s Maxims at Work
For understanding: Grice’s maxims support a kind of reasoning
called implicature, a form of defeasible inference. By defeasible we
mean that later information can undo the inference. For example:
John is in either New York or Paris. I know which but I’m not going to
tell you.
Contrast with semantic deductions:
* John stopped smoking, although he never started.
For generation: Grice’s maxims suggest a generation strategy that will
seem natural and helpful to human interactors.
In both cases, we require a model of what is required, true, and
relevant.
Conversational Implicature
Other maxims:
•Don’t say negative things about others.
•Don’t say things that will hurt someone’s feelings.
•Don’t use language that is inappropriate to the context unless you
want to offend.
•Don’t reveal things that are more intimate than the other person also
reveals.
•Etc.
Examples
1.
Do you have any money on you?
2.
This volume is well-bound, and free of typographical errors.
3.
This sure is a great neighborhood.
4.
A: I’m out of gas.
B: There’s a gas station around the corner.
5.
A: Joe doesn't seem to have a girl-friend these days.
B: He's been going to Dallas a lot lately.
6.
A: When did you get home last night?
B: I was in bed by midnight.
7.
A: Let’s go to the movies tonight.
B: I have to study for an exam.
8.
I need to get to Chicago by noon.
9.
A: Do you like my new hairstyle.
B: It’s interesting.
Interpretation as Reasoning
A: Do you know what time it is?
B reasons as follows: A is asking me about what I know. There
must be some reason he wants to know what I know. My knowing P
is a precondition to my being able to tell him. A is trying to establish
the preconditions to my being able to tell him P. So what he really
wants is for me to tell him P. I can just do that.
Scalar Implicature
1.
A: How many people will fit in your car?
B: 5
2.
Tie and jacket required.
3.
No overnight parking.
4.
No stopping or standing.
5.
No pipe smoking.
6.
No stovetop or broiler.
7.
Free HBO.
8.
No sandals or flipflops.
9.
A: Have you finished your paper yet?
B: I haven’t even got a topic yet.
Presuppositions
In the interest of brevity, we often leave out many of the assertions that
we assume to be true when we formulate an utterance.
In cooperative discourse, a listener who believes that a presuppostion
is not true should say so:
A: When did you graduate from college?
B: I never went.
A: When’s the next Delta flight to Chicago?
B: Delta doesn’t fly to Chicago, or
There aren’t any more today.
A: What’s the monthly fee for long distance service?
B: There isn’t a fixed monthly fee, or
Which level of service do you want? or
We don’t offer long distance service.
A: Who’s the king of France?
Download