SlideShare a Scribd company logo
1 of 21
Download to read offline
How to turn Wikipedia into a Quiz Game
7th April 2017
Roberto Turrin Andrea Cappelli
PyCon O:o - Florence, Italy
About Us
Roberto Turrin Andrea Cappelli
Head of Technology, PhD Data ScienGst, PhD
@robytur @Skep86
Amazon Echo
Agenda
Wikipedia and wikidata as knowledge sources
NLP with Google Natural Language
Using enCCes and dependencies to generate quesCons
IoT integraCon with Alexa
Wikipedia and Wikidata as knowledge sources
Wikipedia and Wikidata
Wikidata stores structured informaCon
about several Wikipedia enCCes.
Wikidata is a document-oriented
database.
Wikidata can be queried
InformaCon is represented by
statements, i.e., key-value pairs.
PetScan
SPARQL
AutoList
Querying Wikidata with SPARQL
resource
resource
resource/literal
subject
predicate
object
<urn:x-states:New%20York>
<h.p://purl.org/dc/terms/alterna6ve>
"NY"
“New York has the postal abbrevia6on NY”
Downloading knowledge
Querying
Wikidata to
retrieve
Wikipedia
links of
interest
SPARQL
Downloading
Wikipedia
pages as XML
REST h+p call
Parsing
Wikipedia
dump
WikiExtractor
Reference
knowledge
NLP with Google Natural Language
Natural Language Processing
Syntax analysis
SemanCcs analysis
EnCty recogniCon
SenCment analysis
Main NLP tasks:
Google Natural Language - overview
Homer Simpson stole Ned’s air conditioner.
https://cloud.google.com/natural-language/
Using enCCes and dependencies 

to generate quesCons
From statement to quesGon
Homer
Simpson
stole
Ned
‘s
air
conditioner .
nsubj
dobj
steal
• Rephrase the sentence as a
question
Homer Simpson stole Ned’s air conditioner.
https://en.wikipedia.org/wiki/Homer_Simpson https://en.wikipedia.org/wiki/Ned_Flanders
• Identify a relevant phrase and remove it
__________ stole Ned’s air conditioner.
Q: What did Homer Simpson steal?

A: Ned’s air conditioner.
What about wrong answers?
appears in
The Simpsons (Q886)
Good “wrong answers”
(distractors) for quizzes
…
appears in
appears in appears in appears in
Q646166
Q727156 Q324430
Homer Simpson stole Ned’s air conditioner.
Q7810
Demo
clda.co/wiki-trivia
IoT integraCon with Alexa
What is Amazon Alexa (Echo Dot)?
Based on Amazon Alexa Voice service
Enabling HCI via voice
Quick build with AWS Lambda or
poinCng to web API
Intent-based with slot-filling
Retains memory within each
session
“Has Skills”
Deploying Alexa Skills
Create new skill (name and invocaCon)
Define intents, slots and
uberances
Link to Lambda or web API
Test
Conclusions
Overview
Download
knowledge
from
Wikipedia and
Wikidata
Extract
enCCes and
dependencies
with NLP
Generate
quesCons
from NLP
outcome and
Wikidata
enCCes
Configure
Alexa to serve
quesCons
Future work
Other paberns to generate quesCons
Custom enCty extracCon
IteraCve correcCon of bad quesCons
More complex distractors
Thank you
Q & A
7th April 2017

More Related Content

What's hot

Introduction To Linked Data
Introduction To Linked DataIntroduction To Linked Data
Introduction To Linked Data
Leigh Dodds
 

What's hot (17)

Beyond 2022 project presentation 2021
Beyond 2022 project presentation 2021Beyond 2022 project presentation 2021
Beyond 2022 project presentation 2021
 
Semantic web and Drupal: an introduction
Semantic web and Drupal: an introductionSemantic web and Drupal: an introduction
Semantic web and Drupal: an introduction
 
Benchmarking RDF Metadata Representations: Reification, Singleton Property an...
Benchmarking RDF Metadata Representations: Reification, Singleton Property an...Benchmarking RDF Metadata Representations: Reification, Singleton Property an...
Benchmarking RDF Metadata Representations: Reification, Singleton Property an...
 
The agINFRA Linked Data layer by Valeria Pesce, Giovanni l'Abate, Luca Mattei...
The agINFRA Linked Data layer by Valeria Pesce, Giovanni l'Abate, Luca Mattei...The agINFRA Linked Data layer by Valeria Pesce, Giovanni l'Abate, Luca Mattei...
The agINFRA Linked Data layer by Valeria Pesce, Giovanni l'Abate, Luca Mattei...
 
Semantic web 101: Benefits for geologists
Semantic web 101: Benefits for geologistsSemantic web 101: Benefits for geologists
Semantic web 101: Benefits for geologists
 
WASAPI Web Archive Data Transfer APIs
WASAPI Web Archive Data Transfer APIsWASAPI Web Archive Data Transfer APIs
WASAPI Web Archive Data Transfer APIs
 
