SlideShare a Scribd company logo
1 of 22
Semantic Parsing 
Definition: process of mapping natural language 
text into a formal representation of its meaning. 
Ewan forgot the mozzarella in his car. 
∃x0 named(x0, ewan, person) ∧ 
∃x1 mozzarella(x1) ∧ 
∃x2 car(x2) ∧ of(x2,x0) ∧ in(x1, x2) ∧ 
∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ 
patient(e, x1) 
10 September 2014 2
Semantic Parsing 
Definition: process of mapping natural language 
text into a formal representation of its meaning. 
Ewan forgot the mozzarella in his car. 
∃x0 named(x0, ewan, person) ∧ 
∃x1 mozzarella(x1) ∧ 
∃x2 car(x2) ∧ of(x2,x0) ∧ in(x1, x2) ∧ 
∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ 
patient(e, x1) 
10 September 2014 3
Semantic Role Labelling 
Mapping to a shallow semantic representation of 
predicates and associated semantic arguments 
Ewan forgot the mozzarella in his car. 
∃x0 named(x0, ewan, person) ∧ 
∃x1 mozzarella(x1) ∧ 
∃x2 car(x2) ∧ of(x2,x0) ∧ in(x1, x2) ∧ 
∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ 
patient(e, x1) 
10 September 2014 4
Semantic Role Labelling 
Mapping to a shallow semantic representation of 
predicates and associated semantic arguments 
Ewan forgot the mozzarella in his car. 
∃x0 named(x0, ewan, per) ∧ male(x0) ∧ 
∃x1 mozzarella(x1) ∧ 
∃x2 car(car←———x2) ∧ of(his x2,x0) ∧ 
∧ 
∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ 
Ewan—actor→forget) 
Ewan———↗ patient(e, x3) ∧ ↖ in(———e, x2) 
mozzarella 
10 September 2014 5
Semantic Role Labelling 
Mapping to a shallow semantic representation of 
predicates and associated semantic arguments 
Ewan forgot the mozzarella in his car. 
∃x0 named(x0, ewan, per) ∧ male(x0) ∧ 
∃x1 mozzarella(x1) ∧ 
∃x2 car←car(x2) owner—∧ of(x2,his x0) ∧ 
car—location ∧ 
∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ 
Ewan—actor→forget) ↓ 
Ewan—patient(actor↗ e, x3) ∧ in(↖theme—e, x2) 
mozzarella 
10 September 2014 6
Semantic Role Labelling 
Motivation: identify who did what to whom, 
where, why and how, etc. 
Ewan forgot the mozzarella in his car. 
∃x0 named(x0, ewan, per) ∧ male(x0) ∧ 
∃x1 mozzarella(x1) ∧ 
∃x2 car(car←x2) owner—∧ of(x2,his x0) ∧ 
car—location ∧ 
∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ 
Ewan—actor→forget) ↓ 
Ewan—patient(actor↗ e, x3) ∧ in(↖theme—e, x2) 
mozzarella 
10 September 2014 7
S-CASE Project 
CASE: Computer Assisted Software Engineering 
 Plethora of software solutions already available 
 Could be (re)used for rapid prototyping 
The role of UEDIN in this project: 
 Analyse textual requirements of existing 
solutions that describe their functionalities 
 Provide a search interface for finding solutions 
10 September 2014 8
Functional Requirements 
Properties 
 Discussed by developers and customers 
 Basis for work plans, implementations, etc. 
Examples 
“The user must be able to login to his account.” 
“The system should store all activities.” 
… 
10 September 2014 9
Pre-processing 
Before mapping text to meaning representations: 
 Tokenization 
 Part-of-speech tagging and lemmatization 
 Syntactic dependency parsing 
“The user must be able to login to his account.” 
The user must be able to login to his account . 
the 
user 
must 
be 
able 
to 
login 
to 
his 
account 
. 
DT 
NN 
MD 
VB 
JJ 
TO 
VB 
TO 
PRP 
NN 
. 
10 September 2014 10
Semantic Analysis 
Several steps of analysis are required 
 Find “predicates” in a sentence 
 Identify potential arguments 
 Classify arguments of each predicate 
