1 / 56

Natural Language Processing

Explore the challenges and methods for resolving references and pronouns in natural language processing. Understand the different reference phenomena, constraints, and preferences for co-reference, and learn about the Lappin-Leass algorithm for coreference resolution.

conboy
Download Presentation

Natural Language Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Natural Language Processing Computational Discourse

  2. Outline • Reference • Kinds of reference phenomena • Constraints on co-reference • Preferences for co-reference • The Lappin-Leass algorithm for coreference

  3. Note • Reference resolution and discourse processing are very difficult • There are no fully successful approaches • But, they are needed. • Today, the first goal is for you to be aware of how you resolve pronouns (as a human). You need to understand the task before you could develop a method • Then, we will look at a concrete algorithm for pronoun resolution • Finally, we’ll look at discourse relations

  4. Part I: Reference Resolution • John went to Bill’s car dealership to check out an Acura Integra. He looked at it for half an hour • I’d like to get from Boston to San Francisco, on either December 5th or December 6th. It’s ok if it stops in another city along they way

  5. Some terminology • John went to Bill’s car dealership to check out an Acura Integra. He looked at it for half an hour • Reference: process by which speakers use words John and he to denote a particular person • Referring expression: John, he • Referent: the actual entity (but as a shorthand we might call “John” the referent). • John and he “corefer” • Antecedent: John • Anaphor: he

  6. Discourse Model • Model of the entities the discourse is about • A referent is first evoked into the model. Then later it is accessed from the model Access Evoke He John Corefer

  7. Many types of reference • (after Webber 91) • According to John, Bob bought Sue an Integra, and Sue bought Fred a Legend • But that turned out to be a lie (a speech act) • But that was false (proposition) • That struck me as a funny way to describe the situation (manner of description) • That caused Sue to become rather poor (event) • That caused them both to become rather poor (combination of several events)

  8. Reference Phenomena • Indefinite noun phrases: generally new • I saw an Acura Integra today • Some Acura Integras were being unloaded… • I am going to the dealership to buy an Acura Integra today. (specific/non-specific) • I hope they still have it • I hope they have a car I like • Definite noun phrases: identifiable to hearer because • Mentioned: I saw an Acura Integra today. The Integra was white • Identifiable from beliefs: The Indianapolis 500 • Inherently unique: The fastest car in …

  9. Reference Phenomena: Pronouns • I saw an Acura Integra today. It was white • Compared to definite noun phrases, pronouns require more referent salience. • John went to Bob’s party, and parked next to a beautiful Acura Integra • He got out and talked to Bob, the owner, for more than an hour. • Bob told him that he recently got engaged and that they are moving into a new home on Main Street. • ??He also said that he bought it yesterday. • He also said that he bought the Acura yesterday

  10. Salience Via Structural Recency • E: So, you have the engine assembly finished. Now attach the rope. By the way, did you buy the gas can today? • A: Yes • E: Did it cost much? • A: No • E: Good. Ok, have you got it attached yet? • The middle part is a subdialog; once it is over, we resume with the discourse model of the first two sentences. “By the way” signals the beginning of the subdialog and “Ok” signals the end of it.

  11. More on Pronouns • Cataphora: pronoun appears before referent: • Before he bought it, John checked over the Integra very carefully.

  12. Inferrables • I almost bought an Acura Integra today, but the engine seemed noisy.. • Mix the flour, butter, and water. • Kneed the dough until smooth and shiny • Spread the paste over the blueberries • Stir the batter until all lumps are gone.

  13. Inferrables • I almost bought an Acura Integra today, but the engine seemed noisy. This works, even if the engine wasn’t mentioned before. • Mix the flour, butter, and water. Same for these. • Kneed the dough until smooth and shiny • Spread the paste over the blueberries • Stir the batter until all lumps are gone.

  14. Discontinuous sets • John has an Acura and Mary has a Suburu. They drive them all the time.

  15. Generics • I saw no less than 6 Acura Integras today. They are the coolest cars.

  16. Generics • I saw no less than 6 Acura Integras today. They are the coolest cars. • “They” refers to the general class, not to the 6 specific cars

  17. Pronominal Reference Resolution • Given a pronoun, find the referent (either in text or as a entity in the world) • We will approach this today in 3 steps • Hard constraints on reference • Soft constraints on reference • An algorithm that uses these constraints • But first, let’s think about what influences pronominal reference resolution

  18. What influences pronoun resolution? • Syntax • Semantics/world knowledge

  19. Syntax matters • John kicked Bill. Mary told him to go home. • Bill was kicked by John. Mary told him to go home. • John kicked Bill. Mary punched him.

  20. Why syntax matters • John kicked Bill. Mary told him to go home. John; subject preference. • Bill was kicked by John. Mary told him to go home. • John kicked Bill. Mary punched him.

  21. Why syntax matters • John kicked Bill. Mary told him to go home. • Bill was kicked by John. Mary told him to go home. Bill; subject preference. This is due to syntax, not semantics, since it is the same event. • John kicked Bill. Mary punched him.

  22. Why syntax matters • John kicked Bill. Mary told him to go home. • Bill was kicked by John. Mary told him to go home. • John kicked Bill. Mary punched him. Bill; parallel roles (both are direct objects); that can trump the subject preference

  23. Why syntax matters • John kicked Bill. Mary told him to go home. • Bill was kicked by John. Mary told him to go home. • John kicked Bill. Mary punched him. Grammatical role hierarchy

  24. Why syntax matters • John kicked Bill. Mary told him to go home. • Bill was kicked by John. Mary told him to go home. • John kicked Bill. Mary punched him. Grammatical role parallelism

  25. Why semantics matters The city council denied the demonstrators a permit because they {feared|advocated} violence.

  26. Why semantics matters The city council denied the demonstrators a permit because they {feared|advocated} violence.

  27. Why semantics matters The city council denied the demonstrators a permit because they {feared|advocated} violence.

  28. Why knowledge matters • John hit Bill. He was severely injured.

  29. Why knowledge matters • John hit Bill. He was severely injured. • Even though John is the subject, our knowledge tells us “He” is probably Bill, overriding the syntactic preference

  30. Margaret Thatcher admires Hillary Clinton, and George W. Bush absolutely worships her. Why Knowledge Matters

  31. Margaret Thatcher admires Hillary Clinton, and George W. Bush absolutely worships her.Remember: George W. Bush is positive toward Thatcher and negative toward H. Clinton; so we reject “her” being H. Clinton, even though syntactic parallelism suggests it is Clinton. (Or, you consider sarcasm, that the speaker is wrong, etc.) Why Knowledge Matters

  32. Pronoun Resolution: State of the Art • Not very good • There are no successful methods that take care of all the different cases we’ve seen in these notes (e.g., those that require knowledge, detecting subdialogs, detecting sarcasm, etc) • There are approaches that exploit hard and soft syntactic and semantic constraints • In general, we need reference resolution to succeed to get to the “next level” of NLP systems. Hopefully, there will be a breakthrough …

  33. Hard constraints on coreference • Number agreement • John has an Acura. It is red. • Person and case agreement • *John and Mary have Acuras. We love them (where We=John and Mary) • Gender agreement • John has an Acura. He/it/she is attractive. • Syntactic constraints • John bought himself a new Acura (himself=John) • John bought him a new Acura (him = not John)

  34. Pronoun Interpretation Preferences • Selectional Restrictions • John parked his Acurain the garage. He had driven it around for hours. • Recency • John has an Integra. Bill has a Legend. Mary likes to drive it.

  35. Pronoun Interpretation Preferences • Grammatical Role: Subject preference • John went to the Acura dealership with Bill. He bought an Integra. • Bill went to the Acura dealership with John. He bought an Integra • (?) John and Bill went to the Acura dealership. He bought an Integra

  36. Repeated Mention preference • John needed a car to get to his new job. He decided that he wanted something sporty. Bill went to the Acura dealership with him. He bought an Integra. • “He” is John, even though Bill was more recently mentioned. But, John is more “salient” (in focus) because he was mentioned 3 times compared to 1 time for Bill.

  37. Parallelism Preference • Mary went with Sue to the Acura dealership. Sally went with her to the Mazda dealership. (even though Mary is the subject) • Mary went with Sue to the Acura dealership. Sally told her not to buy anything. (no parallelism, so subject preferred)

  38. Verb Semantics Preferences • John telephoned Bill. He lost the pamphlet on Acuras. • John criticized Bill. He lost the pamphlet on Acuras. • “Implicit causality” • Implicit cause of criticizing is object. • Implicit cause of telephoning is subject. • (To understand this, try to be aware of how you are interpreting the sentences.)

  39. Verb Preferences • John seized the Acura pamphlet from Bill. He loves reading about cars. • John passed the Acura pamphlet to Bill. He loves reading about cars.

  40. Verb Preferences • John seized the Acura pamphlet from Bill. He loves reading about cars. • After the first sentence, John is the focus – you picture him seizing the pamphlet and bringing it toward himself. • John passed the Acura pamphlet to Bill. He loves reading about cars. • After the first sentence, Bill is the focus; he just received the pamphlet • Preference for goal over source semantic role

  41. Pronoun Resolution Algorithm • Lappin and Leass (1994): Given he/she/it, assign antecedent. • Implements only recency and syntactic preferences • Two steps • Discourse model update • When a new noun phrase is encountered, add a representation to discourse model with a salience value • Modify saliences. • Pronoun resolution • Choose the most salient antecedent

  42. Salience Factors and Weights • From Lappin and Leass

  43. Recency • Weights are cut in half after each sentence is processed • A sentence recency weight is added (100 for new sentences)

  44. Lappin and Leass (cont) • Grammatical role preference • Subject > existential predicate nominal > object > indirect object > demarcated adverbial PP • Examples • An Acura Integra is parked in the lot (subject) • There is an Acura Integra parked in the lot (ex. pred nominal) • John parked an Acura Integra in the lot (object) • John gave his Acura Integra a bath (indirect obj) • In his Acura Integra, John showed Susan his new CD player (demarcated adverbial PP) • Head noun emphasis factor gives above 80 points, but followed embedded NP nothing: • The owner’s manual for an Acura Integra is on John’s desk

  45. Lappin and Leass (cont) • Grammatical role preference • Subject > existential predicate nominal > object > indirect object > demarcated adverbial PP • Examples • In his Acura Integra, John showed Susan his new CD player (demarcated adverbial PP) – a noun inside a PP which is “demarcated” – separated from the main sentence with a comma. Note that any noun that is NOT in one of these gets 50 points. • Head noun emphasis factor gives 80 points to a noun that is the head of its NP. The following does not get these points: • The owner’s manual for an Acura Integra is on John’s desk

  46. Lappin and Leass Algorithm • Collect the potential referents (up to 4 sentences back) • Remove potential referents that do not agree in number or gender with the pronoun • Remove potential references that do not pass syntactic coreference constraints • Compute total salience value of referent from all factors, including, if applicable, role parallelism (+35) or cataphora (-175). • Select referent with highest salience value. In case of tie, select closest. • (We’ll fill in specifics of what happens when via example)

  47. Example • John saw a beautiful Acura Integra at the dealership. He showed it to Bob. He bought it. Sentence 1 (no pronoun to resolve):

  48. After sentence 1 • Cut all values in half

  49. He showed it to Bob • He specifies male gender • So Step 2 reduces set of referents to only John. • Now update discourse model for the referent: • He in current sentence (recency=100), subject position (=80), not adverbial (=50) not embedded (=80), so add 310:

  50. He showed it to Bob • Can be Integra or dealership. • Need to add weights: • Parallelism: it + Integra are objects (dealership is not), so +35 for integra • Integra 175 to dealership 115, so pick Integra • Update discourse model: it is nonembedded object, gets 100+50+50+80=280 added to it (in current sentence, direct object, not in a PP, is the head noun). It had 140, so now its total is 420.

More Related