Linked Data track at ApacheCon Europe 2014
Linked Data track at ApacheCon Europe 2014Linked Data track at ApacheCon Europe 2014
Linked Data track at ApacheCon Europe 2014
 
5 Ruby Gems in 10 minutes - Faraday, Hashie, Twitter, Diametric, and Adamantium
5 Ruby Gems in 10 minutes - Faraday, Hashie, Twitter, Diametric, and Adamantium5 Ruby Gems in 10 minutes - Faraday, Hashie, Twitter, Diametric, and Adamantium
5 Ruby Gems in 10 minutes - Faraday, Hashie, Twitter, Diametric, and Adamantium
 
Towards a Unified PageRank for DBpedia and Wikidata
Towards a Unified PageRank for DBpedia and WikidataTowards a Unified PageRank for DBpedia and Wikidata
Towards a Unified PageRank for DBpedia and Wikidata
 
Talis Platform: A Linked Data Engine
Talis Platform: A Linked Data EngineTalis Platform: A Linked Data Engine
Talis Platform: A Linked Data Engine
 
DHWI Linked Open Data - Show and Tell
DHWI Linked Open Data - Show and TellDHWI Linked Open Data - Show and Tell
DHWI Linked Open Data - Show and Tell
 
Introduction To Linked Data
Introduction To Linked DataIntroduction To Linked Data
Introduction To Linked Data
 
RDA data, linked data, and benefits for users / Gordon Dunsire
RDA data, linked data, and benefits for users / Gordon DunsireRDA data, linked data, and benefits for users / Gordon Dunsire
RDA data, linked data, and benefits for users / Gordon Dunsire
 
Introduction to Linked Data
Introduction to Linked DataIntroduction to Linked Data
Introduction to Linked Data
 
Webtracks at JISC Managing Research Data Meeting
Webtracks at JISC Managing Research Data MeetingWebtracks at JISC Managing Research Data Meeting
Webtracks at JISC Managing Research Data Meeting
 
Linked Open Government Data and the Semantic Web
Linked Open Government Data and the Semantic WebLinked Open Government Data and the Semantic Web
Linked Open Government Data and the Semantic Web
 
Web at 25 - Ontos Linked Open Data
Web at 25 - Ontos Linked Open DataWeb at 25 - Ontos Linked Open Data
Web at 25 - Ontos Linked Open Data
 

Similar to How to turn Wikipedia into a Quiz Game

The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology:  A Large-Scale Taxonomy of Research AreasThe Computer Science Ontology:  A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
Angelo Salatino
 
The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology: A Large-Scale Taxonomy of Research AreasThe Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
Angelo Salatino
 
Of Cataloging & Context
Of Cataloging & ContextOf Cataloging & Context
Of Cataloging & Context
charper
 

Similar to How to turn Wikipedia into a Quiz Game (20)

OpenCitations
OpenCitationsOpenCitations
OpenCitations
 
Exploring and using the Semantic Web - SSSW09 tutorial
Exploring and using the Semantic Web - SSSW09 tutorialExploring and using the Semantic Web - SSSW09 tutorial
Exploring and using the Semantic Web - SSSW09 tutorial
 
ESWC 2015 Closing and "General Chair's minute of Madness"
ESWC 2015 Closing and "General Chair's minute of Madness"ESWC 2015 Closing and "General Chair's minute of Madness"
ESWC 2015 Closing and "General Chair's minute of Madness"
 
Lodlam presentation v1.0 final al20151104
Lodlam presentation v1.0 final al20151104Lodlam presentation v1.0 final al20151104
Lodlam presentation v1.0 final al20151104
 
20140521 sem-tech-biz-guest-lecture
20140521 sem-tech-biz-guest-lecture20140521 sem-tech-biz-guest-lecture
20140521 sem-tech-biz-guest-lecture
 
IBC FAIR Data Prototype Implementation slideshow
IBC FAIR Data Prototype Implementation   slideshowIBC FAIR Data Prototype Implementation   slideshow
IBC FAIR Data Prototype Implementation slideshow
 
Lifting the Lid on Linked Data
Lifting the Lid on Linked DataLifting the Lid on Linked Data
Lifting the Lid on Linked Data
 
Doing Clever Things with the Semantic Web
Doing Clever Things with the Semantic WebDoing Clever Things with the Semantic Web
Doing Clever Things with the Semantic Web
 
The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology:  A Large-Scale Taxonomy of Research AreasThe Computer Science Ontology:  A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
 
FAIR Data Prototype - Interoperability and FAIRness through a novel combinati...
FAIR Data Prototype - Interoperability and FAIRness through a novel combinati...FAIR Data Prototype - Interoperability and FAIRness through a novel combinati...
FAIR Data Prototype - Interoperability and FAIRness through a novel combinati...
 
ITWS Capstone (RPI, Fall 2013)
ITWS Capstone (RPI, Fall 2013)ITWS Capstone (RPI, Fall 2013)
ITWS Capstone (RPI, Fall 2013)
 
The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology: A Large-Scale Taxonomy of Research AreasThe Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
The Computer Science Ontology: A Large-Scale Taxonomy of Research Areas
 
