Albert Gatt LIN3022 Natural Language Processing Lecture 11.

Slides:



Advertisements
Similar presentations
Kees van Deemter Matthew Stone Formal Issues in Natural Language Generation Lecture 4 Shieber 1993; van Deemter 2002.
Advertisements

Some common assumptions behind Computational Generation of Referring Expressions (GRE) (Introductory remarks at the start of the workshop)
Microplanning (Sentence planning) Part 1 Kees van Deemter.
CS4018 Formal Models of Computation weeks Computability and Complexity Kees van Deemter (partly based on lecture notes by Dirk Nikodem)
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Situation Calculus for Action Descriptions We talked about STRIPS representations for actions. Another common representation is called the Situation Calculus.
1 Transportation Model. 2 Basic Problem The basic idea in a transportation problem is that there are sites or sources of product that need to be shipped.
Unit 6 Predicates, Referring Expressions, and Universe of Discourse Part 1: Practices 1-7.
Introduction: The Chomskian Perspective on Language Study.
Introduction to phrases & clauses
Albert Gatt LIN3021 Formal Semantics Lecture 5. In this lecture Modification: How adjectives modify nouns The problem of vagueness Different types of.
1 Discourse, coherence and anaphora resolution Lecture 16.
Discourse Martin Hassel KTH NADA Royal Institute of Technology Stockholm
Chapter 18: Discourse Tianjun Fu Ling538 Presentation Nov 30th, 2006.
Albert Gatt LIN1180 – Semantics Lecture 10. Part 1 (from last week) Theories of presupposition: the semantics- pragmatics interface.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Cognitive modelling (Cognitive Science MSc.) Fintan Costello
Amirkabir University of Technology Computer Engineering Faculty AILAB Efficient Parsing Ahmad Abdollahzadeh Barfouroush Aban 1381 Natural Language Processing.
CS 4705 Algorithms for Reference Resolution. Anaphora resolution Finding in a text all the referring expressions that have one and the same denotation.
CS 4705 Lecture 21 Algorithms for Reference Resolution.
1 Special Electives of Comp.Linguistics: Processing Anaphoric Expressions Eleni Miltsakaki AUTH Fall 2005-Lecture 4.
Algorithm Efficiency and Sorting
 2003 CSLI Publications Ling 566 Oct 16, 2007 How the Grammar Works.
1 Pragmatics: Discourse Analysis J&M’s Chapter 21.
Pragmatics I: Reference resolution Ling 571 Fei Xia Week 7: 11/8/05.
Linguistic Theory Lecture 3 Movement. A brief history of movement Movements as ‘special rules’ proposed to capture facts that phrase structure rules cannot.
Albert Gatt LIN 3098 Corpus Linguistics. In this lecture Some more on corpora and grammar Construction Grammar as a theoretical framework Collostructional.
CLARIN tools for workflows Overview. Objective of this document  Determine which are the responsibilities of the different components of CLARIN workflows.
LIN1180/LIN5082 Semantics Lecture 3
Communication Skills Anyone can hear. It is virtually automatic. Listening is another matter. It takes skill, patience, practice and conscious effort.
14 Days Until CAHSEE!!! 15 February  Essay Revision Questions are based on the text of brief rough drafts, and they appear in two basic forms:
Game Theory and Grice’ Theory of Implicatures Anton Benz.
1 Special Electives of Comp.Linguistics: Processing Anaphoric Expressions Eleni Miltsakaki AUTH Fall 2005-Lecture 3.
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 24 By Herbert I. Gross and Richard A. Medeiros next.
Practice Examples 1-4. Def: Semantics is the study of Meaning in Language  Definite conclusions Can be arrived at concerning meaning.  Careful thinking.
Department of English Introduction To Linguistics Level Four Dr. Mohamed Younis.
A system for generating teaching initiatives in a computer-aided language learning dialogue Nanda Slabbers University of Twente Netherlands June 9, 2005.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
1 Chapter 18 Sampling Distribution Models. 2 Suppose we had a barrel of jelly beans … this barrel has 75% red jelly beans and 25% blue jelly beans.
1 Special Electives of Comp.Linguistics: Processing Anaphoric Expressions Eleni Miltsakaki AUTH Fall 2005-Lecture 2.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
LOGIC AND ONTOLOGY Both logic and ontology are important areas of philosophy covering large, diverse, and active research projects. These two areas overlap.
Rhetorical Framework Purpose Audience Situation Persona/Ethos Message.
Pragmatics.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
1 KINDS OF PARAGRAPH. There are at least seven types of paragraphs. Knowledge of the differences between them can facilitate composing well-structured.
Grade Book Database Presentation Jeanne Winstead CINS 137.
Rules, Movement, Ambiguity
1 LIN 1310B Introduction to Linguistics Prof: Nikolay Slavkov TA: Qinghua Tang CLASS 16, March 6, 2007.
CAS LX a. Discourse Representation Theory 10.9.
Corpus-based evaluation of Referring Expression Generation Albert Gatt Ielka van der Sluis Kees van Deemter Department of Computing Science University.
UNIT 2 - IMPLICATURE.
Topic and the Representation of Discourse Content
E PLURIBUS HUGO “Out of the Many, a Hugo” v0.98. What does E Pluribus Hugo do? EPH is a way of tallying nominations that minimizes the effects of slates.
Sight Words.
 2003 CSLI Publications Ling 566 Oct 17, 2011 How the Grammar Works.