“The user must be able to login to his account.” 
The user must be able to login to his account . 
the 
user 
must 
be 
able 
to 
login 
to 
his 
account 
. 
DT 
NN 
MD 
VB 
JJ 
TO 
VB 
TO 
PRP 
NN 
. 
10 September 2014 11
Semantic Analysis—Detailed View 
Several steps of analysis are required 
 Find “predicates” in a sentence 
 Identify potential arguments 
 Classify arguments of each predicate 
“The user must be able to login to his account.” 
 Assigned part-of-speech 
 Number of children 
 Parent word form 
The user must be able to login to his account . 
the 
user 
must 
be 
able 
to 
login 
to 
his 
account 
. 
DT 
NN 
MD 
VB 
JJ 
TO 
VB 
TO 
PRP 
NN 
. 
10 September 2014 12
Semantic Analysis—Detailed View 
Several steps of analysis are required 
 Find “predicates” in a sentence 
 Identify potential arguments 
 Classify arguments of each predicate 
“The user must be able to login to his account.” 
 Assigned part-of-speech 
 Labelled path to predicate 
 (Other) children of pred 
The user must be able to login to his account . 
the 
user 
must 
be 
able 
to 
login 
to 
his 
account 
. 
DT 
NN 
MD 
VB 
JJ 
TO 
VB 
TO 
PRP 
NN 
. 
10 September 2014 13
Semantic Analysis—Detailed View 
Several steps of analysis are required 
 Find “predicates” in a sentence 
 Identify potential arguments 
 Classify arguments of each predicate 
“The user must be able to login to his account.” 
 Head word of argument 
 Relative position 
 Labelled dependency 
The user must be able to login to his account . 
the 
user 
must 
be 
able 
to 
login 
to 
his 
account 
. 
DT 
NN 
MD 
VB 
JJ 
TO 
VB 
TO 
PRP 
NN 
. 
10 September 2014 14
What about Linked Data? 
Once we identified all predicates and arguments 
 We can map them into a structured format 
 Link with other information and share online 
 Store in a database for downstream applications 
“The user must be able to login to his account.” 
The user must be able to login to his account . 
the 
user 
must 
be 
able 
to 
login 
to 
his 
account 
. 
DT 
NN 
MD 
VB 
JJ 
TO 
VB 
TO 
PRP 
NN 
. 
10 September 2014 15
The user must be able to login to his account . 
the 
:x0 user 
a :must 
user; be 
able 
:e0 to 
login 
a :to 
login; 
his 
account 
. 
DT 
:actor_NN 
of :e0. MD 
VB 
JJ 
TO 
:has_actor VB 
:TO 
x0; 
PRP 
NN 
. 
RDF Representation 
Storing SRL predicates and arguments 
 Define one entity per relevant word token 
(predicates and arguments can coincide) 
 Use RDF triples to describe relations 
“The user must be able to login to his account.” 
user login 
:acts_on :x1. 
10 September 2014 16
The user must be able to login to his account . 
the 
:x0 user 
a :must 
user; be 
able 
:e0 to 
login 
a :to 
login; 
his 
account 
. 
DT 
:actor_NN 
of :e0. MD 
VB 
JJ 
TO 
:has_actor VB 
:TO 
x0; 
PRP 
NN 
. 
RDF Representation (cont.) 
The bigger scheme: what are users, logins, etc.? 
 Ontology defines classes, relations, restrictions 
 user is-a actor is-a thingtype is-a concept 
 ACTOR_OF(x, y) ↔ HAS_ACTOR(y, x) 
“The user must be able to login to his account.” 
_:user _:login 
:acts_on :x1. 
10 September 2014 17
Advantages for Applications 
 Ontology defines concept types and relations 
 Finite set of pre-defined symbols 
 user is-a actor is-a thingtype is-a concept 
 subclasses can be exploited for search 
 ACTOR_OF(x, y) ↔ HAS_ACTOR(y, x) 
 Axioms for detecting inconsistencies 
