SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
TRANSLATING
NATURAL LANGUAGE INTO SPARQL
FOR NEURAL QUESTION ANSWERING
Tommaso Soru
AKSW, University of Leipzig, Germany
6. Leipziger Semantic WebTag (LSWT2018) – 18.06.2018
LINKED OPEN DATA
👍 >10K published datasets
👍 ~150B triples as (s, p, o)
👎 Low accessibility
lod-cloud.net
2
SPARQL QUERY LANGUAGE
3
SELECT ?x WHERE {
?x a ontology:Person .
?x ontology:birthPlace dbpedia:Leipzig .
}
dbpedia:Walter_Ulbricht
dbpedia:Anita_Berber
dbpedia:Martin_Benno_Schmidt
…
NATURAL LANGUAGETO SPARQL
4
SELECT ?x WHERE {
?x a ontology:Person .
?x ontology:birthPlace dbpedia:Leipzig .
}
people born in Leipzig
who was born in Leipzig?
Leipzig is the birth place of whom?
MODELING NATURAL LANGUAGE
• Model semantics at word and phrase level.
• Be robust to small imperfections (e.g., a missing article).
• Handle question compositionality.
• Work with all human languages.
5
Language Model using Recurrent Neural Networks!
MACHINETRANSLATION
6
# Personen, die in Leipzig geboren sind
$ people born in Leipzig
MACHINETRANSLATION
7
$ people born in Leipzig
🤖 select var_x where brack_open var_x rdf_type
dbo_Person sep_dot var_x dbo_birthPlace dbr Leipzig
sep_dot brack_close
NEURAL SPARQL MACHINES
8
THE GENERATOR
9
Build question-query pairs from a set of manually-annotated templates.
where was <A> born?
select var_x where brack_open <A> dbo_birthPlace
var_x sep_dot brack_close
CHALLENGE #1: TEMPLATE DISCOVERY
10
where was <A> born?
select var_x where brack_open <A> dbo_birthPlace
var_x sep_dot brack_close
[…] Joe Abercrombie (born 1974) – fantasy writer and film
editor, was born in Lancaster and attended LRGS […]
Idea! Mine templates from a large text corpus using entity pairs. dbpedia:Joe_Abercrombie
dbpedia:Lancaster
ontology:birthPlace
THE LEARNER
11
Seq2Seq: (Bidirectional) Recurrent Neural Network + LSTM model
CHALLENGE #2:WORD EXPANSION
12
How to deal with synonyms and out-of-vocabulary words?
Credits: github.com/ahaas/synonymvis
Distributional Semantics
Similar words are represented by
similar vectors (or word embeddings).
Language model handles word
disambiguation using context.
THE INTERPRETER
13
Sequence interpretation for SPARQL query reconstruction.
select var_x where brack_open var_x rdf_type
dbo_Person sep_dot var_x dbo_birthPlace dbr_Leipzig
Missing brack_close
SELECT ?x WHERE {
?x a ontology:Person .
?x ontology:birthPlace dbpedia:Leipzig
}
CHALLENGE #3: COMPOSITIONALITY
14
?x a ontology:Person .
?x dbo:birthPlace dbr:Dresden .
people born in Dresden
dbr:Saxony dbo:capital ?x .
what’s the capital of Saxony?
?x a ontology:Person .
?x dbo:birthPlace ?y .
dbr:Saxony dbo:capital ?y .
people born in the capital of Saxony
Learn the correct variable assignments in the reconstructed query.
+
=
Curriculum Learning
Learn to translate at baby steps.
CURRENT STATE
15
• Non-funded work
• Involving people from these institutes:
• AKSW, University of Leipzig
• HTWK / Leipzig University of Applied Sciences
• Paderborn University
• Bonn University
• DBpedia’s Google Summer of Code 2018
• Looking for partnerships!
Tommaso Soru
AKSW Research Group
University of Leipzig
Germany
tsoru@informatik.uni-leipzig.de
http://tommaso-soru.it
🤖 https://github.com/AKSW/NSpM
Thank you.
16

Weitere ähnliche Inhalte

