SlideShare une entreprise Scribd logo
1  sur  56
Dependency Parsing-based QA System
      using RDF and SPARQL

             Fariz Darari
         fadirra@gmail.com
Motivation




             2
Motivation




             3
Motivation




             4
BACKGROUND


             5
QA in General
• Finding an answer to natural language
  questions based on documents/facts
• Instead of documents, give answers
• Factoid questions:
  – Who can dance Tango?
  – What did I eat this morning?
  – When Mahatma Gandhi was born?


                                          6
Dependency Parsing




                     7
RDF & SPARQL
• RDF Data:
  :book1 :title "SPARQL Tutorial" .

• SPARQL Query:
  SELECT ?title
  WHERE { :book1 :title ?title . }



                                      8
WordNet
• Large lexical database of English words
• Words are grouped into synsets
• Relations among synsets: Synonymy,
  antonymy, hyponymy, meronymy, troponymy




                                            9
DBpedia
• Knowledge base of Wikipedia in RDF
• Data at dbpedia.org/resource/Italy:




                                        10
DEVELOPMENT


              11
NL Text   Dependency
(Facts)     Parser



           RDFizer



             RDF        SPARQL



            OWL        SPARQLizer
           Ontology


                       Dependency     NL Text
                         Parser     (Questions)
Facts Population
1. We parse the natural language facts using the
   Stanford dependency parser. The result will be
   typed dependencies.
2. The typed dependencies are then translated into
   RDF format using RDFizer. The RDFizer is built
   using Java with Apache Jena as the Semantic
   Web library.
3. The resulting RDF will be consulted with an OWL
   ontology that contains some WordNet and
   DBpedia axioms to infer some new facts.
                                                 13
Query Execution
1. We parse the natural language questions
   using the Stanford dependency parser. The
   result will be typed dependencies.
2. We then translate the typed dependencies
   into SPARQL query format.
3. The SPARQL query is then executed over
   populated RDF data from the result of Facts
   Population.

                                                 14
Background Knowledge
               WordNet
Synonymy:
<http://example.org/sentence/buy>
  owl:sameAs
  <http://example.org/sentence/purchase> .




                                             15
Background Knowledge
              WordNet
Hyponymy:
• PREFIX : <http://example.org/sentence/>
  CONSTRUCT {:vehicle ?y ?z} WHERE {:car ?y
  ?z}
• PREFIX : <http://example.org/sentence/>
  CONSTRUCT {?x ?y :vehicle} WHERE {?x ?y
  :car}


                                              16
Background Knowledge
              WordNet
Troponymy:
• PREFIX : <http://example.org/sentence/>
  CONSTRUCT {:move ?y ?z} WHERE {:run ?y
  ?z}
• PREFIX : <http://example.org/sentence/>
  CONSTRUCT {?x ?y :move} WHERE {?x ?y
  :run}


                                            17
Background Knowledge
                DBpedia


<http://example.org/sentence/italy>
  owl:sameAs
  <http://dbpedia.org/resource/Italy>




                                        18
IMPLEMENTATION AND RESULT


                            19
Program
•   Java-based
•   Reuse Apache Jena: SW library
•   Reuse Stanford Parser: Typed dependencies
•   MorphAdorner: Lemmatization and verb
    conjugation




                                                20
A Detailed Example (1)
• Fact: Aliana bought a car
• Question: Who purchased a vehicle?




                                       21
A Detailed Example (2)
• Typed Dependencies
[nsubj(bought-2, Aliana-1), root(ROOT-0,
  bought-2), det(car-4, a-3), dobj(bought-2, car-
  4)]




                                                22
A Detailed Example (3)
RDF:
<http://example.org/sentence/car>
   <http://example.org/sentence/det>
        <http://example.org/sentence/a> .

<http://example.org/sentence/root>
   <http://example.org/sentence/root>
        <http://example.org/sentence/bought> .

<http://example.org/sentence/bought>
   <http://example.org/sentence/dobj>
        <http://example.org/sentence/car> ;
   <http://example.org/sentence/nsubj>
        <http://example.org/sentence/aliana> .
                                                 23
A Detailed Example (4)
KB has:
We have the following triple in the knowledge base
  already:
         :bought owl:sameAs :purchased .
and also the following rules:
PREFIX : <http://example.org/sentence/>
CONSTRUCT         {:vehicle ?y ?z} WHERE {:car ?y ?z}
PREFIX : <http://example.org/sentence/>
CONSTRUCT         {?x ?y :vehicle} WHERE {?x ?y :car}
                                                 24
A Detailed Example (5)
Inferred facts:
<http://example.org/sentence/purchased>
    <http://example.org/sentence/dobj>
        <http://example.org/sentence/vehicle> ;
<http://example.org/sentence/nsubj>
        <http://example.org/sentence/aliana> .



                                                  25
A Detailed Example (6)
Typed dependencies of question:
[nsubj(purchased-2, Who-1), root(ROOT-0,
  purchased-2), det(vehicle-4, a-3), dobj(purchased-
  2, vehicle-4)]




                                                26