and inferring missing relations 
10 September 2014 18
Putting the Pieces Together 
OWL 
Ontology 
Applications 
Applications 
Requirements 
Document 
Implemented 
Software 
Component 
RDF 
Triples 
DB 
10 September 2014 19
Conclusions 
 Semantic parsing is an important prerequisite for 
computational natural language understanding 
 Results of shallow semantic analysis can be 
represented in a structured format for 
downstream applications 
 Linked data helps us to connect and share 
information on existing software solutions and 
makes efficient search possible 
10 September 2014 20
21 
Thank you! 
10 September 2014
22 
Questions? 
10 September 2014

More Related Content

Viewers also liked

Viewers also liked (20)

Programa Mais Educação _ Relatório das Atividades _ 2º bimestre
Programa Mais Educação _ Relatório das Atividades _  2º bimestrePrograma Mais Educação _ Relatório das Atividades _  2º bimestre
Programa Mais Educação _ Relatório das Atividades _ 2º bimestre
 
Transformer
TransformerTransformer
Transformer
 
Projeto Rádio Escolar
Projeto Rádio EscolarProjeto Rádio Escolar
Projeto Rádio Escolar
 
Seven types of ambiguity
Seven types of ambiguity Seven types of ambiguity
Seven types of ambiguity
 
Características do rádio
Características do rádioCaracterísticas do rádio
Características do rádio
 
Supermarket
SupermarketSupermarket
Supermarket
 
A história do rádio
A história do rádioA história do rádio
A história do rádio
 
Radio e audio__revisao
Radio e audio__revisaoRadio e audio__revisao
Radio e audio__revisao
 
Mídia IELUSC - Meio Rádio
Mídia IELUSC - Meio RádioMídia IELUSC - Meio Rádio
Mídia IELUSC - Meio Rádio
 
Apresentacao Radio Ondas
Apresentacao Radio OndasApresentacao Radio Ondas
Apresentacao Radio Ondas
 
Aula rádio
Aula rádioAula rádio
Aula rádio
 
Cieja roteiro para radio
Cieja roteiro para radioCieja roteiro para radio
Cieja roteiro para radio
 
Rádio
RádioRádio
Rádio
 
mídias digitais
mídias digitaismídias digitais
mídias digitais
 
Supermarkets
SupermarketsSupermarkets
Supermarkets
 
Bab 7
Bab 7Bab 7
Bab 7
 
Script tv modelo_agenciade_noticias
Script tv modelo_agenciade_noticiasScript tv modelo_agenciade_noticias
Script tv modelo_agenciade_noticias
 
A radio
A radioA radio
A radio
 
Atividades - Oficina Rádio Escola
Atividades - Oficina Rádio EscolaAtividades - Oficina Rádio Escola
Atividades - Oficina Rádio Escola
 
Roteiro Para Radialistas
Roteiro Para RadialistasRoteiro Para Radialistas
Roteiro Para Radialistas
 

Similar to Semantic Parsing and Representation for Software Requirements

CrossLanguageSpotter: A Library for Detecting Relations in Polyglot Frameworks
CrossLanguageSpotter: A Library for Detecting Relations in Polyglot FrameworksCrossLanguageSpotter: A Library for Detecting Relations in Polyglot Frameworks
CrossLanguageSpotter: A Library for Detecting Relations in Polyglot FrameworksGiuseppe Rizzo
 
Chat Bots with Amazon Lex - AWS Summit SG 2017
Chat Bots with Amazon Lex  - AWS Summit SG 2017Chat Bots with Amazon Lex  - AWS Summit SG 2017
Chat Bots with Amazon Lex - AWS Summit SG 2017Amazon Web Services
 
Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...Vanessa Hurst
 
Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...CodeMontage
 

Similar to Semantic Parsing and Representation for Software Requirements (6)

