101035 中文信息处理 Chinese NLP Lecture 11.

Slides:



Advertisements
Similar presentations
Natural Language Processing Lecture 2: Semantics.
Advertisements

First-Order Logic (and beyond)
Semantics (Representing Meaning)
Syntax-Semantics Mapping Rajat Kumar Mohanty CFILT.
Syntactic analysis using Context Free Grammars. Analysis of language Morphological analysis – Chairs, Part Of Speech (POS) tagging – The/DT man/NN left/VBD.
Language and Cognition Colombo, June 2011 Day 2 Introduction to Linguistic Theory, Part 4.
Grammatical Relations and Lexical Functional Grammar Grammar Formalisms Spring Term 2004.
Statistical NLP: Lecture 3
Semantic Role Labeling Abdul-Lateef Yussiff
LING NLP 1 Introduction to Computational Linguistics Martha Palmer April 19, 2006.
Linguistic Theory Lecture 8 Meaning and Grammar. A brief history In classical and traditional grammar not much distinction was made between grammar and.
NLP and Speech 2004 Feature Structures Feature Structures and Unification.
Meaning Representation and Semantic Analysis Ling 571 Deep Processing Techniques for NLP February 9, 2011.
Introduction to Semantics To be able to reason about the meanings of utterances, we need to have ways of representing the meanings of utterances. A formal.
CS 4705 Lecture 19 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised.
Artificial Intelligence 2005/06 From Syntax to Semantics.
November 20, 2003 Chapter 16 Lexical Semantics. Words have structured meanings Lexeme – a pairing of a form with a sense Orthographic form – the way the.
Syntax Lecture 3: The Subject. The Basic Structure of the Clause Recall that our theory of structure says that all structures follow this pattern: It.
Stochastic POS tagging Stochastic taggers choose tags that result in the highest probability: P(word | tag) * P(tag | previous n tags) Stochastic taggers.
中文信息处理 Chinese NLP Lecture 13.
中文信息处理 Chinese NLP Lecture 8.
February 2009Introduction to Semantics1 Logic, Representation and Inference Introduction to Semantics What is semantics for? Role of FOL Montague Approach.
October 2004csa4050: Semantics II1 CSA4050: Advanced Topics in NLP Semantics II The Lambda Calculus Semantic Representation Encoding in Prolog.
Context Free Grammars Reading: Chap 12-13, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
Natural Language Processing Lecture 22—11/14/2013 Jim Martin.
Growing Pains. Writing a report on growing pains.
Chapter 4 Syntax Part II.
Syntax Lecture 8: Verb Types 1. Introduction We have seen: – The subject starts off close to the verb, but moves to specifier of IP – The verb starts.
Lecture 14 Lecture 14 Passive Voice (I). Teaching Contents 14.1 Active sentence and passive sentence 14.1 Active sentence and passive sentence 14.2 Passive.
Computational Lexical Semantics Lecture 8: Selectional Restrictions Linguistic Institute 2005 University of Chicago.
Lecture 12: 22/6/1435 Natural language processing Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
中文信息处理 Chinese NLP Lecture 9.
November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.
1 Natural Language Processing Lecture Notes 11 Chapter 15 (part 1)
Lexical Semantics Chapter 16
AQUAINT Workshop – June 2003 Improved Semantic Role Parsing Kadri Hacioglu, Sameer Pradhan, Valerie Krugler, Steven Bethard, Ashley Thornton, Wayne Ward,
CS 4705 Lecture 19 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised.
11 Chapter 19 Lexical Semantics. 2 Lexical Ambiguity Most words in natural languages have multiple possible meanings. –“pen” (noun) The dog is in the.
Context Free Grammars Reading: Chap 9, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Rada Mihalcea.
Computing Science, University of Aberdeen1 CS4025: Logic-Based Semantics l Compositionality in practice l Producing logic-based meaning representations.
CSE 517 Natural Language Processing Winter 2015 Frames Yejin Choi Some slides adapted from Martha Palmer, Chris Manning, Ray Mooney, Lluis Marquez... TexPoint.
Linguistic Essentials
Semantic Construction lecture 2. Semantic Construction Is there a systematic way of constructing semantic representation from a sentence of English? This.
Combining Lexical Resources: Mapping Between PropBank and VerbNet Edward Loper,Szu-ting Yi, Martha Palmer September 2006.
Rules, Movement, Ambiguity
1/21 Automatic Discovery of Intentions in Text and its Application to Question Answering (ACL 2005 Student Research Workshop )
1 Context Free Grammars October Syntactic Grammaticality Doesn’t depend on Having heard the sentence before The sentence being true –I saw a unicorn.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
11 Project, Part 3. Outline Basics of supervised learning using Naïve Bayes (using a simpler example) Features for the project 2.
NLP. Introduction to NLP Last week, Min broke the window with a hammer. The window was broken with a hammer by Min last week With a hammer, Min broke.
1 Model Checking E. M. Clarke, O. Grumberg, D. A. Peled.
Lec. 10.  In this section we explain which constituents of a sentence are minimally required, and why. We first provide an informal discussion and then.
Week 12. NP movement Text 9.2 & 9.3 English Syntax.
Lecturer : Ms. Abrar Mujaddidi S YNTAX. I NTRODUCTION  In the previous chapter, we moved from the general categories and concepts of traditional grammar,
Natural Language Processing Vasile Rus
COSC 6336: Natural Language Processing
English Syntax Week 12. NP movement Text 9.2 & 9.3.
Statistical NLP: Lecture 3
Semantics (Representing Meaning)
Natural Language Processing
Part I: Basics and Constituency
CSCI 5832 Natural Language Processing
CSC 594 Topics in AI – Applied Natural Language Processing
Unit-4 Lexical Semantics M.B.Chandak, HoD CSE,
Semantics September 23, /22/2018.
CSCI 5832 Natural Language Processing
CSCI 5832 Natural Language Processing
Linguistic Essentials
Lecture 19 Word Meanings II
Progress report on Semantic Role Labeling
Presentation transcript:

101035 中文信息处理 Chinese NLP Lecture 11

句——语义分析(2) Semantic Analysis (2) 谓词逻辑的扩展(Expansions to predicate logic) 带语义的上下文无关语法(Semantic augmentation) 语义角色标注(Semantic role labeling) 选择限制(Selectional restriction)

谓词逻辑的扩展 Expansions to Predicate Logic Lambda Calculus(λ 演算) Lambda (λ) calculus is a logical tool that helps to expand the descriptive power of predicate logic. λ-expressions are formed using the λ-operator. We can prefix the λ-operator, followed by a variable, to any first order formula or λ- expression. This practice is called λ-abstraction. For λx, substituting every occurrence of x with a specific proposition element is called λ-reduction.

Lambda Calculus Examples Restaurant(KFC) A proposition λ-abstractions λ-reductions Restaurant(KFC) Abstracting over the argument: λx Restaurant(x) Abstracting over the predicate: λP P(KFC) λx Restaurant(x) KFC = Restaurant(KFC) λP P(KFC) Restaurant = Restaurant(KFC)

Event Representation(事件的表达) In an event, a predicate can take different numbers of arguments. I ate. Eating1(Speaker) I ate a Turkey Sandwich. Eating2(Speaker,TurkeySandwich) I ate a Turkey Sandwich at my desk. Eating3(Speaker,TurkeySandwich,Desk) I ate at my desk. Eating4(Speaker,Desk) I ate lunch. Eating5(Speaker,Lunch) I ate a Turkey Sandwich for lunch. Eating6(Speaker,TurkeySandwich,Lunch) I ate a Turkey Sandwich for lunch at my desk. Eating7(Speaker,TurkeySandwich,Lunch,Desk)

Event Representation(事件的表达) A better way is to use reification(具体化) to elevate events to objects that can be quantified and related to other objects. I ate. ∃e ISA(e, Eating) ∧ Eater(e, Speaker) I ate a Turkey Sandwich. ∧ Eaten(e, Sandwich) I ate a Turkey Sandwich for lunch. ∧ MealEaten(e, Lunch)

In-Class Exercise Use reification to represent the event in the following. Claire spent a week in Beijing. (Event: Spent, Spender: Claire SpentTime: Aweek, SpentPlace: Beijing)

带语义的上下文无关语法Semantic Augmentation to CFG From Syntax to Semantics

Semantic Attachments CFG rules can be augmented with semantic attachments. 𝐴→ 𝛼 1 … 𝛼 𝑛 {𝑓( 𝛼 𝑗 .𝑠𝑒𝑚,…, 𝛼 𝑘 .𝑠𝑒𝑚)} In computing the sentence meaning, CFG rules are used to combine constituents into larger constituents. λ calculus is used to guide the creation of logical forms in a principled fashion.

Example Every restaurant closed. Semantically augmented CFG rules (1) S → NP VP {NP.sem(VP.sem)} (2) NP → Det Nominal {Det.Sem(Nominal.Sem)} (3) Det → every {λ P.λQ.∀xP(x) ⇒ Q(x)} (4) Nominal → Noun {Noun.sem} (5) Noun → restaurant {λ x Restaurant(x)} (6) VP → Verb {Verb.sem} (7) Verb → closed {λ x.∃e Closed(e)∧Closed(e, x)} Every restaurant closed. We use ⇒ for implication here because → is used in the CFG rules.

Example Every restaurant closed. Rule application Expansion of Det.Sem(Nominal.Sem)}, using (2)(3)(4)(5) (8) λ P.λQ.∀xP(x) ⇒ Q(x)(λ x Restaurant(x)) λ-reduction, using (8) (9) λQ.∀x λ x Restaurant(x)(x) ⇒ Q(x) λ-reduction, using (9) (10) λQ.∀x Restaurant(x) ⇒ Q(x) Expansion of NP.sem(VP.sem), using (1)(6)(7)(9) (11) λQ.∀x Restaurant(x) ⇒ Q(x)(λy.∃e Closed(e)∧Closed(e, y)) λ-reduction, using (11) (12) ∀x Restaurant(x) ⇒ λy.∃e Closed(e)∧Closed(e, y)(x) λ-reduction, using (12) (13) ∀x Restaurant(x) ⇒ ∃e Closed(e)∧Closed(e, x) Every restaurant closed.