A Detailed Example (7)
SPARQL form of question:
SELECT ?x WHERE {
  :vehicle :det :a .
  :purchased :nsubj ?x .
  :purchased :dobj :vehicle .
  :root :root :purchased }

Answer: “aliana”

                                  27
DBpedia Integration
• By adding some background knowledge from
  DBpedia, one can ask more questions.
• Example of Italy data:
:italy owl:sameAs dbpedia:Italy .
  dbpedia:Italy dbpprop:capital "Rome" .
  dbpedia:Enzo_Ferrari     dbpedia-
  owl:nationality     dbpedia:Italy ;
  dbpprop:deathPlace dbpedia:Maranello .
  dbpedia:Enzo_Ferrari dbpedia-owl:child
     dbpedia:Piero_Ferrari ,
     dbpedia:Alfredo_Ferrari .

                                             28
Example Case
• Fact = “Fariz loves Italy.”
• Question = “Does Fariz love a country, whose
  capital is Rome, which was the nationality of a
  person who passed away in Maranello and
  whose sons are Piero Ferrari and Alfredo
  Ferrari?”

• Thus the answer will be: YES, eventhough we
  only have a fact, Fariz loves Italy.
                                                29
Example Case (cont.)
• Note that, the previous example, the fact is
  translated automatically by the system but the
  question is translated manually to be the
  following SPARQL query:
  ASK WHERE { :love :nsubj :fariz . :root
  :root :love .
  :love :dobj ?x .
  ?x dbpprop:capital "Rome" .
  ?y dbpedia-owl:nationality ?x ;
  dbpprop:deathPlacedbpedia:Maranello .
  ?y dbpedia-owl:childdbpedia:Piero_Ferrari
  , dbpedia:Alfredo_Ferrari }

                                                   30
How to handle negation? (1)
• Fact: I did not buy it.
• RDF:
<http://example.org/sentence/root>
   <http://example.org/sentence/root>
        <http://example.org/sentence/bought> .

<http://example.org/sentence/bought>
   <http://example.org/sentence/dobj>
        <http://example.org/sentence/it> ;
   <http://example.org/sentence/neg>
        <http://example.org/sentence/not> ;
   <http://example.org/sentence/nsubj>
        <http://example.org/sentence/i> .

                                                 31
How to handle negation? (2)
• Question: Who bought it?
• SPARQL:
SELECT ?x WHERE {:bought :nsubj ?x . :bought
  :dobj :it . :root :root :bought . FILTER NOT
  EXISTS { [] :neg ?z . } }




                                                 32
How to handle negation? (3)
• Who did not buy it? I.
QUERY: SELECT ?x WHERE {:bought :dobj :it .
  :bought :neg :not . :bought :nsubj ?x . :root
  :root :bought }




                                                  33
How to handle tenses? (1)
• Fact (I will buy it):
<http://example.org/sentence/buy>
   <http://example.org/sentence/aux>
         <http://example.org/sentence/will> ;
   <http://example.org/sentence/dobj>
         <http://example.org/sentence/it> ;
   <http://example.org/sentence/nsubj>
         <http://example.org/sentence/i> .

                                                34
How to handle tenses? (2)
• Who buys it?
• SELECT ?x WHERE {:root :root :buys . :buys
  :nsubj ?x . :buys :dobj :it . FILTER NOT EXISTS {
  [] :aux :will . } }




                                                  35
How to handle passive sentences?
Fact: Juliet was killed by Romeo.
<http://example.org/sentence/root>
   <http://example.org/sentence/root>
         <http://example.org/sentence/killed> .

<http://example.org/sentence/killed>
   <http://example.org/sentence/agent>
        <http://example.org/sentence/romeo> ;
   <http://example.org/sentence/nsubjpass>
        <http://example.org/sentence/juliet> .

                                                  36
How to handle passive sentences?
• Ontology:
:nsubjpass owl:equivalentProperty :dobj .
  :agent owl:equivalentProperty :nsubj .




                                            37
How to handle passive sentences?
• Who killed Juliet?
SELECT ?x WHERE {:killed :nsubj ?x . :killed :dobj
  :juliet . :root :root :killed . FILTER NOT EXISTS {
  [] :neg ?z . }}




                                                    38
DEMO - A Story about Antonio
Antonio is a famous and cool doctor. Antonio
  has been working for 10 years. Antonio is in
  Italy. Antonio can dance Salsa well. Antonio
  loves Maria and Karina. Antonio is also loved
  by Karina. Antonio never cooks. But Maria
  always cooks. Antonio just bought a car.
  Antonio must fly to Indonesia tomorrow.



                                                  39
Conclusions
• Dependency parsing-based QA system with
  RDF and SPARQL
• The system is also aware of negations, tenses
  and passive sentences
• Improvements: More advanced parsing
  method, more efficient inference system,
  richer background knowledge


                                                  40
APPENDIX: EXAMPLES


                     41
Working Examples
• "The Japanese girl sang the song beautifully."

• "Who sang the song beautifully?"
• "Who sang the song?"
• "Who sang?"




                                                   42
Working Examples
• "The Beatles do sing the song perfectly.“

• "How do The Beatles sing the song?"




                                              43
Working Examples
• "They should sing the song well.“

