Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "101035 中文信息处理 Chinese NLP Lecture 11."— Presentation transcript:

1 中文信息处理 Chinese NLP Lecture 11

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

3 谓词逻辑的扩展 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.

4 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)

5 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)

6 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)

7 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)

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

9 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.

10 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.

11 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.

12 语义角色标注 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.

13 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

14 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.

15 Semantic Role Labeling (SRL)
The San Francisco Examiner issued a special edition around noon yesterday. AGENT THEME TIME ARG ARG 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

16 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.

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

18 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]

19 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.

20 选择限制 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.

21 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.

22 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)

23 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

24 Selectional Restriction in Terms of WordNet Synsets
Example ate a hamburger

25 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


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

Similar presentations


Ads by Google