CrossLanguageSpotter: A Library for Detecting Relations in Polyglot Frameworks
CrossLanguageSpotter: A Library for Detecting Relations in Polyglot FrameworksCrossLanguageSpotter: A Library for Detecting Relations in Polyglot Frameworks
CrossLanguageSpotter: A Library for Detecting Relations in Polyglot Frameworks
 
Query Understanding
Query UnderstandingQuery Understanding
Query Understanding
 
Owlizr
OwlizrOwlizr
Owlizr
 
Chat Bots with Amazon Lex - AWS Summit SG 2017
Chat Bots with Amazon Lex  - AWS Summit SG 2017Chat Bots with Amazon Lex  - AWS Summit SG 2017
Chat Bots with Amazon Lex - AWS Summit SG 2017
 
Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...
 
Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...Coulda Been a Contributor: Making a difference with Open Source Software - OS...
Coulda Been a Contributor: Making a difference with Open Source Software - OS...
 

Recently uploaded

Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubaikojalkojal131
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests GlycosidesGLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests GlycosidesNandakishor Bhaurao Deshmukh
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...D. B. S. College Kanpur
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPirithiRaju
 
trihybrid cross , test cross chi squares
trihybrid cross , test cross chi squarestrihybrid cross , test cross chi squares
trihybrid cross , test cross chi squaresusmanzain586
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxJorenAcuavera1
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationColumbia Weather Systems
 
Servosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicServosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicAditi Jain
 
Citronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayCitronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayupadhyaymani499
 
Ai in communication electronicss[1].pptx
Ai in communication electronicss[1].pptxAi in communication electronicss[1].pptx
Ai in communication electronicss[1].pptxsubscribeus100
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...Universidade Federal de Sergipe - UFS
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsSérgio Sacani
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxpriyankatabhane
 
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdfPests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdfPirithiRaju
 
bonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girlsbonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girlshansessene
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
Organic farming with special reference to vermiculture
Organic farming with special reference to vermicultureOrganic farming with special reference to vermiculture
Organic farming with special reference to vermicultureTakeleZike1
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationColumbia Weather Systems
 

Recently uploaded (20)

Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests GlycosidesGLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
 
trihybrid cross , test cross chi squares
trihybrid cross , test cross chi squarestrihybrid cross , test cross chi squares
trihybrid cross , test cross chi squares
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptx
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdf
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
Servosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by PetrovicServosystem Theory / Cybernetic Theory by Petrovic
Servosystem Theory / Cybernetic Theory by Petrovic
 
Citronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayCitronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyay
 
Ai in communication electronicss[1].pptx
Ai in communication electronicss[1].pptxAi in communication electronicss[1].pptx
Ai in communication electronicss[1].pptx
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive stars
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptx
 
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdfPests of Blackgram, greengram, cowpea_Dr.UPR.pdf
Pests of Blackgram, greengram, cowpea_Dr.UPR.pdf
 
bonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girlsbonjourmadame.tumblr.com bhaskar's girls
bonjourmadame.tumblr.com bhaskar's girls
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
Organic farming with special reference to vermiculture
Organic farming with special reference to vermicultureOrganic farming with special reference to vermiculture
Organic farming with special reference to vermiculture
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather Station
 