• "How should they sing the song?"




                                      44
Working Examples
• "I did buy the book, the pencil and the ruler
  yesterday.“

• "What did I buy?"




                                                  45
Working Examples
• "Microsoft is located in Redmond.“

• "What is located in Redmond?"




                                       46
Working Examples
• "The man was killed by the police."

• "Who killed the man?"




                                        47
Working Examples
• "Sam is genius, honest and big."

• "Who is big?"




                                     48
Working Examples
• "John is rude.";

• "Is John good?"
• "Is John rude?"




                               49
Working Examples
• "John, that is the founder of Microsoft and the
  initiator of Greenpeace movement, is genius,
  honest and cool."

• "Who is honest?"




                                                50
Working Examples
• "Farid wants to go to Rome.“

• "Who wants to go to Rome?"
• "Who wants to go?"
• "Who wants?"




                                 51
Working Examples
• "Jorge ate 10 delicious apples."

• "Who ate 10 delicious apples?"
• "Who ate 10 apples?"
• "Who ate apples?"




                                     52
Working Examples
• "John is a doctor.“

• "Is John a doctor?"
• "Is John a teacher?"




                               53
Working Examples
• "John is a good doctor."

• "Who is John?"
• "What is John?"




                              54
Working Examples
• "John is in Alaska."
• "John is at home."
• "John is on the street."

• "Where is John?"




                               55
Working Examples
• "Apples are good for health.“

• "What are good for health?"




                                  56

Contenu connexe

Tendances

Rdf In A Nutshell V1
Rdf In A Nutshell V1Rdf In A Nutshell V1
Rdf In A Nutshell V1Fabien Gandon
 
Combining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systemsCombining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systemsAlexandre Passant
 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapesJose Emilio Labra Gayo
 
Linking the Open Data? by Petko Valtchev
Linking the Open Data? by Petko ValtchevLinking the Open Data? by Petko Valtchev
Linking the Open Data? by Petko ValtchevTrudat
 
Ks2008 Semanticweb In Action
Ks2008 Semanticweb In ActionKs2008 Semanticweb In Action
Ks2008 Semanticweb In ActionRinke Hoekstra
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)andyseaborne
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031kwangsub kim
 
Will Lyon- Entity Resolution
Will Lyon- Entity ResolutionWill Lyon- Entity Resolution
Will Lyon- Entity ResolutionNeo4j
 
Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesJose Emilio Labra Gayo
 
An Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of DataAn Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of DataOlaf Hartig
 
Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialAdonisDamian
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDFNarni Rajesh
 

Tendances (20)

Rdf In A Nutshell V1
Rdf In A Nutshell V1Rdf In A Nutshell V1
Rdf In A Nutshell V1
 
Combining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systemsCombining Social Music and Semantic Web for music-related recommender systems
Combining Social Music and Semantic Web for music-related recommender systems
 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
 
Why Link?
Why Link?Why Link?
Why Link?
 
Linking the Open Data? by Petko Valtchev
Linking the Open Data? by Petko ValtchevLinking the Open Data? by Petko Valtchev
Linking the Open Data? by Petko Valtchev
 
Ontologies in RDF-S/OWL
Ontologies in RDF-S/OWLOntologies in RDF-S/OWL
Ontologies in RDF-S/OWL
 
Ks2008 Semanticweb In Action
Ks2008 Semanticweb In ActionKs2008 Semanticweb In Action
Ks2008 Semanticweb In Action
 
Data in RDF
Data in RDFData in RDF
Data in RDF
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031
 
Name That Graph !
Name That Graph !Name That Graph !
Name That Graph !
 
Will Lyon- Entity Resolution
Will Lyon- Entity ResolutionWill Lyon- Entity Resolution
Will Lyon- Entity Resolution
 
Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF
 
XSPARQL Tutorial
XSPARQL TutorialXSPARQL Tutorial
XSPARQL Tutorial
 
Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectives
 
An Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of DataAn Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of Data
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorial
 
Rdf
RdfRdf
Rdf
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
 

En vedette

Dependency parsing
Dependency parsingDependency parsing
Dependency parsingCanyon Boak
 
Qedia - Natural Language Queries on DBPedia
Qedia - Natural Language Queries on DBPediaQedia - Natural Language Queries on DBPedia
Qedia - Natural Language Queries on DBPedialucianb
 
2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...
2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...
2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...Fariz Darari
 
NLIDB(Natural Language Interface to DataBases)
NLIDB(Natural Language Interface to DataBases)NLIDB(Natural Language Interface to DataBases)
NLIDB(Natural Language Interface to DataBases)Swetha Pallati
 
(Deep) Neural Networks在 NLP 和 Text Mining 总结
(Deep) Neural Networks在 NLP 和 Text Mining 总结(Deep) Neural Networks在 NLP 和 Text Mining 总结
(Deep) Neural Networks在 NLP 和 Text Mining 总结君 廖
 
Querying your database in natural language by Daniel Moisset PyData SV 2014
Querying your database in natural language by Daniel Moisset PyData SV 2014Querying your database in natural language by Daniel Moisset PyData SV 2014
Querying your database in natural language by Daniel Moisset PyData SV 2014PyData
 