Ähnlich wie Translating Natural Language into SPARQL for Neural Question Answering

Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...
Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...
Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...
NASIG
 

Ähnlich wie Translating Natural Language into SPARQL for Neural Question Answering (20)

Fasttext 20170720 yjy
Fasttext 20170720 yjyFasttext 20170720 yjy
Fasttext 20170720 yjy
 
Challenges in transfer learning in nlp
Challenges in transfer learning in nlpChallenges in transfer learning in nlp
Challenges in transfer learning in nlp
 
4V - WP3 Progress Report (TIN2013-46238)
4V - WP3 Progress Report (TIN2013-46238)4V - WP3 Progress Report (TIN2013-46238)
4V - WP3 Progress Report (TIN2013-46238)
 
What you Can Make Out of Linked Data
What you Can Make Out of Linked DataWhat you Can Make Out of Linked Data
What you Can Make Out of Linked Data
 
Ontologies in RDF-S/OWL
Ontologies in RDF-S/OWLOntologies in RDF-S/OWL
Ontologies in RDF-S/OWL
 
Different Semantic Perspectives for Question Answering Systems
Different Semantic Perspectives for Question Answering SystemsDifferent Semantic Perspectives for Question Answering Systems
Different Semantic Perspectives for Question Answering Systems
 
Deep Generative Models
Deep Generative Models Deep Generative Models
Deep Generative Models
 
Federated data stores using semantic web technology
Federated data stores using semantic web technologyFederated data stores using semantic web technology
Federated data stores using semantic web technology
 
semantic web & natural language
semantic web & natural languagesemantic web & natural language
semantic web & natural language
 
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language UnderstandingBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
 
Linked (Open) Data
Linked (Open) DataLinked (Open) Data
Linked (Open) Data
 
Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...
Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...
Bringing It All Together: Mapping Continuing Resources Vocabularies for Linke...
 
The Role of CNL and AMR in Scalable Abstractive Summarization for Multilingua...
The Role of CNL and AMR in Scalable Abstractive Summarization for Multilingua...The Role of CNL and AMR in Scalable Abstractive Summarization for Multilingua...
The Role of CNL and AMR in Scalable Abstractive Summarization for Multilingua...
 
SSSW 2015 Sense Making
SSSW 2015 Sense MakingSSSW 2015 Sense Making
SSSW 2015 Sense Making
 
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
 
Can Deep Learning Techniques Improve Entity Linking?
Can Deep Learning Techniques Improve Entity Linking?Can Deep Learning Techniques Improve Entity Linking?
Can Deep Learning Techniques Improve Entity Linking?
 
Semantics reloaded
Semantics reloadedSemantics reloaded
Semantics reloaded
 
Preposition Semantics: Challenges in Comprehensive Corpus Annotation and Auto...
Preposition Semantics: Challenges in Comprehensive Corpus Annotation and Auto...Preposition Semantics: Challenges in Comprehensive Corpus Annotation and Auto...
Preposition Semantics: Challenges in Comprehensive Corpus Annotation and Auto...
 
The Ins and Outs of Preposition Semantics:
 Challenges in Comprehensive Corpu...
The Ins and Outs of Preposition Semantics:
 Challenges in Comprehensive Corpu...The Ins and Outs of Preposition Semantics:
 Challenges in Comprehensive Corpu...
The Ins and Outs of Preposition Semantics:
 Challenges in Comprehensive Corpu...
 
Deduktive Datenbanken & Logische Programme: Eine kleine Zeitreise
Deduktive Datenbanken & Logische Programme: Eine kleine ZeitreiseDeduktive Datenbanken & Logische Programme: Eine kleine Zeitreise
Deduktive Datenbanken & Logische Programme: Eine kleine Zeitreise
 

Kürzlich hochgeladen

Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
Areesha Ahmad
 

Kürzlich hochgeladen (20)

❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
 
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai YoungDubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
chemical bonding Essentials of Physical Chemistry2.pdf
chemical bonding Essentials of Physical Chemistry2.pdfchemical bonding Essentials of Physical Chemistry2.pdf
chemical bonding Essentials of Physical Chemistry2.pdf
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verifiedConnaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx
 
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 

