Natural Language Processing

Slides:



Advertisements
Similar presentations
Discourse Structure and Discourse Coherence
Advertisements

Referring Expressions: Definition Referring expressions are words or phrases, the semantic interpretation of which is a discourse entity (also called referent)
Conversational Implicature (Based on Paltridge, chapter 3)
The Cooperative Principle
1 MODULE 2 Meaning and discourse in English COOPERATION, POLITENESS AND FACE Lecture 14.
1 Discourse, coherence and anaphora resolution Lecture 16.
Discourse Martin Hassel KTH NADA Royal Institute of Technology Stockholm
For Friday No reading Homework –Chapter 23, exercises 1, 13, 14, 19 –Not as bad as it sounds –Do them IN ORDER – do not read ahead here.
Lexical chains for summarization a summary of Silber & McCoy’s work by Keith Trnka.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Discourse and Dialogue.
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
People & Speech Interfaces CS 260 Wednesday, October 4, 2006.
Introduction to CL Session 1: 7/08/2011. What is computational linguistics? Processing natural language text by computers  for practical applications.
PSY 369: Psycholinguistics Some basic linguistic theory part3.
Meaning and Language Part 1.
What makes communication by language possible? Striking fact (a) If someone utters a sentence and you know which proposition her utterance expresses, then.
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2005 Lecture 1 21 July 2005.
SAT Prep: Improving Paragraphs AVID III Spring 2012.
Pragmatics.
9/8/20151 Natural Language Processing Lecture Notes 1.
1 Computational Discourse Chapter 21 November 2012 Lecture #15.
Semantics 3rd class Chapter 5.
Lecture 12: 22/6/1435 Natural language processing Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Readers and Writers.  Short essays are written under the pressure of a time limit and average words.  Make a Jot List ▪ A list of points to.
Unit 3 Reference and Sense
Theories of Discourse and Dialogue. Discourse Any set of connected sentences This set of sentences gives context to the discourse Some language phenomena.
Scott Duvall, Brett South, Stéphane Meystre A Hands-on Introduction to Natural Language Processing in Healthcare Annotation as a Central Task for Development.
Discourse. The study of discourse: – Involves our efforts to interpret or be interpreted…and how we accomplish it – Goes beyond just linguistic forms.
SYNTAX Lecture -1 SMRITI SINGH.
Discourse Analysis Radhika Mamidi. Coherence and cohesion What makes a text coherent? What are the coherent devices? Discourses have to have connectivity.
Department of English Introduction To Linguistics Level Four Dr. Mohamed Younis.
Research Methods in T&I Studies I Cooperative Principle and Culture-Specific Maxims.
Linguistics The first week. Chapter 1 Introduction 1.1 Linguistics.
Dr. Francisco Perlas Dumanig
An Introduction to Semantics
Meaning. Deictics  Are words, phrases and features of grammar that have to be interpreted in relation to the situation in which they are uttered such.
Dr. Katie Welch LING  Heretofore, we have talked about the form of language  But, this is only half the story.  We must also consider the.
Rules, Movement, Ambiguity
For Monday Read chapter 24, sections 1-3 Homework: –Chapter 23, exercise 8.
For Friday Finish chapter 24 No written homework.
For Monday Read chapter 26 Last Homework –Chapter 23, exercise 7.
ACE TESOL Diploma Program – London Language Institute OBJECTIVES You will understand: 1. The terminology and concepts of semantics, pragmatics and discourse.
Presentation about pragmatic concepts Implicatures Presuppositions
Topic and the Representation of Discourse Content
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 1 (03/01/06) Prof. Pushpak Bhattacharyya IIT Bombay Introduction to Natural.
For Friday Finish chapter 23 Homework –Chapter 23, exercise 15.
Pragmatics Nuha Alwadaani.
Sight Words.
Support Vector Machines and Kernel Methods for Co-Reference Resolution 2007 Summer Workshop on Human Language Technology Center for Language and Speech.
Pragmatics and Text Analysis Chapter 6.  concerned with the how meaning is communicated by the speaker (writer) and interpreted by the listener (reader)
Levels of Linguistic Analysis
Yule: “Words themselves do not refer to anything, people refer” Reference and inference Pragmatics: Reference and inference.
Lecture 1 Ling 442.
Lecture 10 Semantics Sentence Interpretation. The positioning of words and phrases in syntactic structure helps determine the meaning of the entire sentence.
For Monday Read chapter 26 Homework: –Chapter 23, exercises 8 and 9.
NATURAL LANGUAGE PROCESSING
Discourse: Structure and Coherence Kathy McKeown Thanks to Dan Jurafsky, Diane Litman, Andy Kehler, Jim Martin.
Natural Language Processing COMPSCI 423/723 Rohit Kate.
Discourse: Structure and Coherence Kathy McKeown Thanks to Dan Jurafsky, Diane Litman, Andy Kehler, Jim Martin.
Implicature. I. Definition The term “Implicature” accounts for what a speaker can imply, suggest or mean, as distinct from what the speaker literally.
THE LANGUAGE OF PARLIAMENT (First 10 mins)
COMMUNICATION OF MEANING
INAGO Project Automatic Knowledge Base Generation from Text for Interactive Question Answering.
Referring Expressions: Definition
Levels of Linguistic Analysis
Chapter 2 What speakers know.
Artificial Intelligence 2004 Speech & Natural Language Processing
Presentation transcript:

Natural Language Processing Discourse, Entity Linking, and Pragmatics

Semantics Road Map Lexical semantics Disambiguating words Word sense disambiguation Coreference resolution Semantic role labeling Meaning representation languages Discourse and pragmatics Compositional semantics, semantic parsing -We’re extracting progressively more complicated forms of meaning from language. -Started with zero semantics: just parse trees -Then: Semantics of words in isolation; then predicates (semantic structures) -Now we’re going to look at how sentences relate to each other -We will spend more time than usual talking about theory

How Do Sentences Relate to Each Other? John hid Bill’s car keys. He was drunk. *John hid Bill’s car keys. He likes spinach. -First example: these aren’t arbitrary sentences tossed together --They have a relationship

Another Example “Near-death experiences can help one see more clearly sometimes,” said Steve Jobs. He was speaking about struggling companies. Yet he could easily have been talking about his own life. In 1985 Mr Jobs was pushed out of Apple Computer, the firm he had helped found, only to return after a decade away. In doing so, he mounted one of capitalism’s most celebrated comebacks. *Yet he could easily have been talking about his own life. “Near-death experiences can help one see more clearly sometimes,” said Steve Jobs. In doing so, he mounted one of capitalism’s most celebrated comebacks. In 1985 Mr Jobs was pushed out of Apple Computer, the firm he had helped found, only to return after a decade away. He was speaking about struggling companies. -The second version of the passage has the same sentences in a different order. -All the same sentences are still there in the second version. What went wrong? -Do they make sense? Maybe, but not in the way that the writer originally intended. http://www.economist.com/news/books-and-arts/21647593-new-book-attempts-reconstruct-one-worlds-most-celebrated-inventors-jobs-20

What Is Discourse? Discourse is the coherent structure of language above the level of sentences or clauses. A discourse is a coherent structured group of sentences. What makes a passage coherent? -Discourse is the scaffolding that holds statements together in a passage of text or spoken language. -[before the reveal] Tell me in your own words what coherence means? A practical answer: It has meaningful connections between its utterances.

Applications of Computational Discourse Automatic essay grading Automatic summarization Dialogue systems -automatic essay grading: ETS uses some (simple) computational discourse as part of how they automatically score essays --analysis for coherence --comparison to discourse features of well-written essays -summarization: discourse analysis can tell us things about the relative importance of sentences -dialogue systems: I’ll say more about this later --think about the relationship between a question and an answer in a conversation -think about the different ways we make requests without commanding a person to do something

Discourse Segmentation Goal: Given raw text, separate a document into a linear sequence of subtopics. -Think about the structure of a news article: an “inverted pyramid” -Think about the structure of academic papers: Abstract, Introduction, Methodology, Results, Conclusion -On the right: an example from the book; this is a sequence of topics in a science news article --The numbers here are for paragraphs rather than sentences --But they could be for sentences Pyrmaid from commons.wikimedia.org