En vedette (6)

Dependency parsing
Dependency parsingDependency parsing
Dependency parsing
 
Qedia - Natural Language Queries on DBPedia
Qedia - Natural Language Queries on DBPediaQedia - Natural Language Queries on DBPedia
Qedia - Natural Language Queries on DBPedia
 
2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...
2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...
2017 UniBZ Winter Seminar Poster: Managing and Consuming Completeness Informa...
 
NLIDB(Natural Language Interface to DataBases)
NLIDB(Natural Language Interface to DataBases)NLIDB(Natural Language Interface to DataBases)
NLIDB(Natural Language Interface to DataBases)
 
(Deep) Neural Networks在 NLP 和 Text Mining 总结
(Deep) Neural Networks在 NLP 和 Text Mining 总结(Deep) Neural Networks在 NLP 和 Text Mining 总结
(Deep) Neural Networks在 NLP 和 Text Mining 总结
 
Querying your database in natural language by Daniel Moisset PyData SV 2014
Querying your database in natural language by Daniel Moisset PyData SV 2014Querying your database in natural language by Daniel Moisset PyData SV 2014
Querying your database in natural language by Daniel Moisset PyData SV 2014
 

Similaire à Dependency Parsing-based QA System for RDF and SPARQL

Understanding the Standards Gap
Understanding the Standards GapUnderstanding the Standards Gap
Understanding the Standards GapDan Brickley
 
SPARQL in the Semantic Web
SPARQL in the Semantic WebSPARQL in the Semantic Web
SPARQL in the Semantic WebJan Beeck
 
Furore devdays 2017- rdf1(solbrig)
Furore devdays 2017- rdf1(solbrig)Furore devdays 2017- rdf1(solbrig)
Furore devdays 2017- rdf1(solbrig)DevDays
 
Semantic web assignment 2
Semantic web assignment 2Semantic web assignment 2
Semantic web assignment 2BarryK88
 
Real-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsReal-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsJoshua Shinavier
 
Knowledge Technologies: Opportunities and Challenges
Knowledge Technologies: Opportunities and ChallengesKnowledge Technologies: Opportunities and Challenges
Knowledge Technologies: Opportunities and ChallengesFariz Darari
 
DBpedia as Gaeilge Chapter
DBpedia as Gaeilge ChapterDBpedia as Gaeilge Chapter
DBpedia as Gaeilge ChapterBianca Pereira
 
Joy Nelson - Workshop on BIBFRAME, RDF and SPAQL
Joy Nelson - Workshop on BIBFRAME, RDF and SPAQLJoy Nelson - Workshop on BIBFRAME, RDF and SPAQL
Joy Nelson - Workshop on BIBFRAME, RDF and SPAQLKohaGruppoItaliano
 
Semantic Web: A web that is not the Web
Semantic Web: A web that is not the WebSemantic Web: A web that is not the Web
Semantic Web: A web that is not the WebBruce Esrig
 
Semantic Integration with Apache Jena and Stanbol
Semantic Integration with Apache Jena and StanbolSemantic Integration with Apache Jena and Stanbol
Semantic Integration with Apache Jena and StanbolAll Things Open
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIsJosef Petrák
 
Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2Richard Urban
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD VivaAidan Hogan
 
FIWARE Global Summit - FIROS: Helping Robots to be Context Aware
FIWARE Global Summit - FIROS: Helping Robots to be Context AwareFIWARE Global Summit - FIROS: Helping Robots to be Context Aware
FIWARE Global Summit - FIROS: Helping Robots to be Context AwareFIWARE
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and SemanticsTatiana Al-Chueyr
 
Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013François Belleau
 

Similaire à Dependency Parsing-based QA System for RDF and SPARQL (20)

Understanding the Standards Gap
Understanding the Standards GapUnderstanding the Standards Gap
Understanding the Standards Gap
 
Linked Open Data
Linked Open DataLinked Open Data
Linked Open Data
 
Bio2RDF@BH2010
Bio2RDF@BH2010Bio2RDF@BH2010
Bio2RDF@BH2010
 
SPARQL in the Semantic Web
SPARQL in the Semantic WebSPARQL in the Semantic Web
SPARQL in the Semantic Web
 
LOD技術解説
LOD技術解説LOD技術解説
LOD技術解説
 
Furore devdays 2017- rdf1(solbrig)
Furore devdays 2017- rdf1(solbrig)Furore devdays 2017- rdf1(solbrig)
Furore devdays 2017- rdf1(solbrig)
 
Semantic web assignment 2
Semantic web assignment 2Semantic web assignment 2
Semantic web assignment 2
 
Real-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsReal-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter Annotations
 
Knowledge Technologies: Opportunities and Challenges
Knowledge Technologies: Opportunities and ChallengesKnowledge Technologies: Opportunities and Challenges
Knowledge Technologies: Opportunities and Challenges
 
DBpedia as Gaeilge Chapter
DBpedia as Gaeilge ChapterDBpedia as Gaeilge Chapter
DBpedia as Gaeilge Chapter
 