Translating Natural Language into SPARQL for Neural Question Answering

  • 1. TRANSLATING NATURAL LANGUAGE INTO SPARQL FOR NEURAL QUESTION ANSWERING Tommaso Soru AKSW, University of Leipzig, Germany 6. Leipziger Semantic WebTag (LSWT2018) – 18.06.2018
  • 2. LINKED OPEN DATA 👍 >10K published datasets 👍 ~150B triples as (s, p, o) 👎 Low accessibility lod-cloud.net 2
  • 3. SPARQL QUERY LANGUAGE 3 SELECT ?x WHERE { ?x a ontology:Person . ?x ontology:birthPlace dbpedia:Leipzig . } dbpedia:Walter_Ulbricht dbpedia:Anita_Berber dbpedia:Martin_Benno_Schmidt …
  • 4. NATURAL LANGUAGETO SPARQL 4 SELECT ?x WHERE { ?x a ontology:Person . ?x ontology:birthPlace dbpedia:Leipzig . } people born in Leipzig who was born in Leipzig? Leipzig is the birth place of whom?
  • 5. MODELING NATURAL LANGUAGE • Model semantics at word and phrase level. • Be robust to small imperfections (e.g., a missing article). • Handle question compositionality. • Work with all human languages. 5 Language Model using Recurrent Neural Networks!
  • 6. MACHINETRANSLATION 6 # Personen, die in Leipzig geboren sind $ people born in Leipzig
  • 7. MACHINETRANSLATION 7 $ people born in Leipzig 🤖 select var_x where brack_open var_x rdf_type dbo_Person sep_dot var_x dbo_birthPlace dbr Leipzig sep_dot brack_close
  • 9. THE GENERATOR 9 Build question-query pairs from a set of manually-annotated templates. where was <A> born? select var_x where brack_open <A> dbo_birthPlace var_x sep_dot brack_close
  • 10. CHALLENGE #1: TEMPLATE DISCOVERY 10 where was <A> born? select var_x where brack_open <A> dbo_birthPlace var_x sep_dot brack_close […] Joe Abercrombie (born 1974) – fantasy writer and film editor, was born in Lancaster and attended LRGS […] Idea! Mine templates from a large text corpus using entity pairs. dbpedia:Joe_Abercrombie dbpedia:Lancaster ontology:birthPlace
  • 11. THE LEARNER 11 Seq2Seq: (Bidirectional) Recurrent Neural Network + LSTM model
  • 12. CHALLENGE #2:WORD EXPANSION 12 How to deal with synonyms and out-of-vocabulary words? Credits: github.com/ahaas/synonymvis Distributional Semantics Similar words are represented by similar vectors (or word embeddings). Language model handles word disambiguation using context.
  • 13. THE INTERPRETER 13 Sequence interpretation for SPARQL query reconstruction. select var_x where brack_open var_x rdf_type dbo_Person sep_dot var_x dbo_birthPlace dbr_Leipzig Missing brack_close SELECT ?x WHERE { ?x a ontology:Person . ?x ontology:birthPlace dbpedia:Leipzig }
  • 14. CHALLENGE #3: COMPOSITIONALITY 14 ?x a ontology:Person . ?x dbo:birthPlace dbr:Dresden . people born in Dresden dbr:Saxony dbo:capital ?x . what’s the capital of Saxony? ?x a ontology:Person . ?x dbo:birthPlace ?y . dbr:Saxony dbo:capital ?y . people born in the capital of Saxony Learn the correct variable assignments in the reconstructed query. + = Curriculum Learning Learn to translate at baby steps.
  • 15. CURRENT STATE 15 • Non-funded work • Involving people from these institutes: • AKSW, University of Leipzig • HTWK / Leipzig University of Applied Sciences • Paderborn University • Bonn University • DBpedia’s Google Summer of Code 2018 • Looking for partnerships!
  • 16. Tommaso Soru AKSW Research Group University of Leipzig Germany tsoru@informatik.uni-leipzig.de http://tommaso-soru.it 🤖 https://github.com/AKSW/NSpM Thank you. 16