1 Special Electives of Comp.Linguistics: Processing Anaphoric Expressions Eleni Miltsakaki AUTH Fall 2005-Lecture 5.
Bushy Binary Search Tree from Ordered List. Behavior of the Algorithm Binary Search Tree Recall that tree_search is based closely on binary search. If.
Writing Exercise Try to write a short humor piece. It can be fictional or non-fictional. Essay by David Sedaris.
An evolutionary approach for improving the quality of automatic summaries Constantin Orasan Research Group in Computational Linguistics School of Humanities,
Unit 6 Predicates, Referring Expressions, and Universe of Discourse.
QUESTIONS & NEGATIVES.
CSC 594 Topics in AI – Natural Language Processing
COOPERATIVE PRINCIPLE:
THE NATURE of LEARNER LANGUAGE
Algorithms for Reference Resolution
E PLURIBUS HUGO “Out of the Many, a Hugo” v0.92.
The Winograd Schema Challenge Hector J. Levesque AAAI, 2011
Presentation transcript:

Albert Gatt LIN3022 Natural Language Processing Lecture 11

In this lecture We’ve looked at NLG architectures and introduced Document Planning + Rhetorical Structure Theory: a theory of discourse structure which has proven useful to NLG (among other areas) Today we extend our discussion of computational approaches to discourse in generation and resolution. We look primarily at reference: Algorithm to generate referring expressions Centering Theory: a framework for capturing phenomena related to anaphora and its uses in reference resolution.

Part 1 Referring Expressions Generation

NLG: The complete architecture Content Determination Document Structuring Aggregation Lexicalisation Referring Expression Generation Linguistic Realisation Structure Realisation Document Planning Micro- planning Surface Realisation

Another reminder One type of input to an NLG system is the Knowledge Base (KB) representing the “domain” we’re talking about. This is a crucial component of algorithms that deal with referring expressions.

An example Our KBOur message Suppose our document planner has included this message: bottom-right(E3) We want to say something like: “E3 is in the bottom right” But our user doesn’t know what E3 is. We need to describe it. E1 E2 E4E3

Referring Expression Generation What do we do when we refer to objects? Typically, produce a definite NP Question: how do we select the content for a referring expression? Referring expressions generation (REG) algorithms try to answer this question. Assumptions made by many REG algorithms: We have a knowledge base (KB) which contains: The objects (“entities”) we’re talking about The information about them (their properties) For now, we focus only on full definite NPs (not pronouns, proper names, etc...)

What do definite descriptions do? We generally produce definite NPs to identify an object. Definites are usually taken to presuppose: The existence of the object in question; Its unique identifiability (for the hearer in a particular context). In other words, we must also assume that the objects referred to are mutually known to speakers and listeners (or at least, can easily become mutually known).