Joy Nelson - Workshop on BIBFRAME, RDF and SPAQL
Joy Nelson - Workshop on BIBFRAME, RDF and SPAQLJoy Nelson - Workshop on BIBFRAME, RDF and SPAQL
Joy Nelson - Workshop on BIBFRAME, RDF and SPAQL
 
Semantic Web: A web that is not the Web
Semantic Web: A web that is not the WebSemantic Web: A web that is not the Web
Semantic Web: A web that is not the Web
 
Semantic Integration with Apache Jena and Stanbol
Semantic Integration with Apache Jena and StanbolSemantic Integration with Apache Jena and Stanbol
Semantic Integration with Apache Jena and Stanbol
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 
Linked (Open) Data
Linked (Open) DataLinked (Open) Data
Linked (Open) Data
 
Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD Viva
 
FIWARE Global Summit - FIROS: Helping Robots to be Context Aware
FIWARE Global Summit - FIROS: Helping Robots to be Context AwareFIWARE Global Summit - FIROS: Helping Robots to be Context Aware
FIWARE Global Summit - FIROS: Helping Robots to be Context Aware
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and Semantics
 
Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013
 

Plus de Fariz Darari

Data X Museum - Hari Museum Internasional 2022 - WMID
Data X Museum - Hari Museum Internasional 2022 - WMIDData X Museum - Hari Museum Internasional 2022 - WMID
Data X Museum - Hari Museum Internasional 2022 - WMIDFariz Darari
 
[PUBLIC] quiz-01-midterm-solutions.pdf
[PUBLIC] quiz-01-midterm-solutions.pdf[PUBLIC] quiz-01-midterm-solutions.pdf
[PUBLIC] quiz-01-midterm-solutions.pdfFariz Darari
 
Free AI Kit - Game Theory
Free AI Kit - Game TheoryFree AI Kit - Game Theory
Free AI Kit - Game TheoryFariz Darari
 
Neural Networks and Deep Learning: An Intro
Neural Networks and Deep Learning: An IntroNeural Networks and Deep Learning: An Intro
Neural Networks and Deep Learning: An IntroFariz Darari
 
NLP guest lecture: How to get text to confess what knowledge it has
NLP guest lecture: How to get text to confess what knowledge it hasNLP guest lecture: How to get text to confess what knowledge it has
NLP guest lecture: How to get text to confess what knowledge it hasFariz Darari
 
Supply and Demand - AI Talents
Supply and Demand - AI TalentsSupply and Demand - AI Talents
Supply and Demand - AI TalentsFariz Darari
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Fariz Darari
 
AI in education done properly
AI in education done properlyAI in education done properly
AI in education done properlyFariz Darari
 
Artificial Neural Networks: Pointers
Artificial Neural Networks: PointersArtificial Neural Networks: Pointers
Artificial Neural Networks: PointersFariz Darari
 
Open Tridharma at ICACSIS 2019
Open Tridharma at ICACSIS 2019Open Tridharma at ICACSIS 2019
Open Tridharma at ICACSIS 2019Fariz Darari
 
Defense Slides of Avicenna Wisesa - PROWD
Defense Slides of Avicenna Wisesa - PROWDDefense Slides of Avicenna Wisesa - PROWD
Defense Slides of Avicenna Wisesa - PROWDFariz Darari
 
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz DarariSeminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz DarariFariz Darari
 
Foundations of Programming - Java OOP
Foundations of Programming - Java OOPFoundations of Programming - Java OOP
Foundations of Programming - Java OOPFariz Darari
 
Recursion in Python
Recursion in PythonRecursion in Python
Recursion in PythonFariz Darari
 
[ISWC 2013] Completeness statements about RDF data sources and their use for ...
[ISWC 2013] Completeness statements about RDF data sources and their use for ...[ISWC 2013] Completeness statements about RDF data sources and their use for ...
[ISWC 2013] Completeness statements about RDF data sources and their use for ...Fariz Darari
 
Testing in Python: doctest and unittest (Updated)
Testing in Python: doctest and unittest (Updated)Testing in Python: doctest and unittest (Updated)
Testing in Python: doctest and unittest (Updated)Fariz Darari
 
Testing in Python: doctest and unittest
Testing in Python: doctest and unittestTesting in Python: doctest and unittest
Testing in Python: doctest and unittestFariz Darari
 
Dissertation Defense - Managing and Consuming Completeness Information for RD...
Dissertation Defense - Managing and Consuming Completeness Information for RD...Dissertation Defense - Managing and Consuming Completeness Information for RD...
Dissertation Defense - Managing and Consuming Completeness Information for RD...Fariz Darari
 
Research Writing - 2018.07.18
Research Writing - 2018.07.18Research Writing - 2018.07.18
Research Writing - 2018.07.18Fariz Darari
 
KOI - Knowledge Of Incidents - SemEval 2018
KOI - Knowledge Of Incidents - SemEval 2018KOI - Knowledge Of Incidents - SemEval 2018
KOI - Knowledge Of Incidents - SemEval 2018Fariz Darari
 

Plus de Fariz Darari (20)

Data X Museum - Hari Museum Internasional 2022 - WMID
Data X Museum - Hari Museum Internasional 2022 - WMIDData X Museum - Hari Museum Internasional 2022 - WMID
Data X Museum - Hari Museum Internasional 2022 - WMID
 