SEMANTIC WEB SOURCES – comparison of open-source Knowledge Graphs
SEMANTIC WEB SOURCES – comparison of open-source Knowledge GraphsSEMANTIC WEB SOURCES – comparison of open-source Knowledge Graphs
SEMANTIC WEB SOURCES – comparison of open-source Knowledge Graphs
 
Actions to Ensure the Integrity and Continuity of the Scholarly Record
Actions to Ensure the Integrity and Continuity of the Scholarly Record Actions to Ensure the Integrity and Continuity of the Scholarly Record
Actions to Ensure the Integrity and Continuity of the Scholarly Record
 
Resources, resources, resources: the three rs of the Web
Resources, resources, resources: the three rs of the WebResources, resources, resources: the three rs of the Web
Resources, resources, resources: the three rs of the Web
 
Of Cataloging & Context
Of Cataloging & ContextOf Cataloging & Context
Of Cataloging & Context
 
Web Data Management in RDF Age
Web Data Management in RDF AgeWeb Data Management in RDF Age
Web Data Management in RDF Age
 
The nature.com ontologies portal: nature.com/ontologies
The nature.com ontologies portal: nature.com/ontologiesThe nature.com ontologies portal: nature.com/ontologies
The nature.com ontologies portal: nature.com/ontologies
 
Carpenter "The Future of the Scholarly Record"
Carpenter "The Future of the Scholarly Record"Carpenter "The Future of the Scholarly Record"
Carpenter "The Future of the Scholarly Record"
 
A document-inspired way for tracking changes of RDF data - The case of the Op...
A document-inspired way for tracking changes of RDF data - The case of the Op...A document-inspired way for tracking changes of RDF data - The case of the Op...
A document-inspired way for tracking changes of RDF data - The case of the Op...
 

Recently uploaded

Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 

Recently uploaded (20)

Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 

How to turn Wikipedia into a Quiz Game

  • 1. How to turn Wikipedia into a Quiz Game 7th April 2017 Roberto Turrin Andrea Cappelli PyCon O:o - Florence, Italy
  • 2. About Us Roberto Turrin Andrea Cappelli Head of Technology, PhD Data ScienGst, PhD @robytur @Skep86 Amazon Echo
  • 3. Agenda Wikipedia and wikidata as knowledge sources NLP with Google Natural Language Using enCCes and dependencies to generate quesCons IoT integraCon with Alexa
  • 4. Wikipedia and Wikidata as knowledge sources
  • 5. Wikipedia and Wikidata Wikidata stores structured informaCon about several Wikipedia enCCes. Wikidata is a document-oriented database. Wikidata can be queried InformaCon is represented by statements, i.e., key-value pairs. PetScan SPARQL AutoList
  • 6. Querying Wikidata with SPARQL resource resource resource/literal subject predicate object <urn:x-states:New%20York> <h.p://purl.org/dc/terms/alterna6ve> "NY" “New York has the postal abbrevia6on NY”
  • 7. Downloading knowledge Querying Wikidata to retrieve Wikipedia links of interest SPARQL Downloading Wikipedia pages as XML REST h+p call Parsing Wikipedia dump WikiExtractor Reference knowledge
  • 8. NLP with Google Natural Language
  • 9. Natural Language Processing Syntax analysis SemanCcs analysis EnCty recogniCon SenCment analysis Main NLP tasks:
  • 10. Google Natural Language - overview Homer Simpson stole Ned’s air conditioner. https://cloud.google.com/natural-language/
  • 11. Using enCCes and dependencies 
 to generate quesCons
  • 12. From statement to quesGon Homer Simpson stole Ned ‘s air conditioner . nsubj dobj steal • Rephrase the sentence as a question Homer Simpson stole Ned’s air conditioner. https://en.wikipedia.org/wiki/Homer_Simpson https://en.wikipedia.org/wiki/Ned_Flanders • Identify a relevant phrase and remove it __________ stole Ned’s air conditioner. Q: What did Homer Simpson steal?
 A: Ned’s air conditioner.
  • 13. What about wrong answers? appears in The Simpsons (Q886) Good “wrong answers” (distractors) for quizzes … appears in appears in appears in appears in Q646166 Q727156 Q324430 Homer Simpson stole Ned’s air conditioner. Q7810
  • 16. What is Amazon Alexa (Echo Dot)? Based on Amazon Alexa Voice service Enabling HCI via voice Quick build with AWS Lambda or poinCng to web API Intent-based with slot-filling Retains memory within each session “Has Skills”
  • 17. Deploying Alexa Skills Create new skill (name and invocaCon) Define intents, slots and uberances Link to Lambda or web API Test
  • 19. Overview Download knowledge from Wikipedia and Wikidata Extract enCCes and dependencies with NLP Generate quesCons from NLP outcome and Wikidata enCCes Configure Alexa to serve quesCons
  • 20. Future work Other paberns to generate quesCons Custom enCty extracCon IteraCve correcCon of bad quesCons More complex distractors
  • 21. Thank you Q & A 7th April 2017