NLP Module 5
NLP Module 5
Subject In-charge
Ms. Pradnya Sawant
Assistant Professor
Room No. 405
email: [email protected]
Module 5
Pragmatic and Discourse Processing
Contents
• Discourse: Reference Resolution, Reference
Phenomena, Syntactic & Semantic constraint on
coherence
• Anaphora Resolution using Hobbs and Centering
Algorithm
Module 5
Lecture 1
▪ Discourse Integration
▪ Coreference Resolution
Example
● Gracie: Oh yeah. . . and then Mr. and Mrs. Jones were having
matrimonial trouble, and my brother was hired to watch Mrs.
Jones.
● George: Well, I imagine she was a very attractive woman.
● Gracie: She was, and my brother watched her day and night
for six months.
● George: Well, what happened?
● Gracie: She finally got a divorce.
● George: Mrs. Jones?
● Gracie: No, my brother’s wife.
Example
● This is a dialogue part of a movie.
● Language consist of collocated, structured,
coherent groups of sentences.
● Such a coherent structured group of sentences is
called a discourse.
Dialogue
● The dialogue discourse consist of different types of
communicative acts as:
○ asking questions
○ giving answers
○ making corrections, and so forth.
Example
Consider the discourse below:
The Tin Woodman went to the Emerald City to see the
Wizard of Oz and ask for a heart. After he asked for it,
the Woodman waited for the Wizard’s response.
● What do pronouns such as he and it denote?
● But doing this disambiguation automatically is a
difficult task.
Coreference Resolution
● The goal of deciding what pronouns and other
noun phrases refer to is called coreference
resolution.
● Coreference resolution is important for
○ Information Extraction
○ Summarization
○ Conversational Agents
● There are other important discourse structures
beside coreference resolution.
Coherence Relations
Coherence Relations
Coherence Relations
Reference Resolution
Reference Resolution
● In the example,
Referring expression: He , it
○
○ Referent : John, Acura Integra
● Co-referring Expression : Two referring
expressions that are used to refer to the same entity.
(Not in this example)
● Antecedent : John is the antecedent of he.
● Anaphora : Reference of an entity that has been
previously introduced into the discourse.(here: he)
Exercise
Exercise
Module 5
Lecture 2
▪ Reference phenomenon
Discourse Model
● The discourse model contains representations of the
entities that have been referred to in the discourse and
the relationships in which they participate.
● There are 2 fundamental operations to discourse
model.
● When a referent is first mentioned in a discourse, we
say that a representation for it is evoked into the
model.
● Upon subsequent mention, this representation is
accessed from the model.
Discourse Model
Example:
John went to Bill’s car
dealership to check out
an Acura Integra. He
looked at it for about an
hour.
Example
Reference Phenomena
Pronouns
● Pronominalization is another form of definite
reference
● E.g. I saw an Acura Integra today. It was white and
needed to be washed.
● The constraints on using pronouns is that it should
refer to entities that were introduced no further than
one or two sentences back in the ongoing discourse,
whereas definite noun phrases can often refer further
back.
Example
a. John went to Bob’s party, and parked next to a beautiful Acura
Integra.
b. He went inside and talked to Bob for more than an hour.
c. Bob told him that he recently got engaged.
d. He also said that he bought it yesterday.
d’. He also said that he bought the Acura yesterday.
Pronouns as Cataphora
● Pronouns are mentioned before their referents are
called Cataphoras
● E.g. Before he bought it, John checked over the
Integra very carefully.
● Here, the pronouns he and it both occur before their
referents are introduced.
Demonstratives
● Demonstrative pronouns, like this and that, can appear
either alone or as determiners (this Acura, that Acura).
● The choice between two demonstratives is based on spatial
proximity:
● this indicating closeness and
● that signaling distance.
● Spatial distance might be measured with respect to the
discourse participants situational context.
Demonstratives
One Anaphora
● One-anaphora, blends properties of definite and
indefinite reference.
● E.g.
○ She has a white car. I also want one
○ She has the best BMW. I also want one like that.
● This usage is paraphrased by one of them, in which
‘them’ refers to a plural referent & one is a member
from this set.
● Thus, one may evoke a new entity which is
dependent on an existing referent.
One Anaphora
Module 5
Lecture 3
▪ Reference phenomenon
▪ Syntactic & semantic constraints on co reference
Inferrables
Consider cases in which a referring expression does not refer to
an entity that has been explicitly evoked in the text, but instead
one that is inferentially related to an evoked entity. Such referents
are called inferrables.
● E.g. I almost bought an Acura Integra today, but a door had a
dent and the engine seems noisy.
● The indefinite noun phrase a door would evoke a new door
into the discourse context, but in this case infer : that it is not
just any door, but one of the doors of the Integra.
● Similarly, no engine has been explicitly mentioned, but the
hearer infers that the referent is the engine of Integra.
Discontinuous Sets
Generics
• Another kind of expression that does not refer
back to an entity explicitly evoked in the text is
generic reference.
Consider the example given below:
• E.g. I’m interested in buying a Mac laptop. They
are very stylish.
• Here, they refers, not to a particular laptop (or
even a particular set of laptops), but instead to the
class of Mac laptops.
Number Agreement
● Referring expressions and their referents
must agree in number
● This means distinguishing between
singular and plural references.
Number Agreement
Gender Agreement
Gender Agreement
● E.g.
John has an Acura. He is attractive.
(he=John, not the Acura)
John has an Acura. It is attractive. (it=the
Acura, not John)
Syntactic Constraints
Syntactic Constraints
● E.g
Reflexive Constraints
Reflexive Constraints
● A nonreflexive pronoun like him can corefer with the
subject of the previous sentence
● E.g. John wanted a new car. Bill bought him a new
Acura. [him=John]
● but it cannot in
● E.g. John wanted a new car. He bought him a new
Acura.[He=John, him ≠John]
● because of its syntactic relationship
Selectional Restrictions
Selectional Restrictions
1. Recency
2. Grammatical Role
2. Grammatical Role
● E.g.
● John went to the Acura dealership with Bill. He
bought an Integra. [ he = John ]
● Bill went to the Acura dealership with John. He
bought an Integra. [ he = Bill ]
● John and Bill went to the Acura dealership. He
bought an Integra. [ he = ?? ].
Repeated Mention
Parallelism
Heuristics
Verb Semantics
Verb Semantics
Verb Semantics
• Hobbs 1978
• Centering Theory
Lappin and Leass Algorithm
for Pronoun Resolution
The material in this presentation belongs to St. Francis Institute of Technology and is solely for educational purposes. Distribution and modifications of the content is prohibited.
Subject
● The pronoun, noun or noun phrase that does the
action of the verb
● Subject is usually before the verb
● E.g.
○ John Arrived.
○ I love chocolate
● It can also be a group of words
● E.g.
○ An orange cat was sitting beside me
Subject
● Some verbs are not actions but linking verbs that
links to more information about the subject
● Linking Verbs : be, seem, become
● E.g.
○ I am hungry
○ John seemed tired
● Subjects can be long
● E.g.
○ The man who lives upstairs lied
Subject
Object
● It is a thing or person that the verb is done to or who
receives verb
● It can be a noun, noun phrase, pronoun or a longer
complex object
● Only transitive verb can have object
● E.g.
○ I love chocolate
○ David met Lucy yesterday
○ I put the orange cat into the garden
Direct Object
● It is the thing or person to whom or to which we do
the action verb
● E.g.
○ I give the chocolate
○ David met Mary yesterday
Indirect Object
● It is the person who receives the direct object
● E.g.
○ I made my friend (IO) some coffee (DO)
○ I threw John (IO) the ball (DO)
Subject Emphasis
That means the focus is usually on the subject and what
the subject does.
Existential Emphasis
● It asserts the existence or non-existence of
something
● English relies on constructions introduced by There
● The verb most often used in existential sentences is
a form of be. Other verbs (e.g., exist, occur) may
follow the existential there.
● E.g.
○ There is always some madness in love
○ There are many exit visas sold in this café
Adverbial Emphasis
● It is a term used for an intensifier used to give added
force or a greater degree of certainty to another
word in a sentence or a sentence as whole
● Adverbs of emphasis are called emphasizers
● E.g. absolutely, certainly, clearly, definitely
● E.g.
○ He is tapping my phone and I definitely heard it
Example
E.g. John saw a beautiful Acura Integra at the
dealership. He showed it to Bob. He bought it.
First Sentence : John saw a beautiful Acura Integra at
the dealership.
Second Sentence : He showed it to Bob.
Third Sentence : He bought it.
• c3. Betsy told her that she really liked the gift.
• c4. She told Susan that she really liked the gift.
Centering
• Centering theory was developed by Barbara J.
Grosz, Aravind K. Joshi and Scott Weinstein in the
1980s to explain this kind of phenomena.
Definitions
Utterance – A sentence in the context of a discourse.
Center Shifting-1 - +
Center Shifting - -
Let’s see what the transitions
are…
• U1. John drives a Ferrari.
Cb(U1) = John. Cf(U1) = (John, Ferrari)
Center Shifting-1 - +
Center Shifting - -
Let’s see what the transitions
are…
• U1. John drives a Ferrari.
Cb(U1) = John. Cf(U1) = (John, Ferrari)
Center Shifting-1 - +
Center Shifting - -
Let’s see what the transitions
are…
• U1. John drives a Ferrari.
Cb(U1) = John. Cf(U1) = (John, Ferrari)
Center Shifting-1 - +
Center Shifting - -
Let’s see what the transitions
are…
• U1. John drives a Ferrari.
Cb(U1) = John. Cf(U1) = (John, Ferrari)
• U4. He arrived just as the store was closing for the day.
Cb(U4) = John. Cf(U4) = (John, store). CONT
Transitions for the 2nd discourse
• U1. John went to his favorite music store to buy a piano. Cb(U1) =
John. Cf(U1) = (John, store, piano).
REs in U3
Mike him
Anchor construction for U3
• Cb(U2) = John. Cf(U2) = (John, Mike)
• U3. Mike beats him sometimes.
1. Create a list of REs.
2. Expand into possible forward center lists.
Mike John
Mike him
Mike Mike
Anchor construction for U3
• Cb(U2) = John. Cf(U2) = (John, Mike)
• U3. Mike beats him sometimes.
1. Create a list of REs.
2. Expand into possible forward center lists.
3. Create possible backward centers according to Cf(U2).
John
Mike John
Mike Mike him
Mike Mike
NIL
Anchor construction for U3
• Cb(U2) = John. Cf(U2) = (John, Mike)
• U3. Mike beats him sometimes.
1. Create a list of REs.
2. Expand into possible forward center lists.
3. Create possible backward centers according to Cf(U2).
4. Create a list of all anchors (cartesian product).
John
Mike John
Mike Mike him
Mike Mike
NIL
Anchor construction for U3
• Cb(U2) = John. Cf(U2) = (John, Mike)
• U3. Mike beats him sometimes.
1. Create a list of REs.
2. Expand into possible forward center lists.
3. Create possible backward centers according to Cf(U2).
4. Create a list of all anchors (cartesian product).
• RETAIN
Sample Questions
1. What is Coreference Resolution?
2. Explain anaphora and cataphora with example.
3. What are the five types of referring expressions
used in reference phenomenon?
4. Explain Hobbs algorithm for pronoun resolution.
5. Which referring expressions complicate the
reference resolution problem?
6. What is coherence relations?
7. What is reference resolution?
8. Explain pronoun resolution with Lapin and Leass
algorithm.