[PUBLIC] quiz-01-midterm-solutions.pdf
[PUBLIC] quiz-01-midterm-solutions.pdf[PUBLIC] quiz-01-midterm-solutions.pdf
[PUBLIC] quiz-01-midterm-solutions.pdf
 
Free AI Kit - Game Theory
Free AI Kit - Game TheoryFree AI Kit - Game Theory
Free AI Kit - Game Theory
 
Neural Networks and Deep Learning: An Intro
Neural Networks and Deep Learning: An IntroNeural Networks and Deep Learning: An Intro
Neural Networks and Deep Learning: An Intro
 
NLP guest lecture: How to get text to confess what knowledge it has
NLP guest lecture: How to get text to confess what knowledge it hasNLP guest lecture: How to get text to confess what knowledge it has
NLP guest lecture: How to get text to confess what knowledge it has
 
Supply and Demand - AI Talents
Supply and Demand - AI TalentsSupply and Demand - AI Talents
Supply and Demand - AI Talents
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
 
AI in education done properly
AI in education done properlyAI in education done properly
AI in education done properly
 
Artificial Neural Networks: Pointers
Artificial Neural Networks: PointersArtificial Neural Networks: Pointers
Artificial Neural Networks: Pointers
 
Open Tridharma at ICACSIS 2019
Open Tridharma at ICACSIS 2019Open Tridharma at ICACSIS 2019
Open Tridharma at ICACSIS 2019
 
Defense Slides of Avicenna Wisesa - PROWD
Defense Slides of Avicenna Wisesa - PROWDDefense Slides of Avicenna Wisesa - PROWD
Defense Slides of Avicenna Wisesa - PROWD
 
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz DarariSeminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
Seminar Laporan Aktualisasi - Tridharma Terbuka - Fariz Darari
 
Foundations of Programming - Java OOP
Foundations of Programming - Java OOPFoundations of Programming - Java OOP
Foundations of Programming - Java OOP
 
Recursion in Python
Recursion in PythonRecursion in Python
Recursion in Python
 
[ISWC 2013] Completeness statements about RDF data sources and their use for ...
[ISWC 2013] Completeness statements about RDF data sources and their use for ...[ISWC 2013] Completeness statements about RDF data sources and their use for ...
[ISWC 2013] Completeness statements about RDF data sources and their use for ...
 
Testing in Python: doctest and unittest (Updated)
Testing in Python: doctest and unittest (Updated)Testing in Python: doctest and unittest (Updated)
Testing in Python: doctest and unittest (Updated)
 
Testing in Python: doctest and unittest
Testing in Python: doctest and unittestTesting in Python: doctest and unittest
Testing in Python: doctest and unittest
 
Dissertation Defense - Managing and Consuming Completeness Information for RD...
Dissertation Defense - Managing and Consuming Completeness Information for RD...Dissertation Defense - Managing and Consuming Completeness Information for RD...
Dissertation Defense - Managing and Consuming Completeness Information for RD...
 
Research Writing - 2018.07.18
Research Writing - 2018.07.18Research Writing - 2018.07.18
Research Writing - 2018.07.18
 
KOI - Knowledge Of Incidents - SemEval 2018
KOI - Knowledge Of Incidents - SemEval 2018KOI - Knowledge Of Incidents - SemEval 2018
KOI - Knowledge Of Incidents - SemEval 2018
 