Semantic Parsing and Representation for Software Requirements

  • 1.
  • 2. Semantic Parsing Definition: process of mapping natural language text into a formal representation of its meaning. Ewan forgot the mozzarella in his car. ∃x0 named(x0, ewan, person) ∧ ∃x1 mozzarella(x1) ∧ ∃x2 car(x2) ∧ of(x2,x0) ∧ in(x1, x2) ∧ ∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ patient(e, x1) 10 September 2014 2
  • 3. Semantic Parsing Definition: process of mapping natural language text into a formal representation of its meaning. Ewan forgot the mozzarella in his car. ∃x0 named(x0, ewan, person) ∧ ∃x1 mozzarella(x1) ∧ ∃x2 car(x2) ∧ of(x2,x0) ∧ in(x1, x2) ∧ ∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ patient(e, x1) 10 September 2014 3
  • 4. Semantic Role Labelling Mapping to a shallow semantic representation of predicates and associated semantic arguments Ewan forgot the mozzarella in his car. ∃x0 named(x0, ewan, person) ∧ ∃x1 mozzarella(x1) ∧ ∃x2 car(x2) ∧ of(x2,x0) ∧ in(x1, x2) ∧ ∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ patient(e, x1) 10 September 2014 4
  • 5. Semantic Role Labelling Mapping to a shallow semantic representation of predicates and associated semantic arguments Ewan forgot the mozzarella in his car. ∃x0 named(x0, ewan, per) ∧ male(x0) ∧ ∃x1 mozzarella(x1) ∧ ∃x2 car(car←———x2) ∧ of(his x2,x0) ∧ ∧ ∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ Ewan—actor→forget) Ewan———↗ patient(e, x3) ∧ ↖ in(———e, x2) mozzarella 10 September 2014 5
  • 6. Semantic Role Labelling Mapping to a shallow semantic representation of predicates and associated semantic arguments Ewan forgot the mozzarella in his car. ∃x0 named(x0, ewan, per) ∧ male(x0) ∧ ∃x1 mozzarella(x1) ∧ ∃x2 car←car(x2) owner—∧ of(x2,his x0) ∧ car—location ∧ ∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ Ewan—actor→forget) ↓ Ewan—patient(actor↗ e, x3) ∧ in(↖theme—e, x2) mozzarella 10 September 2014 6
  • 7. Semantic Role Labelling Motivation: identify who did what to whom, where, why and how, etc. Ewan forgot the mozzarella in his car. ∃x0 named(x0, ewan, per) ∧ male(x0) ∧ ∃x1 mozzarella(x1) ∧ ∃x2 car(car←x2) owner—∧ of(x2,his x0) ∧ car—location ∧ ∃e event(e) ∧ forget(e) ∧ agent(e, x0) ∧ Ewan—actor→forget) ↓ Ewan—patient(actor↗ e, x3) ∧ in(↖theme—e, x2) mozzarella 10 September 2014 7
  • 8. S-CASE Project CASE: Computer Assisted Software Engineering  Plethora of software solutions already available  Could be (re)used for rapid prototyping The role of UEDIN in this project:  Analyse textual requirements of existing solutions that describe their functionalities  Provide a search interface for finding solutions 10 September 2014 8
  • 9. Functional Requirements Properties  Discussed by developers and customers  Basis for work plans, implementations, etc. Examples “The user must be able to login to his account.” “The system should store all activities.” … 10 September 2014 9
  • 10. Pre-processing Before mapping text to meaning representations:  Tokenization  Part-of-speech tagging and lemmatization  Syntactic dependency parsing “The user must be able to login to his account.” The user must be able to login to his account . the user must be able to login to his account . DT NN MD VB JJ TO VB TO PRP NN . 10 September 2014 10
  • 11. Semantic Analysis Several steps of analysis are required  Find “predicates” in a sentence  Identify potential arguments  Classify arguments of each predicate “The user must be able to login to his account.” The user must be able to login to his account . the user must be able to login to his account . DT NN MD VB JJ TO VB TO PRP NN . 10 September 2014 11
  • 12. Semantic Analysis—Detailed View Several steps of analysis are required  Find “predicates” in a sentence  Identify potential arguments  Classify arguments of each predicate “The user must be able to login to his account.”  Assigned part-of-speech  Number of children  Parent word form The user must be able to login to his account . the user must be able to login to his account . DT NN MD VB JJ TO VB TO PRP NN . 10 September 2014 12
  • 13. Semantic Analysis—Detailed View Several steps of analysis are required  Find “predicates” in a sentence  Identify potential arguments  Classify arguments of each predicate “The user must be able to login to his account.”  Assigned part-of-speech  Labelled path to predicate  (Other) children of pred The user must be able to login to his account . the user must be able to login to his account . DT NN MD VB JJ TO VB TO PRP NN . 10 September 2014 13
  • 14. Semantic Analysis—Detailed View Several steps of analysis are required  Find “predicates” in a sentence  Identify potential arguments  Classify arguments of each predicate “The user must be able to login to his account.”  Head word of argument  Relative position  Labelled dependency The user must be able to login to his account . the user must be able to login to his account . DT NN MD VB JJ TO VB TO PRP NN . 10 September 2014 14
  • 15. What about Linked Data? Once we identified all predicates and arguments  We can map them into a structured format  Link with other information and share online  Store in a database for downstream applications “The user must be able to login to his account.” The user must be able to login to his account . the user must be able to login to his account . DT NN MD VB JJ TO VB TO PRP NN . 10 September 2014 15
  • 16. The user must be able to login to his account . the :x0 user a :must user; be able :e0 to login a :to login; his account . DT :actor_NN of :e0. MD VB JJ TO :has_actor VB :TO x0; PRP NN . RDF Representation Storing SRL predicates and arguments  Define one entity per relevant word token (predicates and arguments can coincide)  Use RDF triples to describe relations “The user must be able to login to his account.” user login :acts_on :x1. 10 September 2014 16
  • 17. The user must be able to login to his account . the :x0 user a :must user; be able :e0 to login a :to login; his account . DT :actor_NN of :e0. MD VB JJ TO :has_actor VB :TO x0; PRP NN . RDF Representation (cont.) The bigger scheme: what are users, logins, etc.?  Ontology defines classes, relations, restrictions  user is-a actor is-a thingtype is-a concept  ACTOR_OF(x, y) ↔ HAS_ACTOR(y, x) “The user must be able to login to his account.” _:user _:login :acts_on :x1. 10 September 2014 17
  • 18. Advantages for Applications  Ontology defines concept types and relations  Finite set of pre-defined symbols  user is-a actor is-a thingtype is-a concept  subclasses can be exploited for search  ACTOR_OF(x, y) ↔ HAS_ACTOR(y, x)  Axioms for detecting inconsistencies and inferring missing relations 10 September 2014 18
  • 19. Putting the Pieces Together OWL Ontology Applications Applications Requirements Document Implemented Software Component RDF Triples DB 10 September 2014 19
  • 20. Conclusions  Semantic parsing is an important prerequisite for computational natural language understanding  Results of shallow semantic analysis can be represented in a structured format for downstream applications  Linked data helps us to connect and share information on existing software solutions and makes efficient search possible 10 September 2014 20
  • 21. 21 Thank you! 10 September 2014
  • 22. 22 Questions? 10 September 2014