Some preliminary remarks on reference Any expression which serves to identify any thing, process, event, action, or any other kind of individual or particular I shall call a referring expression. Referring expressions point to particular things; they answer the questions Who?, What?, Which? (John Searle (1969). Speech Acts: An Essay in the Philosophy of Language. Cambridge: CUP)

KB + referent How would you distinguish the object in the red box?

KB + referent Distinguishing description How would you distinguish the object in the red box? the red chair facing back the large chair the large red chair...

The choice problem In any situation, we have a choice of lots of different referring expressions. We would like a definition of what makes a description adequate.

The KB as we see it Even REG is a search problem! The KB as input to an algorithm typecolourSizeorient ation E1ChairBlackLargeFront E2ChairRedSmallFront E3ChairRedLargeBack e4SofaGreenlargeright

The KB as we see it Even REG is a search problem! Problem definition Given: A KB with objects and properties A target referent Find: A combination of properties that will distinguish the target referent from its distractors

The search problem We can view REG as a search problem in the following way: The KB (which defines the properties) is our “search space” We can think of an algorithm that looks at each available property and decides whether or not to use it to describe the target referent. The algorithm should stop when: It has selected enough properties to build a description that excludes everything in the KB except the target. We would like to do this: Efficiently (don’t spend too much time searching) Adequately and naturally (use the sorts of properties that a person would use in the same situation)

Adequacy What makes a description “good”? We could start from something that Grice (1975) said: Maxim of Quantity Make your contribution as informative as is required for the current purposes of the exchange. Do not make your contribution more informative than is required. In other words, we don’t want to say too much, but we want just enough info to distinguish the referent.

KB + referent Distinguishing description Notice that not all the properties individually will do the trick: Red is true of another object besides the target So is chair We are looking for a combination The red chair won’t do it The large chair will! How would you distinguish the object in the red box?

KB + referent Distinguishing description Underspecified: the red chair Well-specified the chair facing back Overspecified: the red chair facing back the large red chair facing back How would you distinguish the object in the red box?

A brief psycholinguistic digression If we take Grice literally, then we would expect that people will never produce descriptions with “extra” information. In our example, we expect them to say the chair facing back. Are people really Gricean? The answer, apparently, is “no”!

The psycholinguistic evidence Apparently, when people refer, they don’t “weigh” each property they mention to see if it is really required. Some properties seem to be very salient, and so tend to be included even if they’re not “useful”. COLOUR: people tend to use this automatically SIZE: people tend not to use this unless absolutely required So what’s the difference?

The psycholinguistic evidence The COLOUR of an object is an inherent property. We tend to conceptualise the object in terms of what it is (its TYPE) + its inherent properties (COLOUR, for example). But SIZE is a relative property. To determine if an object is large, we need to compare it to other objects. That makes using SIZE much more effortful.

The psycholinguistic evidence So it seems that people use salient properties even if they’re not required (contra Grice). The reason seems to be that speech production is incremental. We don’t compare all possible descriptions and choose the “best “ (most Gricean) one. We construct the description piece by piece, adding properties as we go along. Can we do something similar computationally?

The Incremental Algorithm Algorithm proposed by Dale and Reiter (1995). Models REG as a search problem where: A description is built piece by piece. Some properties are given priority (they are tried first). The core element is a preference order which determines which properties will be tried out first. E.g. TYPE > COLOUR > ORIENTATION > SIZE

The Incremental Algorithm The KB typecolo ur Sizeorie ntati on E1ChairBlackLargeFront E2ChairRedSmallFront E3ChairRedLargeBack e4SofaGree n largeright Input: KB + target referent Input 2: preference order 1. Start by initialising an empty description D 2. while D does not distinguish the referent do a. Find the next attribute on the preference order b. Get the property for the target c. if the property excludes some distractors, then: remove the distractors add property to D 3. return the description

The Incremental Algorithm: example The KB typecolo ur Sizeorie ntati on E1ChairBlackLargeFront E2ChairRedSmallFront E3ChairRedLargeBack e4SofaGree n largeright Preference order: type > colour > orientation > size D  {}