语义角色标注 Semantic Role Labeling Semantic Roles In an event, different event participants (arguments) play different roles. Henry broke the window with a stone. In different events, a role may be played by different participants. Henry broke the window. Sarah opened the door. Semantic roles are useful in many NLP applications that require deep semantic understanding.

Common Semantic Roles Semantic Role Definition AGENT(施事) The volitional causer of an event EXPERIENCER(经历者) The experiencer of an event FORCE(作用力) The non-volitional causer of the event THEME(受事) The participant most directly affected by an event RESULT(结果) The end product of an event CONTENT(内容) The proposition or content of a propositional event INSTRUMENT(工具) An instrument used in an event BENEFICIARY(受惠者) The beneficiary of an event SOURCE(来源) The origin of the object of a transfer event GOAL(目标) The destination of an object of a transfer event

Common Semantic Roles Semantic Role Example AGENT The waiter spilled the soup. EXPERIENCER John has a headache. FORCE The wind blows debris from the mall into our yards. THEME Only after Benjamin Franklin broke the ice... RESULT The French government has built a regulation-size baseball diamond... CONTENT Mona asked “You met Mary Ann at a supermarket”? INSTRUMENT He turned to poaching catfish, stunning them with a shocking device... BENEFICIARY Whenever Ann Callahan makes hotel reservations for her boss... SOURCE I flew in from Boston. GOAL I drove to Portland.

Semantic Role Labeling (SRL) The San Francisco Examiner issued a special edition around noon yesterday. AGENT THEME TIME ARG0 ARG1 ARGM-TMP Semantic role labeling is the task of automatically finding the semantic roles for each predicate in a sentence. Standard semantic roles TAGRET Generalized semantic roles, according to PropBank

Semantic Role Labeling SRL is often treated as a supervised machine learning task. A lot of training examples are needed, each in the form of [feature vector]: label. For supervised learning, Naïve Bayes or Decision Tree can be used. Much of SRL is working out the feature vector, which is often based on syntactic parsing.

The San Francisco Examiner issued a special edition around noon yesterday. Example Parse tree

1. the governing predicate (issued) The San Francisco Examiner issued a special edition around noon yesterday. Example Features (for NP-SBJ) 1. the governing predicate (issued) 2. the phrase type of the constituent (NP) 3. the head word of the constituent (Examiner) 4. the head word part-of-speech of the constituent (NNP) 5. the path in the parse tree from the constituent to the predicate (NP↑S↓VP↓VBD) 6. the voice of the clause in which the constituent appears (active) 7. The binary linear position of the constituent with respect to the predicate (before) 8. the sub-categorization (expected arguments) of the predicate (VP→NP PP) ARG0: [issued, NP, Examiner, NNP, NP↑S↓VP↓VBD, active, before, VP→NP PP]

In-Class Exercise Extract the features for NP (ARG1) in the example sentence, according to the scheme on the previous page. The San Francisco Examiner issued a special edition around noon yesterday.

选择限制 Selectional Restriction Basics Selectional restriction is a kind of semantic type constraint that a verb imposes on the kind of concepts that are allowed to fill its argument roles. Selectional restrictions are associated with senses, not entire lexemes. Selectional restrictions vary widely in their specificity.

Examples I want to eat someplace that is near Jiashi. THEME of eat? LOCATION of eat? THEME of eat is edible. The restaurant served green-lipped mussels. Which airlines serve Denver? I often ask the musicians to imagine a tennis game. To diagonalize a matrix is to find its eigenvalues. THEME of imagine can be almost anything. THEME of diagonalize must be matrix.

Selectional Restriction Representation Verb Representing semantic role Representing selectional restriction eat ∃e, x, y Eating(e) ∧ Agent(e, x) ∧ Theme(e, y) ∃e, x, y Eating(e) ∧ Agent(e, x) ∧ Theme(e, y) ∧ ISA(y, EdibleThing)

Selectional Restriction in Terms of WordNet Synsets WordNet is a lexical database for the English language. It groups English words into sets of synonyms called synsets. Example: synset for the word “hamburger” and its hypernyms

Selectional Restriction in Terms of WordNet Synsets Example ate a hamburger

Wrap-Up 谓词逻辑的扩展 语义角色标注 带语义的上下文无关语法 选择限制 Lambda Calculus Semantic Roles Event Representation 带语义的上下文无关语法 Semantic Attachments Lambda Operations 语义角色标注 Semantic Roles Semantic Role Examples Semantic Role Labeling 选择限制 Concept Using Logic Form Using WordNet Synsets