Editor's Notes

  1. Hello and thank you all for coming. My name is Michael Roth and for the next 20 minutes, or so, I will be talking about Semantic Parsing to Linked Data. The talk is mostly about parsing but I will get back to how that relates to linked data towards the end.
  2. So the first question that some of you might ask themselves now is: what is “semantic parsing”? Well, let’s start with a definition. “Semantic Parsing is … into … “. Since this is a very general definition, let’s have a look at a very specific example.
  3. It can be quite challenging to deduce a full logical representation from a sentence. For example, when looking at the text, we do not see any of the existential quantifiers from the logical representation and it’s not always clear why they should be used over universal quantifiers. On the representation side, we can see a very mixed granularity of logical predicates: they can denote specific types of entities such as mozzarella but also very general relations such as “in” or “of”.
  4. A more general variant invented by computational linguistics is a task called semantic role labelling. The idea of this task is still to perform some form of semantic parsing but instead of mapping to logical representations, we here focus on the identification of predicate-argument structures that can be observed as linguistic units.
  5. This means that a predicate, rather than being an abstract concept, is simply a word with a specific sense that can be observed in text. Typically, a predicate identified text has one or more arguments. For example, “car” and “forget” are predicates and their semantic arguments are those words or spans of words that further specify them in text. Computational linguistics came up with a somewhat here associate each of them with a specific thematic relation. For example, …
  6. To go one step further than this, approaches to semantic role labelling make use of a predefined set of roles that specify how an argument is related to the predicate.
  7. And the motivation for this is… So in addition to representing the general structure of a sentence, we can now make some inferences about the actual meaning of a sentence.