The Incremental Algorithm: example The KB typecolo ur Sizeorie ntati on E1ChairBlackLargeFront E2ChairRedSmallFront E3ChairRedLargeBack e4SofaGree n largeright Preference order: type > colour > orientation > size Get next property (type) for the target (e3) Chair Does this exclude some distractors? Yes, it excludes E4 (the sofa) D  {chair} Distractors now: {E1, E2} Are we done yet? No.

The Incremental Algorithm: example The KB typecolo ur Sizeorie ntati on E1ChairBlackLargeFront E2ChairRedSmallFront E3ChairRedLargeBack e4SofaGree n largeright Preference order: type > colour > orientation > size Get next property (colour) for the target (E3) red Does this exclude some distractors? Yes, it excludes E1 (which is black) D  {chair, red} Distractors now: {E2} Are we done yet? No.

The Incremental Algorithm: example The KB typecolo ur Sizeorie ntati on E1ChairBlackLargeFront E2ChairRedSmallFront E3ChairRedLargeBack e4SofaGree n largeright Preference order: type > colour > orientation > size Get next property (orientation) for the target (E3) back Does this exclude some distractors? Yes, it excludes E2 (which is front) D  {chair, red, front} Distractors now: none left! Are we done yet? Yes

The Incremental Algorithm: example The KB typecolo ur Sizeorie ntati on E1ChairBlackLargeFront E2ChairRedSmallFront E3ChairRedLargeBack e4SofaGree n largeright The outcome is the description {chair, red, back} Could be realised as “the red chair facing backwards” Observe that this description is overspecified: We didn’t really need COLOUR at all! ORIENTATION alone would have done the trick. Overspecification is an automatic consequence of the algorithm.

Summary on REG Referring Expressions Generation is a very crucial part of microplanning in NLG. Whenever we produce a text or speech, we need to refer to objects. The Incremental Algorithm is the best known algorithm in this area. Note that it performs a “search” among the properties of an object, adding to a description incrementally until the object is distinguished.

Part 2 Pronouns and discourse coherence

So far... We haven’t really said anything about context. We don’t always refer to objects with full definite descriptions. Objects which are salient in a discourse can be referred to using pronouns. When should a pronoun be used? We’ve looked at the rhetorical structure of discourse. Now we look at how pronouns affect discourse coherence.

Which is the most coherent? Example 1Example 2 John went to his favourite music store to buy a piano. He had frequented the store for many years. He was excited he could finally buy a piano. He arrived just as the store was closing... John went to his favourite music store to buy a piano. It was a store John had frequented for many years. He was excited he could finally buy a piano. It was closing just as John arrived.

Discourse coherence and reference Intuitively, example 1 is better than 2. Why?

Which is the most coherent? Example 1Things to observe John went to his favourite music store to buy a piano. He had frequented the store for many years. He was excited he could finally buy a piano. He arrived just as the store was closing... John is the subject of sentence 1. This makes him the most salient object mentioned. (More than the store, or the piano). John remains the subject throughout. The discourse therefore maintains a certain unity.

Which is the most coherent? Example 2Things to observe John went to his favourite music store to buy a piano. It was a store John had frequented for many years. He was excited he could finally buy a piano. It was closing just as John arrived. John is the subject of sentence 1. But the subject switches back and forth: It’s the store in sentence 2. Then John again. Then the store again. There is less unity, somehow.

Centering Theory Theory developed by Barbara Grosz et al (1995). Tries to give a formal (algorithmic) account of discourse coherence, focusing on anaphora. In so doing, tries to explain the intuition that Example 1 is better than example 2.

Centering ingredients We can think of an utterance U (sentence, etc) as consisting of a set of discourse referents (plus other things, of course). These referents are ordered with respect to each other by their salience. Centering focuses on transitions between consecutive utterances. By convention, we number consecutive utterances as U n, U n+1 etc.

Centering ingredients Example 1Every utterance U n has: John went to his favourite music store to buy a piano. He had frequented the store for many years. He was excited he could finally buy a piano. He arrived just as the store was closing... a backward-looking center Cb(U n ) the entity in focus, connecting U n with the previous utterance. Here: John a set of forward-looking centers Cf(U n ) (one or more) these are the entities mentioned in U n, ordered by salience any one could become the Cb of the next utterance Here: John, the store