Dernier

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Dernier (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Dependency Parsing-based QA System for RDF and SPARQL

  • 1. Dependency Parsing-based QA System using RDF and SPARQL Fariz Darari fadirra@gmail.com
  • 6. QA in General • Finding an answer to natural language questions based on documents/facts • Instead of documents, give answers • Factoid questions: – Who can dance Tango? – What did I eat this morning? – When Mahatma Gandhi was born? 6
  • 8. RDF & SPARQL • RDF Data: :book1 :title "SPARQL Tutorial" . • SPARQL Query: SELECT ?title WHERE { :book1 :title ?title . } 8
  • 9. WordNet • Large lexical database of English words • Words are grouped into synsets • Relations among synsets: Synonymy, antonymy, hyponymy, meronymy, troponymy 9
  • 10. DBpedia • Knowledge base of Wikipedia in RDF • Data at dbpedia.org/resource/Italy: 10
  • 12. NL Text Dependency (Facts) Parser RDFizer RDF SPARQL OWL SPARQLizer Ontology Dependency NL Text Parser (Questions)
  • 13. Facts Population 1. We parse the natural language facts using the Stanford dependency parser. The result will be typed dependencies. 2. The typed dependencies are then translated into RDF format using RDFizer. The RDFizer is built using Java with Apache Jena as the Semantic Web library. 3. The resulting RDF will be consulted with an OWL ontology that contains some WordNet and DBpedia axioms to infer some new facts. 13
  • 14. Query Execution 1. We parse the natural language questions using the Stanford dependency parser. The result will be typed dependencies. 2. We then translate the typed dependencies into SPARQL query format. 3. The SPARQL query is then executed over populated RDF data from the result of Facts Population. 14
  • 15. Background Knowledge WordNet Synonymy: <http://example.org/sentence/buy> owl:sameAs <http://example.org/sentence/purchase> . 15
  • 16. Background Knowledge WordNet Hyponymy: • PREFIX : <http://example.org/sentence/> CONSTRUCT {:vehicle ?y ?z} WHERE {:car ?y ?z} • PREFIX : <http://example.org/sentence/> CONSTRUCT {?x ?y :vehicle} WHERE {?x ?y :car} 16
  • 17. Background Knowledge WordNet Troponymy: • PREFIX : <http://example.org/sentence/> CONSTRUCT {:move ?y ?z} WHERE {:run ?y ?z} • PREFIX : <http://example.org/sentence/> CONSTRUCT {?x ?y :move} WHERE {?x ?y :run} 17
  • 18. Background Knowledge DBpedia <http://example.org/sentence/italy> owl:sameAs <http://dbpedia.org/resource/Italy> 18
  • 20. Program • Java-based • Reuse Apache Jena: SW library • Reuse Stanford Parser: Typed dependencies • MorphAdorner: Lemmatization and verb conjugation 20
  • 21. A Detailed Example (1) • Fact: Aliana bought a car • Question: Who purchased a vehicle? 21
  • 22. A Detailed Example (2) • Typed Dependencies [nsubj(bought-2, Aliana-1), root(ROOT-0, bought-2), det(car-4, a-3), dobj(bought-2, car- 4)] 22
  • 23. A Detailed Example (3) RDF: <http://example.org/sentence/car> <http://example.org/sentence/det> <http://example.org/sentence/a> . <http://example.org/sentence/root> <http://example.org/sentence/root> <http://example.org/sentence/bought> . <http://example.org/sentence/bought> <http://example.org/sentence/dobj> <http://example.org/sentence/car> ; <http://example.org/sentence/nsubj> <http://example.org/sentence/aliana> . 23
  • 24. A Detailed Example (4) KB has: We have the following triple in the knowledge base already: :bought owl:sameAs :purchased . and also the following rules: PREFIX : <http://example.org/sentence/> CONSTRUCT {:vehicle ?y ?z} WHERE {:car ?y ?z} PREFIX : <http://example.org/sentence/> CONSTRUCT {?x ?y :vehicle} WHERE {?x ?y :car} 24
  • 25. A Detailed Example (5) Inferred facts: <http://example.org/sentence/purchased> <http://example.org/sentence/dobj> <http://example.org/sentence/vehicle> ; <http://example.org/sentence/nsubj> <http://example.org/sentence/aliana> . 25
  • 26. A Detailed Example (6) Typed dependencies of question: [nsubj(purchased-2, Who-1), root(ROOT-0, purchased-2), det(vehicle-4, a-3), dobj(purchased- 2, vehicle-4)] 26
  • 27. A Detailed Example (7) SPARQL form of question: SELECT ?x WHERE { :vehicle :det :a . :purchased :nsubj ?x . :purchased :dobj :vehicle . :root :root :purchased } Answer: “aliana” 27
  • 28. DBpedia Integration • By adding some background knowledge from DBpedia, one can ask more questions. • Example of Italy data: :italy owl:sameAs dbpedia:Italy . dbpedia:Italy dbpprop:capital "Rome" . dbpedia:Enzo_Ferrari dbpedia- owl:nationality dbpedia:Italy ; dbpprop:deathPlace dbpedia:Maranello . dbpedia:Enzo_Ferrari dbpedia-owl:child dbpedia:Piero_Ferrari , dbpedia:Alfredo_Ferrari . 28
  • 29. Example Case • Fact = “Fariz loves Italy.” • Question = “Does Fariz love a country, whose capital is Rome, which was the nationality of a person who passed away in Maranello and whose sons are Piero Ferrari and Alfredo Ferrari?” • Thus the answer will be: YES, eventhough we only have a fact, Fariz loves Italy. 29
  • 30. Example Case (cont.) • Note that, the previous example, the fact is translated automatically by the system but the question is translated manually to be the following SPARQL query: ASK WHERE { :love :nsubj :fariz . :root :root :love . :love :dobj ?x . ?x dbpprop:capital "Rome" . ?y dbpedia-owl:nationality ?x ; dbpprop:deathPlacedbpedia:Maranello . ?y dbpedia-owl:childdbpedia:Piero_Ferrari , dbpedia:Alfredo_Ferrari } 30
  • 31. How to handle negation? (1) • Fact: I did not buy it. • RDF: <http://example.org/sentence/root> <http://example.org/sentence/root> <http://example.org/sentence/bought> . <http://example.org/sentence/bought> <http://example.org/sentence/dobj> <http://example.org/sentence/it> ; <http://example.org/sentence/neg> <http://example.org/sentence/not> ; <http://example.org/sentence/nsubj> <http://example.org/sentence/i> . 31
  • 32. How to handle negation? (2) • Question: Who bought it? • SPARQL: SELECT ?x WHERE {:bought :nsubj ?x . :bought :dobj :it . :root :root :bought . FILTER NOT EXISTS { [] :neg ?z . } } 32
  • 33. How to handle negation? (3) • Who did not buy it? I. QUERY: SELECT ?x WHERE {:bought :dobj :it . :bought :neg :not . :bought :nsubj ?x . :root :root :bought } 33
  • 34. How to handle tenses? (1) • Fact (I will buy it): <http://example.org/sentence/buy> <http://example.org/sentence/aux> <http://example.org/sentence/will> ; <http://example.org/sentence/dobj> <http://example.org/sentence/it> ; <http://example.org/sentence/nsubj> <http://example.org/sentence/i> . 34
  • 35. How to handle tenses? (2) • Who buys it? • SELECT ?x WHERE {:root :root :buys . :buys :nsubj ?x . :buys :dobj :it . FILTER NOT EXISTS { [] :aux :will . } } 35
  • 36. How to handle passive sentences? Fact: Juliet was killed by Romeo. <http://example.org/sentence/root> <http://example.org/sentence/root> <http://example.org/sentence/killed> . <http://example.org/sentence/killed> <http://example.org/sentence/agent> <http://example.org/sentence/romeo> ; <http://example.org/sentence/nsubjpass> <http://example.org/sentence/juliet> . 36
  • 37. How to handle passive sentences? • Ontology: :nsubjpass owl:equivalentProperty :dobj . :agent owl:equivalentProperty :nsubj . 37
  • 38. How to handle passive sentences? • Who killed Juliet? SELECT ?x WHERE {:killed :nsubj ?x . :killed :dobj :juliet . :root :root :killed . FILTER NOT EXISTS { [] :neg ?z . }} 38
  • 39. DEMO - A Story about Antonio Antonio is a famous and cool doctor. Antonio has been working for 10 years. Antonio is in Italy. Antonio can dance Salsa well. Antonio loves Maria and Karina. Antonio is also loved by Karina. Antonio never cooks. But Maria always cooks. Antonio just bought a car. Antonio must fly to Indonesia tomorrow. 39
  • 40. Conclusions • Dependency parsing-based QA system with RDF and SPARQL • The system is also aware of negations, tenses and passive sentences • Improvements: More advanced parsing method, more efficient inference system, richer background knowledge 40
  • 42. Working Examples • "The Japanese girl sang the song beautifully." • "Who sang the song beautifully?" • "Who sang the song?" • "Who sang?" 42
  • 43. Working Examples • "The Beatles do sing the song perfectly.“ • "How do The Beatles sing the song?" 43
  • 44. Working Examples • "They should sing the song well.“ • "How should they sing the song?" 44
  • 45. Working Examples • "I did buy the book, the pencil and the ruler yesterday.“ • "What did I buy?" 45
  • 46. Working Examples • "Microsoft is located in Redmond.“ • "What is located in Redmond?" 46
  • 47. Working Examples • "The man was killed by the police." • "Who killed the man?" 47
  • 48. Working Examples • "Sam is genius, honest and big." • "Who is big?" 48
  • 49. Working Examples • "John is rude."; • "Is John good?" • "Is John rude?" 49
  • 50. Working Examples • "John, that is the founder of Microsoft and the initiator of Greenpeace movement, is genius, honest and cool." • "Who is honest?" 50
  • 51. Working Examples • "Farid wants to go to Rome.“ • "Who wants to go to Rome?" • "Who wants to go?" • "Who wants?" 51
  • 52. Working Examples • "Jorge ate 10 delicious apples." • "Who ate 10 delicious apples?" • "Who ate 10 apples?" • "Who ate apples?" 52
  • 53. Working Examples • "John is a doctor.“ • "Is John a doctor?" • "Is John a teacher?" 53
  • 54. Working Examples • "John is a good doctor." • "Who is John?" • "What is John?" 54
  • 55. Working Examples • "John is in Alaska." • "John is at home." • "John is on the street." • "Where is John?" 55
  • 56. Working Examples • "Apples are good for health.“ • "What are good for health?" 56

Notes de l'éditeur

  1. Siri image: apple.comWatson: gizmodo.comExample questions (Querying Contacts):What&apos;s Michael&apos;s address?What is Susan Park&apos;s phone number?When is my wife&apos;s birthday?Show Jennifer&apos;s home email address
  2. Siri image: apple.comWatson: gizmodo.comAnswer - Question systemfor example: 4 JulyWhen is the celebration of the independence day of the USA?
  3. The Stanford dependencies provide a representation of grammatical relations between words in a sentence. They have been designed to be easily understood and effectively used by people who want to extract textual relations. Stanford dependencies (SD) are triplets: name of the relation, governor and dependent.The dependencies are produced using hand-written tregex patterns over phrase-structure trees as described in:Marie-Catherine de Marneffe, Bill MacCartney and Christopher D. Manning. 2006. Generating Typed Dependency Parses from Phrase Structure Parses. In LREC 2006.
  4. SW: an extension of the Web with machine-interpretable content
  5. Synsets: sets of cognitive synonyms, each expressing a distinct conceptAn example of synonymy: buy = purchaseantonymy: bad = goodhyponymy: hyponymy = relationmeronymy: tires = cartroponymy: run = move