Cohesion Relations between words in two units (sentences, paragraphs) “glue” them together. Before winter I built a chimney, and shingled the sides of my house… I have thus a tight shingled and plastered house. Peel, core, and slice the pears and apples. Add the fruit to the skillet. -In the first example here, we have lexical cohesion between two sentences: cohesion via words. -In the second example we have anaphora: replacing a word by other words

Supervised Discourse Segmentation Our instances: place markers between sentences (or paragraphs or clauses) Our labels: yes (marker is a discourse boundary) or no (marker is not a discourse boundary) What features should we use? -Let’s think about treating this as a supervised machine learning problem. -If we’re looking at sentences, paragraph boundaries; if clauses, sentence and paragraph boundaries Discourse markers or cue words Word overlap before/after boundary Number of coreference chains that cross boundary Others?

Evaluating Discourse Segmentation -To evaluate, we need gold standard data to compare against (“ref”) --This is usually text in which boundaries have been labeled by humans -We generally don’t use precision and recall to measure discourse segmentation --They’re not sensitive to near misses -The method shown here is WinDiff -The basic idea: we run a sliding window over the two sequences of sentences and count the differences in the number of boundaries --Size of the lsiding window: half the average segment length -The calculation at the bottom results in 0 if all boundaries are correct

Some Coherence Relations How can we label the relationships between utterances in a discourse? A few examples: Explanation: Infer that the state or event asserted by S1 causes or could cause the state or event asserted by S0. Occasion: A change of state can be inferred from the assertion of S0, whose final state can be inferred from S1, or vice versa. Parallel: Infer p(a1, a2,…) from the assertion of S0 and p(b1, b2,…) from the assertion of S1, where ai and bi are similar for all i. -Recall from a few slides ago what coherence is (the presence of meaningful connections between utterances) -Let’s consider our utterances to be individual sentences or sequences of sentences. --We can characterize relationships between them. -Give me examples of these. -Parallel is loosely defined. Think of two utterances that serve a similar purpose in some context. --Example: The Scarecrow wanted some brains. The Tin Man wanted a heart. --Example: I parked my car in the driveway. My friend chained his bike to the railing.

Discourse Structure from Coherence Relations -We can consider a hierarchical structure between coherence relations in a discourse. -Read the sentences, then parse the diagram.

Automatic Coherence Assignment Given a sequence of sentences or clauses , we want to automatically: determine coherence relations between them (coherence relation assignment) extract a tree or graph representing an entire discourse (discourse parsing) -Do these tasks sound easy or hard?

Automatic Coherence Assignment Very difficult. One existing approach is to use cue phrases. John hid Bill’s car keys because he was drunk. The scarecrow came to ask for a brain. Similarly, the tin man wants a heart. Identify cue phrases in the text. Segment the text into discourse segments. Classify the relationship between each consecutive discourse segment. -Automatic coherence assignment is considered an open problem. -Cue phrases are also known as discourse markers or cue words. -To some extent cue phrases are domain dependent. --In transcripts of news broadcasts: “joining us now”, or “up next” --In scientific papers: “in this section”, “here, we present”

Entity Linking

A Lead-In: Reference Resolution John Chang, Chief Financial Officer of Megabucks Banking Corp since 2004, saw his pay jump 20%, to $1.3 million, as the 37-year-old also became the Denver-based financial-services company’s president. It has been ten years since he came to Megabucks from rival Lotsabucks. -What’s the name for the NLP problem of determining when two linguistic entities refer to the same entity? -In contrast, now we’re interested in determining the things that those linguistic entities (particularly noun phrases) refer to.

Reference Resolution Goal: determine what entities are referred to by which linguistic expressions. The discourse model contains our eligible set of referents. -You can think of this problem as a layer on top of coreference resolution --Often it is necessary to identify coreference chains as part of entity linking