Centering ingredients Example 1Salience in Cf(U n ) John went to his favourite music store to buy a piano. He had frequented the store for many years. He was excited he could finally buy a piano. He arrived just as the store was closing... The entities in Cf(U n ) are ordered by salience. This depends on grammatical function. 1. Subject 2. Object 3. Indirect object/oblique 4. Other Here: John is more salient than the store

Centering ingredients Example 1Salience in Cf(Un) John went to his favourite music store to buy a piano. He had frequented the store for many years. He was excited he could finally buy a piano. He arrived just as the store was closing... The most salient element of the Cf is called the preferred center (Cp) This means it is the preferred candidate for pronominalisation in U n+1 Here: John is the most salient, and is also pronominalised in U n+1

Transitions between utterances Given that U n has a Cb(U n ) and a Cf(U n ), we can now define types of transitions between utterances U n and U n+1. Cb(U n+1 ) = Cb(U n ) Or no Cb(U n ) Cb(U n+1 ) =/= Cb(U n ) Cb(U n+1 ) = Cp(U n+1 )CONTINUESMOOTH SHIFT Cb(U n+1 ) =/= Cp(U n+1 )RETAINROUGH SHIFT

Examples of transitions 1. Steve’s been having trouble with his girlfriend. 2. He can’t find anyone to talk to. 3. He called up Jake to ask for advice. 4. Jake gave him some tips. 5. He told Steve to talk to his mother.

Examples of transitions 1. Steve’s been having trouble with his girlfriend. Cb: SteveCf: steve, girlfriend 2. He can’t find anyone to talk to. 3. He called up Jake to ask for advice. 4. Jake gave him some tips. 5. He told Steve to talk to his mother.

Examples of transitions 1. Steve’s been having trouble with his girlfriend. Cb: SteveCf: steve, girlfriend 2. He can’t find anyone to talk to. Cb: SteveCf: steveCONTINUE 3. He called up Jake to ask for advice. 4. Jake gave him some tips. 5. He told Steve to talk to his mother.

Examples of transitions 1. Steve’s been having trouble with his girlfriend. Cb: steveCf: steve, girlfriend 2. He can’t find anyone to talk to. Cb: steveCf: steveCONTINUE 3. He called up Jake to ask for advice. Cb: steveCf: steve, jake, adviceCONTINUE 4. Jake gave him some tips. 5. He told Steve to talk to his mother.

Examples of transitions 1. Steve’s been having trouble with his girlfriend. Cb: steveCf: steve, girlfriend 2. He can’t find anyone to talk to. Cb: steveCf: steveCONTINUE 3. He called up Jake to ask for advice. Cb: steveCf: steve, jake, adviceCONTINUE 4. Jake gave him some tips. Cb: steveCf: jake, steve, tipsRETAIN 5. He told Steve to talk to his mother.

Examples of transitions 1. Steve’s been having trouble with his girlfriend. Cb: steveCf: steve, girlfriend 2. He can’t find anyone to talk to. Cb: steveCf: steveCONTINUE 3. He called up Jake to ask for advice. Cb: steveCf: steve, jake, adviceCONTINUE 4. Jake gave him some tips. Cb: steveCf: jake, steve, tipsRETAIN 5. He told Steve to talk to his mother. Cb: jakeCf: jake, steve, motherSMOOTH-SHIFT

Examples of transitions 1. Steve’s been having trouble with his girlfriend. Cb: steveCf: steve, girlfriend 2. He can’t find anyone to talk to. Cb: steveCf: steveCONTINUE 3. He called up Jake to ask for advice. Cb: steveCf: steve, jake, adviceCONTINUE 4. Jake gave him some tips. Cb: steveCf: jake, steve, tipsRETAIN 5. He told Steve to talk to his mother. Cb: jakeCf: jake, steve, motherSMOOTH-SHIFT 6. Steve would find her advice useful. Cb: motherCf: jake, mother, boyfriendsROUGH-SHIFT

