
Introduction to Semantic Role Labeling in Computational Linguistics
Explore the fundamentals of semantic role labeling in computational linguistics, including supervised and unsupervised approaches, state-of-the-art systems, knowledge formalisms, and more. Learn about training classifiers to identify semantic roles in sentences and how it impacts natural language understanding and generation.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
CPSC 503 Computational Linguistics Intro to Pragmatics Lecture 13 Giuseppe Carenini 3/21/2025 CPSC503 Winter 2014 1
Finish from (Oct 14) Semantic Role Labeling 3/21/2025 CPSC503 Winter 2014 2
Semantic Role Labeling: Example DEF. Labeling phrases in a sentence with semantic roles with respect to a target word Some roles.. (FrameNet for hiring frame) Employer Employee Task Position In 1979 , singer Nancy Wilson HIRED him to open her nightclub act . Castro has swallowed his doubts and HIRED Valenzuela as a cook in his small restaurant . 3/21/2025 CPSC503 Winter 2014 3
Supervised Semantic Role Labeling Typically framed as a classification problem since [Gildea, Jurfsky 2002] Train a classifier that for each predicate: determine for each synt. constituent which semantic role (if any) it plays with respect to the predicate Train on a corpus annotated with relevant constituent features These include: predicate, phrase type, head word and its POS, path, voice, linear position and many others 3/21/2025 CPSC503 Winter 2014 4
Semantic Role Labeling: Example ARG0 [issued, NP, Examiner, NNP, NP S VP VBD, active, before, ..] predicate, phrase type, head word and its POS, path, voice, linear position 3/21/2025 CPSC503 Winter 2014 5
Supervised Semantic Role Labeling (basic) Algorithm 1. Assign parse tree to input 2. Find all predicate-bearing words (PropBank, FrameNet) 3. For each predicate.: apply classifier to each synt. constituent Unsupervised Semantic Role Labeling: bootstrapping [Swier, Stevenson 04] 3/21/2025 CPSC503 Winter 2014 6
Semantic Role Labeling (state of the art systems) ASSERT Automatic Statistical SEmantic Role Tagger Towards reference: Robust Semantic Role Labeling Sameer Pradhan, Wayne Ward and James H. Martin Computational Linguistics Special Issue on Semantic Role Labeling, Vol. 34, No. 2, pp. 289-310, 2008. Illinois Semantic Role Labeler (SRL) (Machine Learning and Integer Linear Prorgamming) 3/21/2025 CPSC503 Winter 2014 7
Knowledge-Formalisms Map (including probabilistic formalisms) U n d e r s t a n d i n g G e n e r a t i o n State Machines (and prob. versions) Morphology Syntax Rule systems (and prob. versions) Semantics (First-Order Logics) Thesaurus & corpus based methods Logical formalisms Pragmatics Discourse and Dialogue AI planners (HTN, MDPs) 3/21/2025 CPSC503 Winter 2014 8
Today Oct 16 Brief Intro Pragmatics (dialog) Discourse Monologue Dialog 3/21/2025 CPSC503 Winter 2014 9
Semantic Analysis Sentence Meanings of grammatical structures Syntax-driven and Lexical Semantic Analysis Meanings of words Literal Meaning I N F E R E N C E Common-Sense Domain knowledge Further Analysis Discourse Structure Context Intended meaning Pragmatics 3/21/2025 CPSC503 Winter 2014 10
Semantic Analysis I am going to SFU on Tue The garbage truck just left Sentence Meanings of grammatical structures Syntax-driven Semantic Analysis Meanings of words Literal Meaning I N F E R E N C E Common-Sense Domain knowledge Further Analysis Discourse Structure Context Intended meaning 3/21/2025 Shall we meet on Tue? What time is it? CPSC503 Winter 2014 11
Pragmatics: Example (i) A: So can you please come over here again right now (ii) B: Well, I have to go to Edinburgh today sir (iii) A: Hmm. How about this Thursday? What information can we infer about the context in which this (short and insignificant) exchange occurred ? 3/21/2025 CPSC503 Winter 2014 12
Pragmatics: Conversational Structure (i) A: So can you please come over here again right now (ii) B: Well, I have to go to Edinburgh today sir (iii) A: Hmm. How about this Thursday? Not the end of a conversation (nor the beginning) Pragmatic knowledge: Strong expectations about the structure of conversations Pairs e.g., request <-> response Closing/Opening forms 3/21/2025 CPSC503 Winter 2014 13
Pragmatics: Dialog Acts (i) A: So can you please come over here again right now? (ii) B: Well, I have to go to Edinburgh today sir (iii) A: Hmm. How about this Thursday? A is requesting B to come at time of speaking, B implies he can t (or would rather not) A repeats the request for some other time. Pragmatic assumptions relying on: mutual knowledge (B knows that A knows that ) co-operation (must be a response triggers inference) topical coherence (who should do what on Thur?) 3/21/2025 CPSC503 Winter 2014 14
Pragmatics: Specific Act (Request) (i) A: So can you please come over here again right now (ii) B: Well, I have to go to Edinburgh today sir (iii) A: Hmm. How about this Thursday? A wants B to come over A believes it is possible for B to come over A believes B is not already there A believes he is not in a position to order B to Pragmatic knowledge: speaker beliefs and intentions underlying the act of requesting Assumption: A behaving rationally and sincerely 3/21/2025 CPSC503 Winter 2014 15
Pragmatics: Deixis (i) A: So can you please come over here again right now (ii) B: Well, I have to go to Edinburgh today sir (iii) A: Hmm. How about this Thursday? A assumes B knows where A is Neither A nor B are in Edinburgh The day in which the exchange is taking place is not Thur., nor Wed. (or at least, so A believes) Pragmatic knowledge: References to space and time wrt space and time of speaking 3/21/2025 CPSC503 Winter 2014 16
Today Oct 16 Brief Intro Pragmatics Discourse Monologue Dialog 3/21/2025 CPSC503 Winter 2014 17
Discourse: Monologue Monologues as sequences of sentences have structure Tasks: Rhetorical (discourse) parsing and generation (like sentences as sequences of words) Key discourse phenomenon: referring expressions (what they denote may depend on previous discourse) Task: Coreference resolution 3/21/2025 CPSC503 Winter 2014 18
Sample Monologues: Coherence House-A is an interesting house. It has a convenient location. Even though house-A is somewhat far from the park, it is close to work and to a rapid transportation stop. It has a convenient location. It is close to work. Even though house-A is somewhat far from the park, house- A is an interesting house. It is close to a rapid transportation stop. 3/21/2025 CPSC503 Winter 2014 21
Corresponding Text Structure CORE EVIDENCE House-A interesting house. is an CORE-1 CONCESSION-1 EVIDENCE-1 It location. has a convenient it is close to a rapid transportation stop it is close to work Even somewhat far from the park though house-A is 3/21/2025 CPSC503 Winter 2014 ordering 22 decomposition rhetorical relations
Text Relations, Parsing and Generation Rhetorical (coherence) Relations: different proposals (typically 20-30 rels) Elaboration, Contrast, Purpose Parsing: Given a monologue, determine its rhetorical structure (semi-sup. [Marcu, 00 and 02]) (sup. [Duverle & Prendinger 09]) . Our own work Generation: Given a communicative goale.g., [convince user to quit smoking] structure [Reiter et al. AIJ 03] [convince user to quit smoking]generate 3/21/2025 CPSC503 Winter 2014 23
Reference Language contains many references to entities mentioned in previous sentences (i.e., in the discourse context/model) I saw him I passed the course I d like the red one I disagree with what you just said That caused the invasion Two tasks Anaphora/pronominal resolution 3/21/2025 Co-reference resolution CPSC503 Winter 2014 24
Reference Resolution Terminology Referring expression: NL expression used to perform reference Referent: entity that is referred Types of referring expressions: Indefinite NP (a, some, ) Definite NP (the, ) Pronouns (he, she, her,...) Demonstratives (this, that,..) Names Inferrables Generics 3/21/2025 CPSC503 Winter 2014 25
Pronominal Resolution: Simple Algorithm Last object mentioned (correct gender/person) John ate an apple. He was hungry. He refers to John ( apple is not a he ) Google is unstoppable. They have increased.. Selectional restrictions John ate an apple in the store. It was delicious. [stores cannot be delicious] It was quiet. [apples cannot be quiet] Binding Theory constraints Mary bought herself a new Ferrari Mary bought her a new Ferrari 3/21/2025 CPSC503 Winter 2014 26
Additional Complications Some pronouns don t refer to anything It rained must check if verb has a dummy subject Evaluate last object mentioned using parse tree, not literal text position I went to the GAP, which is opposite to BR, It is a big store. [GAP, not BP] 3/21/2025 CPSC503 Winter 2014 27
Focus John is a good student He goes to all his tutorials He helped Sam with CS4001 He wants to do a project for Prof. Gray He refers to John (not Sam) 3/21/2025 CPSC503 Winter 2014 28
Supervised Pronominal Resolution Corpus annotated with co-reference relations (all antecedents of each pronoun are marked) What features ? (U1) John saw a nice Ferrari in the parking lot (U2) He showed it to Bob (U3) Hebought it 3/21/2025 CPSC503 Winter 2014 29
Need World Knowledge The police prohibited the fascists from demonstrating because they feared violence. vs The police prohibited the fascists from demonstrating because they advocated violence. Exactly the same syntax! Not possible to resolve they without detailed representation of world knowledge about feared violence vs. advocated violence 3/21/2025 CPSC503 Winter 2014 30
Coreference resolution Decide whether any pair of NPs co-refer Binary classifier again anaphor NPj antecedents What features? Same as for anaphora + specific ones to deal with definite and names. E.g., Edit distance Alias (based on type e.g., for PERSON: Dr. or Chairman can be removed) Appositive ( Mary, the new CEO, . 3/21/2025 CPSC503 Winter 2014 31
Assignment 3 has been posted (due Oct 28) Next class: Tue Oct. 21 Project proposal (bring your write-up to class; 1-2 pages single project, 3-4 pages group project) Project proposal Presentation Approx 10 min presentation + 3-5 min for questions (double if you are in a group) For content, follow instructions at course project web page Bring 1 handout to class (copy of your slides) Please send me your presentation by @9:30am (so that I can have all the presentations on my laptop) 3/21/2025 CPSC503 Winter 2014 32
Reading Presentation Assignment We have 18 readings overall 5 confirmed people who will present So three papers each (I will try to give you at least two that you like and no one that you dislike) Readings will be assigned today I will ask Enamul to present 17a and 17b (his work) I could present the last one: 23b 3/21/2025 CPSC503 Winter 2014 33
Knowledge-Formalisms Map (including probabilistic formalisms) U n d e r s t a n d i n g G e n e r a t i o n State Machines (and prob. versions) Morphology Syntax Rule systems (and prob. versions) Semantics (First-Order Logics) Thesaurus & corpus based methods Logical formalisms Pragmatics Discourse and Dialogue AI planners (MDPs Markov Decision Processes) 3/21/2025 CPSC503 Winter 2014 34
Next Time: Natural Language Generation Read handout on NLG Lecture will be about an NLG system that I developed and tested 3/21/2025 CPSC503 Winter 2014 35
Today 27/10 Brief Intro Pragmatics Discourse Monologue Dialog 3/21/2025 CPSC503 Winter 2014 36
Discourse: Dialog Most fundamental form of language use First kind we learn as children Dialog can be seen as a sequence of communicative actions of different kinds (dialog acts) - (DAMSL 1997; ~20) Example: (i) A: So can you please come over here again right now (ii) B: Well, I have to go to Edinburgh today sir (iii) A: Hmm. How about this Thursday (vi) B: OK ACTION-DIRECTIVE REJECT-PART ACTION- DIRECTIVE ACCEPT 3/21/2025 CPSC503 Winter 2014 37
Dialog: two key tasks (1) Dialog act interpretation: identify the user dialog act (2) Dialog management: (1) & decide what to say and when 3/21/2025 CPSC503 Winter 2014 38
Dialog Act Interpretation What dialog act a given utterance is? Surface form is not sufficient! E.g., I m having problems with the homework Statement - prof. should make a note of this, perhaps make homework easier next year Directive - prof. should help student with the homework Information request - prof should give student the solution 3/21/2025 CPSC503 Winter 2014 39
Automatic Interpretation of Dialog Acts State Machines (and prob. versions) Morphology Cue-based Syntax Rule systems (and prob. versions) Semantics Pragmatics Discourse and Dialogue Logical formalisms (First-Order Logics) Plan-Inferential AI planners 3/21/2025 CPSC503 Winter 2014 40
Cue-Based: Key Idea Words and collocations: Please and would you -> REQUEST are you and is it -> YES-NO-QUESTIONs Prosody: Loudness or stress yeah -> AGREEMENT vs. BACKCHANNEL Conversational structure: Yeah following PROPOSAL -> AGREEMENT Yeah following INFORM -> BACKCHANNEL 3/21/2025 CPSC503 Winter 2014 41
Cue-Based model (1) Each dialog act type (d) has its own micro-grammar which can be captured by N-gram models Split Corpus for d1 Corpus for dm N-gram models1 Annotated Corpus N-gram modelsm Lexical: given an utterance W= w1 wn for each dialog act (d) we can compute P(W|d) Prosodic: given an utterance F= f1 fn for each 3/21/2025 dialog act (d) we can compute P(F|d) CPSC503 Winter 2014 42
Cue-Based model (2) Conversational structure: Markov chain Annotated Corpus 1 1 d1 d3 1 .3 .8 d5 d2 .2 .2 .3 d4 .5 .7 Fi , Wi Combine all info sources: HMM ( | ) P i d d 1 i di-1 di d = ( P , | d ) P = W F d i W i i ( , | ) P W F i i i ( | ) ( | ) P F d i i i i Fi , Wi Fi , Wi N-gram models! 3/21/2025 CPSC503 Winter 2014 43
Cue-Based model Summary Start form annotated corpus (each utterance labeled with appropriate dialog act) For each dialog act type (e.g., REQUEST), build lexical and phonological N-grams Build Markov chain for dialog acts (to express conversational structure) Combine Markov Chain and N-grams into an HMM Sequences of sequences Now arg max D ( | , ) P D W F 3/21/2025 ..can be computed with CPSC503 Winter 2014 44
Dialog Managers in Conversational Agents Examples: Airline travel info system, restaurant/movie guide, email access by phone Tasks Control flow of dialogue (turn-taking) What to say/ask and when 3/21/2025 CPSC503 Winter 2014 45
Dialog Managers State Machines (and prob. versions) Morphology FSA Syntax Rule systems (and prob. versions) Semantics Template-Based Pragmatics Discourse and Dialogue Logical formalisms (First-Order Logics) BDI MDP AI planners (and prob. versions) 3/21/2025 CPSC503 Winter 2014 46
Plan Inferential (BDI) Pros/Cons Dialog acts are expressed as plan operators involving belief, desire, intentions Powerful: uses rich and sound knowledge structures -> should enable modeling of subtle indirect uses of dialog acts Time-consuming: To develop To execute Ties discourse processing with non- linguistic reasoning -> AI complete 3/21/2025 CPSC503 Winter 2014 47
FSA Dialog Manager: system initiative xxx 3/21/2025 CPSC503 Winter 2014 48
Template-based Dialog Manager (1) GOAL: to allow more complex sentences that provide more than one info item at a time S: How may I help you? U: I want to go from Boston to Baltimore on the 8th. Slot Optional questions From_Airport From what city are you leaving? To_Airport Where are you going? Dept-Time When do you want to leave? Dept-Day Interpretation: Semantic Grammars, semi- HMM, Hidden-Understanding-Models (HUM) 3/21/2025 CPSC503 Winter 2014 49
Template-based Dialog Manager (2) More than one template: e.g., car or hotel reservation User may provide information to fill slots in different templates A set of production rules fill slots depending on input and determines what questions should be asked next E.g., IF user mention car slot and most of air slot are filled 3/21/2025 THEN ask about remaining car slots. CPSC503 Winter 2014 50
Markov Decision Processes [02] Common formalism in AI to model an agent interacting with its environment. States / Actions / Rewards Application to dialog: States: slot in frame currently worked on, ASR confidence value, number of questions about slot,.. Actions: questions types, confirmation types Rewards: user feedback, task completion rate 3/21/2025 CPSC503 Winter 2014 51
BDI Dialog Manager S1: How may I help you? U1: I want to go to Pittsburgh in April. REQUEST ACKNOWLEDGE S2: And, what date in April do you want to travel? REQUEST INFORM U2: Uh hmm I have a mtg. there on the 12th. Sys to understand U2 needs model of preconditions, effects, decomposition of: meeting event (precon: be there ) - fly-to plan (decomp: book-flight, take-flight) - Take-flight plan (effect: be there ) 3/21/2025 CPSC503 Winter 2014 52