SlideShare a Scribd company logo
1 of 16
Semantic Analysis
CMSC 35100
Natural Language Processing
May 8, 2003
Roadmap
• Semantic Analysis
– Motivation:
• Understanding commands
– Approach I: Syntax-driven semantic analysis
• Augment productions with semantic component
– Lambda calculus formulation
– Approach II: Semantic Grammar
• Augment with domain-specific semantics
– Approach III: Information Extraction
• Template-based semantics
Understanding Commands
• “What do I have on Thursday?”
• Parse:
S
Q-Wh-obj
Whwd Aux NP VP/NP
Pron V NP/NP Temporal
P NP
N
What do I have t on Thursday
Understanding Commands
• Parser:
– Yes, it’s a sentence & here’s the structure
• System: Great! But what do I do?
S
Q-Wh-obj
Whwd Aux NP VP/NP
Pron V NP/NP Temporal
P NP
N
What do I have t on Thursday
Date: Thursday
Date: Thursday
Date: Thursday
Cal
Owner:
User
Date: Thursday
Cal
Owner:
User
Action: Check calendar
Cal Owner: User
Date: Thursday
Syntax-driven Semantic Analysis
• Key: Principle of Compositionality
– Meaning of sentence from meanings of parts
• E.g. groupings and relations from syntax
• Question: Integration?
• Solution 1: Pipeline
– Feed parse tree and sentence to semantic unit
– Sub-Q: Ambiguity:
• Approach: Keep all analyses, later stages will select
Simple Example
• AyCaramba serves meat.
)
,
(
)
,
(
)
,
( Meat
e
Served
AyCaramba
e
Server
Serving
e
Isa
e 


S
NP VP
Prop-N V NP
N
AyCaramba serves meat.
Rule-to-Rule
• Issue:
– Need detailed information about sentence,
parse tree
• Infinitely many sentences & parse trees
• Solution:
– Tie semantics to finite components of grammar
• E.g. rules & lexicon
– Augment grammar rules with semantic info
• Aka “attachments”
– Specify how RHS elements compose to LHS
Semantic Attachments
• Basic structure:
– A-> a1….an {f(aj.sem,…ak.sem)}
• Language for semantic attachments
– Lambda calculus
• Extends First Order Predicate Calculus (FOPC) with function
application
• Example (continued):
– Nouns represented by constants
• Prop-n -> AyCaramba {AyCaramba}
• N -> meat {meat}
Semantic Attachment Example
• Phrase semantics is function of SA of children
– E.g. NP -> Prop-n {Prop-n.sem}
– NP -> N {N.sem}
• More complex functions are parameterized
– E.g. Verb -> serves
– VP -> Verb NP {V.sem(NP.sem)}
• Application=
– S -> NP VP
• Application=
)}
,
(
)
,
(
)
,
(
{ x
e
Served
y
e
Server
Serving
e
Isa
e
y
x 




)
,
(
)
,
(
)
,
( Meat
e
Served
y
e
Server
Serving
e
Isa
e
y 



)
,
(
)
,
(
)
,
( Meat
e
Served
AyCaramba
e
Server
Serving
e
Isa
e 


Complex Attachments
• Complex terms:
– Allow FOPC expressions to appear in otherwise
illegal positions
• E.g. Server(e, x Isa(x,Restaurant))
• Embed in angle brackets
• Translates as x Isa(x,Restaurant) Server(e,x)
– Connective depends on quantifier
• Quantifier Scoping
– Ambiguity: Every restaurant has a menu
• Readings: all have a menu; all have same menu
• Potentially O(n!) scopings (n=# quanifiers)
– Solve ad-hoc fashion



Inventory of Attachments
• S -> NP VP {DCL(VP.sem(NP.sem))}
• S -> VP {IMP(VP.sem(DummyYou)}
• S -> Aux NP VP {YNQ(VP.sem(NP.sem))}
• S -> WhWord NP VP
– {WHQ(NP.sem.var,VP.sem(NP.sem))}
• Nom -> Noun Nom {λx Nom.sem(x) NN(Noun.sem)}
• PP -> P NP {P.sem(NP.sem)} ;; NP mod
• PP -> P NP {NP.sem} ;; V arg PP
• P -> on {λyλx On(x,y)}
• Det -> a { }
• Nom -> N {λx Isa(x,N.sem)}


Earley Parsing with Semantics
• Implement semantic analysis
– In parallel with syntactic parsing
• Enabled by compositional approach
• Required modifications
– Augment grammar rules with semantic field
– Augment chart states with meaning expression
– Completer computes semantics – e.g. unifies
• Can also fail to unify
– Blocks semantically invalid parses
• Can impose extra work
Sidelight: Idioms
• Not purely compositional
– E.g. kick the bucket = die
– tip of the iceberg = beginning
• Handling:
– Mix lexical items with constituents (word nps)
– Create idiom-specific const. for productivity
– Allow non-compositional semantic attachments
• Extremely complex: e.g. metaphor
Approach II: Semantic Grammars
• Issue:
– Grammatical overkill
• Constituents with little (no) contribution to meaning
• Constituents so general that semantics are vacuous
– Mismatch of locality
• Components scattered around tree
• Solution: Semantic Grammars
– Developed for dialogue systems
• Tied to domain
• Exclude unnecessary elements
Semantic Grammar Example
• What do I have on Thursday?
– CalQ -> What Aux UserP have {on} DateP
• Cal action:=find; CalOwner:= head UserP;
Date:=head DateP;
– UserP-> Pron
• Head:=Head Pron
– Pron-> I
• Head:= USER
– DateP -> Dayof Week
• Head:= sem DayofWeek
Semantic Grammar Pros & Cons
• Useful with ellipsis & anaphora
– Restrict input by semantic class: e.g. DataP
• Issues:
– Limited reuse
• Tied to application domain
– Simple rules may overgenerate

More Related Content

Similar to nlp semantic for parsing ... mmmmmmmmmmmm

Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Skills Matter
 
Language Models for Information Retrieval
Language Models for Information RetrievalLanguage Models for Information Retrieval
Language Models for Information RetrievalNik Spirin
 
https://www.slideshare.net/amaresimachew/hot-topics-132093738
https://www.slideshare.net/amaresimachew/hot-topics-132093738https://www.slideshare.net/amaresimachew/hot-topics-132093738
https://www.slideshare.net/amaresimachew/hot-topics-132093738Assosa University
 
Fast Exact String Pattern-Matching Algorithm for Fixed Length Patterns
Fast Exact String Pattern-Matching Algorithm for Fixed Length PatternsFast Exact String Pattern-Matching Algorithm for Fixed Length Patterns
Fast Exact String Pattern-Matching Algorithm for Fixed Length Patternskvaderlipa
 
INTRODUCTION TO LISP
INTRODUCTION TO LISPINTRODUCTION TO LISP
INTRODUCTION TO LISPNilt1234
 
Natural Language Processing (NLP)
Natural Language Processing (NLP)Natural Language Processing (NLP)
Natural Language Processing (NLP)Abdullah al Mamun
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAtner Yegorov
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisHiye Biniam
 
Manage FME using FME
Manage FME using FMEManage FME using FME
Manage FME using FMETensing
 
big data analytics.pptx
big data analytics.pptxbig data analytics.pptx
big data analytics.pptxSabthamiS1
 
Improving Natural Language Inference Using External Knowledge in the Science ...
Improving Natural Language Inference Using External Knowledge in the Science ...Improving Natural Language Inference Using External Knowledge in the Science ...
Improving Natural Language Inference Using External Knowledge in the Science ...Pavan Kapanipathi
 
Big Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic ProcessingBig Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic ProcessingNa'im Tyson
 
Session 0.0 aussenac semanticsnl-pwebsem2017-v4
Session 0.0   aussenac semanticsnl-pwebsem2017-v4Session 0.0   aussenac semanticsnl-pwebsem2017-v4
Session 0.0 aussenac semanticsnl-pwebsem2017-v4semanticsconference
 
Seamless semantics - avoiding semantic discontinuity
Seamless semantics - avoiding semantic discontinuitySeamless semantics - avoiding semantic discontinuity
Seamless semantics - avoiding semantic discontinuitySteffen Staab
 
Programming in C++ and Data Strucutres
Programming in C++ and Data StrucutresProgramming in C++ and Data Strucutres
Programming in C++ and Data StrucutresDr. C.V. Suresh Babu
 

Similar to nlp semantic for parsing ... mmmmmmmmmmmm (20)

Recommender Systems and Linked Open Data
Recommender Systems and Linked Open DataRecommender Systems and Linked Open Data
Recommender Systems and Linked Open Data
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
Language Models for Information Retrieval
Language Models for Information RetrievalLanguage Models for Information Retrieval
Language Models for Information Retrieval
 
https://www.slideshare.net/amaresimachew/hot-topics-132093738
https://www.slideshare.net/amaresimachew/hot-topics-132093738https://www.slideshare.net/amaresimachew/hot-topics-132093738
https://www.slideshare.net/amaresimachew/hot-topics-132093738
 
Fast Exact String Pattern-Matching Algorithm for Fixed Length Patterns
Fast Exact String Pattern-Matching Algorithm for Fixed Length PatternsFast Exact String Pattern-Matching Algorithm for Fixed Length Patterns
Fast Exact String Pattern-Matching Algorithm for Fixed Length Patterns
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
 
Lecture 1 (bce-7)
Lecture   1 (bce-7)Lecture   1 (bce-7)
Lecture 1 (bce-7)
 
INTRODUCTION TO LISP
INTRODUCTION TO LISPINTRODUCTION TO LISP
INTRODUCTION TO LISP
 
Natural Language Processing (NLP)
Natural Language Processing (NLP)Natural Language Processing (NLP)
Natural Language Processing (NLP)
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysis
 
Algorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysisAlgorithmic techniques-for-big-data-analysis
Algorithmic techniques-for-big-data-analysis
 
Manage FME using FME
Manage FME using FMEManage FME using FME
Manage FME using FME
 
big data analytics.pptx
big data analytics.pptxbig data analytics.pptx
big data analytics.pptx
 
Improving Natural Language Inference Using External Knowledge in the Science ...
Improving Natural Language Inference Using External Knowledge in the Science ...Improving Natural Language Inference Using External Knowledge in the Science ...
Improving Natural Language Inference Using External Knowledge in the Science ...
 
Semantics reloaded
Semantics reloadedSemantics reloaded
Semantics reloaded
 
Big Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic ProcessingBig Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic Processing
 
Session 0.0 aussenac semanticsnl-pwebsem2017-v4
Session 0.0   aussenac semanticsnl-pwebsem2017-v4Session 0.0   aussenac semanticsnl-pwebsem2017-v4
Session 0.0 aussenac semanticsnl-pwebsem2017-v4
 
Aussenac semanticsnl pwebsem2017-v4
Aussenac semanticsnl pwebsem2017-v4Aussenac semanticsnl pwebsem2017-v4
Aussenac semanticsnl pwebsem2017-v4
 
Seamless semantics - avoiding semantic discontinuity
Seamless semantics - avoiding semantic discontinuitySeamless semantics - avoiding semantic discontinuity
Seamless semantics - avoiding semantic discontinuity
 
Programming in C++ and Data Strucutres
Programming in C++ and Data StrucutresProgramming in C++ and Data Strucutres
Programming in C++ and Data Strucutres
 

More from RAtna29

PatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
PatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnPatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
PatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnRAtna29
 
NLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
NLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnNLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
NLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnRAtna29
 
Lexical-Semantics-NLP.pptx bbbbbbbbbbbbbbb
Lexical-Semantics-NLP.pptx bbbbbbbbbbbbbbbLexical-Semantics-NLP.pptx bbbbbbbbbbbbbbb
Lexical-Semantics-NLP.pptx bbbbbbbbbbbbbbbRAtna29
 
btrees.ppt ttttttttttttttttttttttttttttt
btrees.ppt  tttttttttttttttttttttttttttttbtrees.ppt  ttttttttttttttttttttttttttttt
btrees.ppt tttttttttttttttttttttttttttttRAtna29
 
lecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
lecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzlecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
lecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzRAtna29
 
Indexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Indexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmmIndexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Indexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmmRAtna29
 
Model-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNN
Model-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNNModel-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNN
Model-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNNRAtna29
 
TF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
TF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyTF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
TF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyRAtna29
 
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhexing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhRAtna29
 
redblacktreeindatastructure-200409083949.pptx
redblacktreeindatastructure-200409083949.pptxredblacktreeindatastructure-200409083949.pptx
redblacktreeindatastructure-200409083949.pptxRAtna29
 
btree.ppt ggggggggggggggggggggggggggggggg
btree.ppt gggggggggggggggggggggggggggggggbtree.ppt ggggggggggggggggggggggggggggggg
btree.ppt gggggggggggggggggggggggggggggggRAtna29
 
queuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbb
queuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbbqueuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbb
queuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbbRAtna29
 
Stack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparationStack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparationRAtna29
 
avltrees.ppt unit 4 ppts for the university exam
avltrees.ppt unit 4 ppts for the university examavltrees.ppt unit 4 ppts for the university exam
avltrees.ppt unit 4 ppts for the university examRAtna29
 
avltreesUNIT4.ppt ggggggggggggggguuuuuuuuu
avltreesUNIT4.ppt ggggggggggggggguuuuuuuuuavltreesUNIT4.ppt ggggggggggggggguuuuuuuuu
avltreesUNIT4.ppt ggggggggggggggguuuuuuuuuRAtna29
 

More from RAtna29 (15)

PatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
PatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnPatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
PatternMatching2.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
 
NLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
NLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnNLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
NLP-ppt.pptx nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
 
Lexical-Semantics-NLP.pptx bbbbbbbbbbbbbbb
Lexical-Semantics-NLP.pptx bbbbbbbbbbbbbbbLexical-Semantics-NLP.pptx bbbbbbbbbbbbbbb
Lexical-Semantics-NLP.pptx bbbbbbbbbbbbbbb
 
btrees.ppt ttttttttttttttttttttttttttttt
btrees.ppt  tttttttttttttttttttttttttttttbtrees.ppt  ttttttttttttttttttttttttttttt
btrees.ppt ttttttttttttttttttttttttttttt
 
lecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
lecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzlecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
lecture09.ppt zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
 
Indexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Indexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmmIndexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Indexing.ppt mmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 
Model-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNN
Model-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNNModel-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNN
Model-Theoretic Semantics.pdf NNNNNNNNNNNNNNNNNNNNN
 
TF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
TF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyTF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
TF-IDF.pdf yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
 
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhexing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
redblacktreeindatastructure-200409083949.pptx
redblacktreeindatastructure-200409083949.pptxredblacktreeindatastructure-200409083949.pptx
redblacktreeindatastructure-200409083949.pptx
 
btree.ppt ggggggggggggggggggggggggggggggg
btree.ppt gggggggggggggggggggggggggggggggbtree.ppt ggggggggggggggggggggggggggggggg
btree.ppt ggggggggggggggggggggggggggggggg
 
queuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbb
queuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbbqueuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbb
queuesArrays.ppt bbbbbbbbbbbbbbbbbbbbbbbbbb
 
Stack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparationStack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparation
 
avltrees.ppt unit 4 ppts for the university exam
avltrees.ppt unit 4 ppts for the university examavltrees.ppt unit 4 ppts for the university exam
avltrees.ppt unit 4 ppts for the university exam
 
avltreesUNIT4.ppt ggggggggggggggguuuuuuuuu
avltreesUNIT4.ppt ggggggggggggggguuuuuuuuuavltreesUNIT4.ppt ggggggggggggggguuuuuuuuu
avltreesUNIT4.ppt ggggggggggggggguuuuuuuuu
 

Recently uploaded

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 

Recently uploaded (20)

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 

nlp semantic for parsing ... mmmmmmmmmmmm

  • 1. Semantic Analysis CMSC 35100 Natural Language Processing May 8, 2003
  • 2. Roadmap • Semantic Analysis – Motivation: • Understanding commands – Approach I: Syntax-driven semantic analysis • Augment productions with semantic component – Lambda calculus formulation – Approach II: Semantic Grammar • Augment with domain-specific semantics – Approach III: Information Extraction • Template-based semantics
  • 3. Understanding Commands • “What do I have on Thursday?” • Parse: S Q-Wh-obj Whwd Aux NP VP/NP Pron V NP/NP Temporal P NP N What do I have t on Thursday
  • 4. Understanding Commands • Parser: – Yes, it’s a sentence & here’s the structure • System: Great! But what do I do? S Q-Wh-obj Whwd Aux NP VP/NP Pron V NP/NP Temporal P NP N What do I have t on Thursday Date: Thursday Date: Thursday Date: Thursday Cal Owner: User Date: Thursday Cal Owner: User Action: Check calendar Cal Owner: User Date: Thursday
  • 5. Syntax-driven Semantic Analysis • Key: Principle of Compositionality – Meaning of sentence from meanings of parts • E.g. groupings and relations from syntax • Question: Integration? • Solution 1: Pipeline – Feed parse tree and sentence to semantic unit – Sub-Q: Ambiguity: • Approach: Keep all analyses, later stages will select
  • 6. Simple Example • AyCaramba serves meat. ) , ( ) , ( ) , ( Meat e Served AyCaramba e Server Serving e Isa e    S NP VP Prop-N V NP N AyCaramba serves meat.
  • 7. Rule-to-Rule • Issue: – Need detailed information about sentence, parse tree • Infinitely many sentences & parse trees • Solution: – Tie semantics to finite components of grammar • E.g. rules & lexicon – Augment grammar rules with semantic info • Aka “attachments” – Specify how RHS elements compose to LHS
  • 8. Semantic Attachments • Basic structure: – A-> a1….an {f(aj.sem,…ak.sem)} • Language for semantic attachments – Lambda calculus • Extends First Order Predicate Calculus (FOPC) with function application • Example (continued): – Nouns represented by constants • Prop-n -> AyCaramba {AyCaramba} • N -> meat {meat}
  • 9. Semantic Attachment Example • Phrase semantics is function of SA of children – E.g. NP -> Prop-n {Prop-n.sem} – NP -> N {N.sem} • More complex functions are parameterized – E.g. Verb -> serves – VP -> Verb NP {V.sem(NP.sem)} • Application= – S -> NP VP • Application= )} , ( ) , ( ) , ( { x e Served y e Server Serving e Isa e y x      ) , ( ) , ( ) , ( Meat e Served y e Server Serving e Isa e y     ) , ( ) , ( ) , ( Meat e Served AyCaramba e Server Serving e Isa e   
  • 10. Complex Attachments • Complex terms: – Allow FOPC expressions to appear in otherwise illegal positions • E.g. Server(e, x Isa(x,Restaurant)) • Embed in angle brackets • Translates as x Isa(x,Restaurant) Server(e,x) – Connective depends on quantifier • Quantifier Scoping – Ambiguity: Every restaurant has a menu • Readings: all have a menu; all have same menu • Potentially O(n!) scopings (n=# quanifiers) – Solve ad-hoc fashion   
  • 11. Inventory of Attachments • S -> NP VP {DCL(VP.sem(NP.sem))} • S -> VP {IMP(VP.sem(DummyYou)} • S -> Aux NP VP {YNQ(VP.sem(NP.sem))} • S -> WhWord NP VP – {WHQ(NP.sem.var,VP.sem(NP.sem))} • Nom -> Noun Nom {λx Nom.sem(x) NN(Noun.sem)} • PP -> P NP {P.sem(NP.sem)} ;; NP mod • PP -> P NP {NP.sem} ;; V arg PP • P -> on {λyλx On(x,y)} • Det -> a { } • Nom -> N {λx Isa(x,N.sem)}  
  • 12. Earley Parsing with Semantics • Implement semantic analysis – In parallel with syntactic parsing • Enabled by compositional approach • Required modifications – Augment grammar rules with semantic field – Augment chart states with meaning expression – Completer computes semantics – e.g. unifies • Can also fail to unify – Blocks semantically invalid parses • Can impose extra work
  • 13. Sidelight: Idioms • Not purely compositional – E.g. kick the bucket = die – tip of the iceberg = beginning • Handling: – Mix lexical items with constituents (word nps) – Create idiom-specific const. for productivity – Allow non-compositional semantic attachments • Extremely complex: e.g. metaphor
  • 14. Approach II: Semantic Grammars • Issue: – Grammatical overkill • Constituents with little (no) contribution to meaning • Constituents so general that semantics are vacuous – Mismatch of locality • Components scattered around tree • Solution: Semantic Grammars – Developed for dialogue systems • Tied to domain • Exclude unnecessary elements
  • 15. Semantic Grammar Example • What do I have on Thursday? – CalQ -> What Aux UserP have {on} DateP • Cal action:=find; CalOwner:= head UserP; Date:=head DateP; – UserP-> Pron • Head:=Head Pron – Pron-> I • Head:= USER – DateP -> Dayof Week • Head:= sem DayofWeek
  • 16. Semantic Grammar Pros & Cons • Useful with ellipsis & anaphora – Restrict input by semantic class: e.g. DataP • Issues: – Limited reuse • Tied to application domain – Simple rules may overgenerate