Rules of Centering Theory Rule 1 If any element of the Cf(Un+1) is realised by a pronoun, then Cb(Un+1) must also be realised by a pronoun. Rule 2 Transition states are ordered by preference: CONTINUE >> RETAIN >> SMOOTH SHIFT >> ROUGH SHIFT

Part 3 Using centering in anaphora resolution

Centering in anaphora resolution Pronominal anaphora resolution is the task of finding an antecedent for a pronoun. This is not a generation task, but an “understanding” or “resolution” task. Example: John asked Bill to give him a hand. Who does him refer to, John or Bill?

Anaphora resolution The task of finding an antecedent for pronouns in running text. How are pronouns resolved? There are some useful linguistic constraints, such as number and gender agreement. But they don’t always suffice. John asked Bill to help him. Number and gender agreement still leaves us with 2 options for him

A Centering Algorithm Input discourseAlgorithm John saw a beautiful 1961 Ford Falcon at the used car dealership. (U1) He showed it to Bob. (U2) He bought it. (U3) 1. Use the grammatical role hierarchy and identify Cb, Cf and Cp of U1 Cf(U1) = {john, ford, dealership} Cp(U1) = john Cb(U1) = undefined

A Centering Algorithm Input discourseAlgorithm John saw a beautiful 1961 Ford Falcon at the used car dealership. (U1) He showed it to Bob. (U2) He bought it. (U3) 2. Find the likely candidates for pronouns in U2. Since John is the highest ranked member of Cf(U1), and is the only possible referent for he, then he is also Cb(U2).

A Centering Algorithm Input discourseAlgorithm John saw a beautiful 1961 Ford Falcon at the used car dealership. (U1) He showed it to Bob. (U2) He bought it. (U3) 2. Find the likely candidates for pronouns in U2. He = John What about it? Suppose it = the Ford Then we have: Cf(U2) = {John, ford, bob} Cp(U2) = John Cb(U2) = John This is a CONTINUE transition

A Centering Algorithm Input discourseAlgorithm John saw a beautiful 1961 Ford Falcon at the used car dealership. (U1) He showed it to Bob. (U2) He bought it. (U3) 2. Find the likely candidates for pronouns in U2. He = John What about it? Suppose it = the dealership Then we have: Cf(U2) = {John, dealership, bob} Cp(U2) = John Cb(U2) = John This is a CONTINUE transition

A Centering Algorithm Input discourseAlgorithm John saw a beautiful 1961 Ford Falcon at the used car dealership. (U1) He showed it to Bob. (U2) He bought it. (U3) 2. Find the likely candidates for pronouns in U2. He = John What about it? Both the car and the dealership seem equally OK as antecedents of it. Both yield CONTINUE. We can break this tie by using the ranking on the Cf list of the previous utterance. This means that it = the Ford

A Centering Algorithm Input discourseAlgorithm John saw a beautiful 1961 Ford Falcon at the used car dealership. (U1) He showed it to Bob. (U2) He bought it. (U3) 3. Find the likely candidates for pronouns in U3. He is compatible with John or Bob. If we assume it’s John, we get: Cf(U3) = {john, ford} Cp(U3) = John Cb(Us) = John CONTINUE If we assume it’s Bill, we get: Cf(U3) = {bob, ford} Cp(U3) = Bob Cb(U3) = Bob SMOOTH-SHIFT By Rule 2, we prefer John

A Centering Algorithm Input discourseAlgorithm John saw a beautiful 1961 Ford Falcon at the used car dealership. (U1) He showed it to Bob. (U2) He bought it. (U3) 3. Find the likely candidates for pronouns in U3. What about it? Only compatible with the Ford, so we’re done.

General description of the algorithm 1. For each pronoun, find the possible antecedents (based on animacy, gender and number etc). 2. Look at the resulting Cb-Cf combinations for each assignment. 3. Identify the transition represented by each combination. 4. Use Rule 2 to find the best option.

Summary Today we focused on reference, and introduced: An algorithm for reference generation A theory of discourse coherence focusing on anaphora A reference resolution algorithm.