Five Types of Referring Expressions Indefinite noun phrases I saw a beautiful Ford Falcon today. Definite noun phrases I read about it in the New York Times. Pronouns Emma smiled as cheerfully as she could. Demonstratives Put it back. This one is in better condition. Names Miss Woodhouse certainly had not done him justice. -Some of these can take a few different forms. --For example, indefinite noun phrases are sometimes marked by “some” or “this”

Entity Linking Apple updated its investor relations page today to note that it will announce its earnings for the second fiscal quarter (first calendar quarter) of 2015 on Monday, April 27. -We’ll talk briefly about a specific kind of reference resolution called entity linking -In entity linking, we have a knowledge base of entities and some information about them -We want to know specifically when a given piece of text refers to entities in the knowledge base -Why is this hard? --Names are ambiguous News text from http://www.macrumors.com/2015/03/30/apple-to-announce-q2-2015-earnings-on-april-27/

One Approach to Entity Linking Use supervised learning: Train on known references to each entity. Use features from context (bag of words, syntax, etc.). -This approach has worked well when training on Wikipedia text. -Each incoming link to a Wikipedia article is a training instance for the entity represented by that article.

Pragmatics

Pragmatics Pragmatics is a branch of linguistics dealing with language use in context. When a diplomat says yes, he means ‘perhaps’; When he says perhaps, he means ‘no’; When he says no, he is not a diplomat. (Variously attributed to Voltaire, H. L. Mencken, and Carl Jung) -This third topic for today has some relevance to text but a lot of relevance to conversation. --These slides are framed with the context of conversation: easier to discuss -How can “yes” mean “perhaps”, and how can “perhaps” mean “no”? --It’s the context of diplomacy and a diplomat speaking. -To be clear, there are definitely contexts when “yes” and “no” are literal --Because people aren’t always diplomats Quote from http://plato.stanford.edu/entries/pragmatics/

In Context? Social context Physical context Linguistic context Social identities, relationships, and setting Physical context Where? What objects are present? What actions? Linguistic context Conversation history Other forms of context Shared knowledge, etc. -Social context: example on the previous slide -Physical context: (You’re sitting by a window) “It’s cold in here.” -Linguistic context: (We’ve been talking about leaving for a restaurant) “Let’s go now.”

Speech Act Theory “I’ll give the lecture today.” “It’s cold in here.” "This administration today, here and now, declares unconditional war on poverty in America.” “I now pronounce you man and wife.” -By saying things, we actually do things. -We intend consequences when we speak (maybe like “sideaffects” in programming languages) -#1 on this slide is a promise of sorts: the person I’m speaking to recognizes my commitment and intent -#2 we saw on a previous slide: if I say it to someone sitting by the thermostat, it’s a request -#3 is a different kind of promise: LBJ (US president) said this In 1964; it’s a commitment of resources -#4 is a classic example: the officiant at a wedding ceremony says this --We recognize it as making the marriage exist in a ceremonial way

Speech Act Theory in NLP Let’s say that I’m building a system that will interact with people conversationally. Is speech act theory relevant? Why? -I won’t formally introduce dialog systems here, but this can be a teaser to one of Alan’s later lectures. -Try giving Siri a speech act like “I’m hungry” and see what it does. -It doesn’t just accept commands, because people don’t make requests of each other solely in commands.

Grice’s Maxims Quantity: Make your contribution as informative as required, but no more Quality: Try to make your contribution one that is true Relation: Be relevant Manner: Don’t be obscure Avoid ambiguity Be brief Be orderly The Pragmatics Handbook

Grice’s Maxims in NLP Let’s say that I’m building a system that will interact with people conversationally. How are Grice’s Maxims relevant? -Let’s try this again with Grice’s Maxims. -We want to create a system that communicates efficiently and clearly.

-The topics we’ve covered in this lecture are some examples of particularly super-ambitious NLP. --Different kinds of difficulty: improving upon 97% accuracy vs. improving upon 30% --These are problems that require advanced language facilities that we have difficulty mimicing computationally. -Automatic systems that attack them straight-on do not perform well. --Discourse parsing: hard -Worth noting: still some useful applications --Automatic essay grading: used in production systems --Systems like Siri are built to identify certain speech acts Cover of Shel Silverstein’s Where the Sidewalk Ends (1974)