SlideShare une entreprise Scribd logo
1  sur  31
+

RDFS Semantics,
Inference techniques and
Sesame
Mariano Rodriguez-Muro,
Free University of Bozen-Bolzano
+

Disclaimer


License


This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 License
(http://creativecommons.org/licenses/by-sa/3.0/)
+

Reading material


Foundations of Semantic Web Chapter 3.



Semantic Web for the Working Ontologist. Chapter 8
http://proquest.safaribooksonline.com/book/-/9780123859655
+

Core concepts


Systems that perform inference are often called reasoning
engines or reasoners.



Reasoner engine
a system that infers new information based on the contents of a
knowledgebase. This can be accomplished using rules and a rule
engine, triggers on a database or RDF store, decision trees,
tableau algorithms, or even programmatically using hard-coded
business logic



A reasoner must be compliant to the semantics of the ontology
language it supports



Hence, an ontology language must state it’s semantics in a
formal way
+

Giving semantics to RDFS



Implementing semantics for RDFS



Overview



Using RDFS inference with Sesame
+
RDFS rule-based semantics
+

RDFS rule-based semantics


Example: Type propagation through rdfs:subClassOf described
as a rule
[IF]
?class1 rfds:subClassOf ?class2 AND ?instance rdf:type ?class1
[THEN]
?instance rdf:type ?class2



Subclass transitivity as a rule
[IF]
?class1 rfds:subClassOf ?class2 AND ?class2 rfds:subClassOf ?class3
[THEN]
?class1 rdf:type ?class3
+

RDFS rule-based semantics


The RDFS specification defines RDFS semantics in terms of 26
rules grouped as follows:


RDFS entailment rules core rules, simple “reasonable” entailments
(incomplete w.r.t. domain/range/subPropertyOf and subClassOf)



RDFS rdfsensional rules complete the rule set w.r.t. to
domain/range/subPropertyOf and subClassOf



Datatype entailment rules covers inference related to datatype’s
lexical forms



See http://www.w3.org/TR/rdf-mt/#rules



See Section 3.3 of Foundations of Semantic Web
RDFS Entailment Rules
+
Name

Condition

Conclusion

rdfs1

uuu aaa lll.

_:nnn rdf:type rdfs:Literal .

where lll is a plain literal
(with or without a language tag).

where _:nnn identifies a blank node
allocated to lll by rule rule lg.

rdfs2

aaa rdfs:domain xxx .
uuu aaa yyy .

uuu rdf:type xxx .

rdfs3

aaa rdfs:range xxx .
uuu aaa vvv .

vvv rdf:type xxx .

rdfs4a

uuu aaa xxx .

uuu rdf:type rdfs:Resource .

rdfs4b

uuu aaa vvv.

vvv rdf:type rdfs:Resource .

rdfs5

uuu rdfs:subPropertyOf vvv .
vvv rdfs:subPropertyOf xxx .

uuu rdfs:subPropertyOf xxx .

rdfs6

uuu rdf:type rdf:Property .

uuu rdfs:subPropertyOf uuu .

rdfs7

aaa rdfs:subPropertyOf bbb .
uuu aaa yyy .

uuu bbb yyy .
RDFS Entailment Rules (cont.)
+
Name

Condition

Conclusion

rdfs8

uuu rdf:type rdfs:Class .

uuu rdfs:subClassOf rdfs:Resource .

rdfs9

uuu rdfs:subClassOf xxx .
vvv rdf:type uuu .

uuu rdf:type xxx .

rdfs10

uuu rdf:type rdfs:Class .

uuu rdfs:subClassOf uuu .

rdfs11

uuu rdfs:subClassOf vvv .
vvv rdfs:subClassOf xxx .

uuu rdfs:subClassOf xxx .

rdfs12

uuu rdf:type
rdfs:ContainerMembershipProperty .

uuu rdfs:subPropertyOf rdfs:member .

rdfs13

uuu rdf:type rdfs:Datatype .

uuu rdfs:subClassOf rdfs:Literal .
RDFS extensional entailment rules
+
Name

Condition

Conclusion

ext1

uuu rdfs:domain vvv .
vvv rdfs:subClassOf zzz

uuu rdfs:domain zzz .

ext2

uuu rdfs:range vvv .
vvv rdfs:subClassOf zzz .

uuu rdfs:range zzz .

ext3

uuu rdfs:domain vvv .
www rdfs:subPropertyOf uuu .

www rdfs:domain vvv .

ext4

uuu rdfs:range vvv .
www rdfs:subPropertyOf uuu .

www rdfs:range vvv .

ext5

rdf:type rdfs:subPropertyOf www .
www rdfs:domain vvv .

rdfs:Resource
rdfs:subClassOf vvv .

ext6

rdfs:subClassOf rdfs:subPropertyOf www .
www rdfs:domain vvv .

rdfs:Class rdfs:subClassOf
vvv .

ext7

rdfs:subPropertyOf rdfs:subPropertyOf www .
www rdfs:domain vvv .

rdf:Property
rdfs:subClassOf vvv .

ext8

rdfs:subClassOf rdfs:subPropertyOf www .
www rdfs:range vvv .

rdfs:Class rdfs:subClassOf
vvv .

ext9

rdfs:subPropertyOf rdfs:subPropertyOf www .
www rdfs:range vvv .

rdf:Property
rdfs:subClassOf vvv .
+

Datatype entailment rules

Name

Condition

Conclusion

rdfsD1

ddd rdf:type rdfs:Datatype .
uuu aaa "sss"^^ddd .

_:nnn rdf:type ddd .
where _:nnn identifies a blank node
allocated to "sss"^^ddd by rule rule lg.

rdfsD2

ddd rdf:type rdfs:Datatype .
uuu aaa "sss"^^ddd .

uuu aaa "ttt"^^ddd

rdfsD3

ddd rdf:type rdfs:Datatype .
eee rdf:type rdfs:Datatype .
uuu aaa "sss"^^ddd .

uuu aaa "ttt"^^eee .



Note, infinite number of rules!



Semantics by rules is easy to understand (most of them), but
“hacky”
+

Other semantics for RDFS


RDFS rule-based semantics are SYNTACTIC, easy to
understand, implemented everywhere



Syntactic rules are prone to incompleteness (several passes
were necessary to fix RDFS rule-based semantics)



Sometimes not-intuitive



RDFS also has model-theoretic semantics, clear semantics
based on set theory



Won’t see them in this course, see Chapter 3 in Foundations
of Semantic Web
+

Rule-based inference


Basic idea, describe all mandatory inferences as rules.



A rule describes how new information based on the current
state of the data/knowledge base.
IF a holds in the data
Then b holds in the data

Pre-condition
conclusion



Rule based inference cannot be used for ANY language., (key
factors, non-determinism and termination)



They are enough to capture the semantics of RDFS
+

Implementing RDFS
semantics
+

Implementing RDFS semantics


Most (really, almost all) reasoners that implement RDFS
semantics use one (or both) of the following techniques


Forward chaining
Deduction calculus for all the rules in the RDFS rules.



Backward chaining
Looking for all possible facts from which we may derive the
conclusion
+

Forward chaining


Objective: Is fact X implied by the data?



How: Pre-compute all implied facts, then just check if fact X is
there



How it works




Works at “load” time
Infers new facts based on the existing ones
Continues applying inferences until reaching a fix point (graphs are
sets)



New facts are added “immediately” to the repository



Natural match to RDFS rule-based semantics
+

Forward chaining


How it works


Works at “load” time



Infers new facts based on the existing ones



Continues applying inferences until reaching a fix point (graphs are
sets)



New facts are added “immediately” to the repository



Natural match to RDFS rule-based semantics

Complex interactions in forward chaining
+

Forward chaining, cons and pros


Pros



Rules are already given by the RDFS rule-based semantics





Easy to implement
Retrieval is FAST (also query answering)

Cons


Adds a lot of new information (maybe not necessary)



Extra space



Extra time



Updates are VERY complicated (truth maintenance)
+

Forward chaining (cont.)
+

Forward chaining, cons and pros


Pros






Cons







Easy to implement
Rules are already given by the RDFS rule-based semantics
Retrieval is FAST (also query answering)

Adds a lot of new information (maybe not necessary)
Extra space
Extra time
Updates are VERY complicated (truth maintenance)

Possible optimizations: application order, parallelism (often
incomplete)
+

Backward chaining


Objective: is fact X implied by the data?



How: Compute the facts that would be necessary for fact X to
be implied, verify if any of those conditions is true.
+

Forward chaining, cons and pros


Pros



No data is generated, no extra loading time





Easy to implement
Simple update management or truth maintenance

Cons





Retrieval is slower
Fast query time may require complex optimization techniques

Possible optimizations: caching, low level indexes
+

Forward or Backward



Key aspects in deciding for forward
or backward chaining:


Loading time



Query time



Space constraints



Updates
+

Any other ways to implement with
RDFS semantics


There are other, more efficient methods



Not implemented in common frameworks



More to come in this course
+
RDFS reasoning in Sesame
Easy
+

Sesame RDFS Sail


RDFS entailments are implemented using a SAIL



The sail is a ForwardChainingRDFSInferencer


On load time it will perform forward chaining
+

Sesame RDFS Sail


RDFS entailments are implemented using a SAIL



The sail is a ForwardChainingRDFSInferencer


On load time it will perform forward chaining
+

Setting it up


Create the repository of your choice and attach the sail

Repository myRepository = new SailRepository(
new ForwardChainingRDFSInferencer(
new MemoryStore()));
myRepository.initialize();



As with any forward chaining inference engine, load time will be
affected by the use of this sail
+

Sesame RDFS in the console


In the console, simply create the pre-configured repos:


in-memory-rdfs



native-rdfs-types
+

Sesame and reasoning


Sesame’s native support for inferences is poor, only RDFS



Performance is not great



Options on large scenarios: OWLIM

Contenu connexe

Tendances

Rdf Overview Presentation
Rdf Overview PresentationRdf Overview Presentation
Rdf Overview PresentationKen Varnum
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD VivaAidan Hogan
 
Uplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RMLUplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RMLChristophe Debruyne
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFSNilesh Wagmare
 
A Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF ProcessingA Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF Processinglucianb
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDFNarni Rajesh
 
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panicoDiego Valerio Camarda
 
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)dataSUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)dataDiego Valerio Camarda
 
FAIR Projector Builder
FAIR Projector BuilderFAIR Projector Builder
FAIR Projector BuilderMark Wilkinson
 
Hai huang presentation
Hai huang presentation Hai huang presentation
Hai huang presentation hai huang
 
Bio ontologies and semantic technologies
Bio ontologies and semantic technologiesBio ontologies and semantic technologies
Bio ontologies and semantic technologiesProf. Wim Van Criekinge
 
Another RDF Encoding Form
Another RDF Encoding FormAnother RDF Encoding Form
Another RDF Encoding FormJakob .
 
Tue acosta tut_providing_linkeddata
Tue acosta tut_providing_linkeddataTue acosta tut_providing_linkeddata
Tue acosta tut_providing_linkeddataeswcsummerschool
 

Tendances (20)

Introduction to RDF Data Model
Introduction to RDF Data ModelIntroduction to RDF Data Model
Introduction to RDF Data Model
 
Rdf Overview Presentation
Rdf Overview PresentationRdf Overview Presentation
Rdf Overview Presentation
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD Viva
 
Getting triples from records: the role of ISBD
Getting triples from records: the role of ISBDGetting triples from records: the role of ISBD
Getting triples from records: the role of ISBD
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
 
Triple Stores
Triple StoresTriple Stores
Triple Stores
 
Uplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RMLUplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RML
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFS
 
A Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF ProcessingA Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF Processing
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
 
Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF
 
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
 
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)dataSUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
 
Rdf
RdfRdf
Rdf
 
FAIR Projector Builder
FAIR Projector BuilderFAIR Projector Builder
FAIR Projector Builder
 
Hai huang presentation
Hai huang presentation Hai huang presentation
Hai huang presentation
 
Bio ontologies and semantic technologies
Bio ontologies and semantic technologiesBio ontologies and semantic technologies
Bio ontologies and semantic technologies
 
Another RDF Encoding Form
Another RDF Encoding FormAnother RDF Encoding Form
Another RDF Encoding Form
 
Scaling the (evolving) web data –at low cost-
Scaling the (evolving) web data –at low cost-Scaling the (evolving) web data –at low cost-
Scaling the (evolving) web data –at low cost-
 
Tue acosta tut_providing_linkeddata
Tue acosta tut_providing_linkeddataTue acosta tut_providing_linkeddata
Tue acosta tut_providing_linkeddata
 

En vedette (6)

SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1
 
SWT Lab 1
SWT Lab 1SWT Lab 1
SWT Lab 1
 
SWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingSWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mapping
 
2011.118 1233
2011.118 12332011.118 1233
2011.118 1233
 
SWT Lab 5
SWT Lab 5SWT Lab 5
SWT Lab 5
 
SWT Lab 2
SWT Lab 2SWT Lab 2
SWT Lab 2
 

Similaire à SWT Lecture Session 6 - RDFS semantics, inference techniques, sesame rdfs

Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Juan Sequeda
 
A wiki for_business_rules_in_open_vocabulary_executable_english
A wiki for_business_rules_in_open_vocabulary_executable_englishA wiki for_business_rules_in_open_vocabulary_executable_english
A wiki for_business_rules_in_open_vocabulary_executable_englishAdrian Walker
 
A signature based indexing method for efficient content-based retrieval of re...
A signature based indexing method for efficient content-based retrieval of re...A signature based indexing method for efficient content-based retrieval of re...
A signature based indexing method for efficient content-based retrieval of re...Mumbai Academisc
 
Waters Grid & HPC Course
Waters Grid & HPC CourseWaters Grid & HPC Course
Waters Grid & HPC Coursejimliddle
 
Semantic Web (Web 3.0)
Semantic Web (Web 3.0)Semantic Web (Web 3.0)
Semantic Web (Web 3.0)John Dougherty
 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutMediaMixerCommunity
 
A glimpse of test automation in hadoop ecosystem by Deepika Achary
A glimpse of test automation in hadoop ecosystem by Deepika AcharyA glimpse of test automation in hadoop ecosystem by Deepika Achary
A glimpse of test automation in hadoop ecosystem by Deepika AcharyQA or the Highway
 
Adaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of EndpointsAdaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of EndpointsPlanetData Network of Excellence
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Serverwebhostingguy
 
RDFa Semantic Web
RDFa Semantic WebRDFa Semantic Web
RDFa Semantic WebRob Paok
 
Big Data Testing Approach - Rohit Kharabe
Big Data Testing Approach - Rohit KharabeBig Data Testing Approach - Rohit Kharabe
Big Data Testing Approach - Rohit KharabeROHIT KHARABE
 
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...Stuart Chalk
 
Search Engines After The Semanatic Web
Search Engines After The Semanatic WebSearch Engines After The Semanatic Web
Search Engines After The Semanatic Websamar_slideshare
 
IRJET- Data Retrieval using Master Resource Description Framework
IRJET- Data Retrieval using Master Resource Description FrameworkIRJET- Data Retrieval using Master Resource Description Framework
IRJET- Data Retrieval using Master Resource Description FrameworkIRJET Journal
 
17-NoSQL.pptx
17-NoSQL.pptx17-NoSQL.pptx
17-NoSQL.pptxlevichan1
 

Similaire à SWT Lecture Session 6 - RDFS semantics, inference techniques, sesame rdfs (20)

Mdb dn 2016_05_index_tuning
Mdb dn 2016_05_index_tuningMdb dn 2016_05_index_tuning
Mdb dn 2016_05_index_tuning
 
Ruleby
RulebyRuleby
Ruleby
 
SWT Lecture Session 5 - RDFS
SWT Lecture Session 5 - RDFSSWT Lecture Session 5 - RDFS
SWT Lecture Session 5 - RDFS
 
Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011
 
A wiki for_business_rules_in_open_vocabulary_executable_english
A wiki for_business_rules_in_open_vocabulary_executable_englishA wiki for_business_rules_in_open_vocabulary_executable_english
A wiki for_business_rules_in_open_vocabulary_executable_english
 
A signature based indexing method for efficient content-based retrieval of re...
A signature based indexing method for efficient content-based retrieval of re...A signature based indexing method for efficient content-based retrieval of re...
A signature based indexing method for efficient content-based retrieval of re...
 
Waters Grid & HPC Course
Waters Grid & HPC CourseWaters Grid & HPC Course
Waters Grid & HPC Course
 
Semantic Web (Web 3.0)
Semantic Web (Web 3.0)Semantic Web (Web 3.0)
Semantic Web (Web 3.0)
 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playout
 
A glimpse of test automation in hadoop ecosystem by Deepika Achary
A glimpse of test automation in hadoop ecosystem by Deepika AcharyA glimpse of test automation in hadoop ecosystem by Deepika Achary
A glimpse of test automation in hadoop ecosystem by Deepika Achary
 
Adaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of EndpointsAdaptive Semantic Data Management Techniques for Federations of Endpoints
Adaptive Semantic Data Management Techniques for Federations of Endpoints
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Server
 
RDFa Semantic Web
RDFa Semantic WebRDFa Semantic Web
RDFa Semantic Web
 
Big Data Testing Approach - Rohit Kharabe
Big Data Testing Approach - Rohit KharabeBig Data Testing Approach - Rohit Kharabe
Big Data Testing Approach - Rohit Kharabe
 
Semantic Web and Linked Open Data
Semantic Web and Linked Open DataSemantic Web and Linked Open Data
Semantic Web and Linked Open Data
 
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...
 
Search Engines After The Semanatic Web
Search Engines After The Semanatic WebSearch Engines After The Semanatic Web
Search Engines After The Semanatic Web
 
Database system Handbook.docx
Database system Handbook.docxDatabase system Handbook.docx
Database system Handbook.docx
 
IRJET- Data Retrieval using Master Resource Description Framework
IRJET- Data Retrieval using Master Resource Description FrameworkIRJET- Data Retrieval using Master Resource Description Framework
IRJET- Data Retrieval using Master Resource Description Framework
 
17-NoSQL.pptx
17-NoSQL.pptx17-NoSQL.pptx
17-NoSQL.pptx
 

Plus de Mariano Rodriguez-Muro

SWT Lecture Session 7 - Advanced uses of RDFS
SWT Lecture Session 7 - Advanced uses of RDFSSWT Lecture Session 7 - Advanced uses of RDFS
SWT Lecture Session 7 - Advanced uses of RDFSMariano Rodriguez-Muro
 
SWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLSWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLMariano Rodriguez-Muro
 
Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...
Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...
Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...Mariano Rodriguez-Muro
 
Introduction to query rewriting optimisation with dependencies
Introduction to query rewriting optimisation with dependenciesIntroduction to query rewriting optimisation with dependencies
Introduction to query rewriting optimisation with dependenciesMariano Rodriguez-Muro
 
OXFORD'13 Optimising OWL 2 QL query rewriring
OXFORD'13 Optimising OWL 2 QL query rewriringOXFORD'13 Optimising OWL 2 QL query rewriring
OXFORD'13 Optimising OWL 2 QL query rewriringMariano Rodriguez-Muro
 
AMW'11 dependencies-sem index-t-mappings
AMW'11 dependencies-sem index-t-mappingsAMW'11 dependencies-sem index-t-mappings
AMW'11 dependencies-sem index-t-mappingsMariano Rodriguez-Muro
 

Plus de Mariano Rodriguez-Muro (16)

SWT Lecture Session 11 - R2RML part 2
SWT Lecture Session 11 - R2RML part 2SWT Lecture Session 11 - R2RML part 2
SWT Lecture Session 11 - R2RML part 2
 
SWT Lecture Session 7 - Advanced uses of RDFS
SWT Lecture Session 7 - Advanced uses of RDFSSWT Lecture Session 7 - Advanced uses of RDFS
SWT Lecture Session 7 - Advanced uses of RDFS
 
SWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLSWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQL
 
SWT Lecture Session 4 - Sesame
SWT Lecture Session 4 - SesameSWT Lecture Session 4 - Sesame
SWT Lecture Session 4 - Sesame
 
4 sesame
4 sesame4 sesame
4 sesame
 
SWT Lecture Session 1 - Introduction
SWT Lecture Session 1 - IntroductionSWT Lecture Session 1 - Introduction
SWT Lecture Session 1 - Introduction
 
ontop: A tutorial
ontop: A tutorialontop: A tutorial
ontop: A tutorial
 
Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...
Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...
Stanford'12 Intro to Ontology Based Data Access for RDBMS through query rewri...
 
Introduction to query rewriting optimisation with dependencies
Introduction to query rewriting optimisation with dependenciesIntroduction to query rewriting optimisation with dependencies
Introduction to query rewriting optimisation with dependencies
 
OXFORD'13 Optimising OWL 2 QL query rewriring
OXFORD'13 Optimising OWL 2 QL query rewriringOXFORD'13 Optimising OWL 2 QL query rewriring
OXFORD'13 Optimising OWL 2 QL query rewriring
 
OWLED'12 Quest
OWLED'12 QuestOWLED'12 Quest
OWLED'12 Quest
 
ODBASE'08 dl-lite explanations
ODBASE'08 dl-lite explanationsODBASE'08 dl-lite explanations
ODBASE'08 dl-lite explanations
 
IMAS'08 obda plugin
IMAS'08 obda pluginIMAS'08 obda plugin
IMAS'08 obda plugin
 
DL'12 dl-lite explanations
DL'12 dl-lite explanationsDL'12 dl-lite explanations
DL'12 dl-lite explanations
 
DL'12 mastro at work
DL'12 mastro at workDL'12 mastro at work
DL'12 mastro at work
 
AMW'11 dependencies-sem index-t-mappings
AMW'11 dependencies-sem index-t-mappingsAMW'11 dependencies-sem index-t-mappings
AMW'11 dependencies-sem index-t-mappings
 

Dernier

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 

Dernier (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 

SWT Lecture Session 6 - RDFS semantics, inference techniques, sesame rdfs

  • 1. + RDFS Semantics, Inference techniques and Sesame Mariano Rodriguez-Muro, Free University of Bozen-Bolzano
  • 2. + Disclaimer  License  This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
  • 3. + Reading material  Foundations of Semantic Web Chapter 3.  Semantic Web for the Working Ontologist. Chapter 8 http://proquest.safaribooksonline.com/book/-/9780123859655
  • 4. + Core concepts  Systems that perform inference are often called reasoning engines or reasoners.  Reasoner engine a system that infers new information based on the contents of a knowledgebase. This can be accomplished using rules and a rule engine, triggers on a database or RDF store, decision trees, tableau algorithms, or even programmatically using hard-coded business logic  A reasoner must be compliant to the semantics of the ontology language it supports  Hence, an ontology language must state it’s semantics in a formal way
  • 5. + Giving semantics to RDFS  Implementing semantics for RDFS  Overview  Using RDFS inference with Sesame
  • 7. + RDFS rule-based semantics  Example: Type propagation through rdfs:subClassOf described as a rule [IF] ?class1 rfds:subClassOf ?class2 AND ?instance rdf:type ?class1 [THEN] ?instance rdf:type ?class2  Subclass transitivity as a rule [IF] ?class1 rfds:subClassOf ?class2 AND ?class2 rfds:subClassOf ?class3 [THEN] ?class1 rdf:type ?class3
  • 8. + RDFS rule-based semantics  The RDFS specification defines RDFS semantics in terms of 26 rules grouped as follows:  RDFS entailment rules core rules, simple “reasonable” entailments (incomplete w.r.t. domain/range/subPropertyOf and subClassOf)  RDFS rdfsensional rules complete the rule set w.r.t. to domain/range/subPropertyOf and subClassOf  Datatype entailment rules covers inference related to datatype’s lexical forms  See http://www.w3.org/TR/rdf-mt/#rules  See Section 3.3 of Foundations of Semantic Web
  • 9. RDFS Entailment Rules + Name Condition Conclusion rdfs1 uuu aaa lll. _:nnn rdf:type rdfs:Literal . where lll is a plain literal (with or without a language tag). where _:nnn identifies a blank node allocated to lll by rule rule lg. rdfs2 aaa rdfs:domain xxx . uuu aaa yyy . uuu rdf:type xxx . rdfs3 aaa rdfs:range xxx . uuu aaa vvv . vvv rdf:type xxx . rdfs4a uuu aaa xxx . uuu rdf:type rdfs:Resource . rdfs4b uuu aaa vvv. vvv rdf:type rdfs:Resource . rdfs5 uuu rdfs:subPropertyOf vvv . vvv rdfs:subPropertyOf xxx . uuu rdfs:subPropertyOf xxx . rdfs6 uuu rdf:type rdf:Property . uuu rdfs:subPropertyOf uuu . rdfs7 aaa rdfs:subPropertyOf bbb . uuu aaa yyy . uuu bbb yyy .
  • 10. RDFS Entailment Rules (cont.) + Name Condition Conclusion rdfs8 uuu rdf:type rdfs:Class . uuu rdfs:subClassOf rdfs:Resource . rdfs9 uuu rdfs:subClassOf xxx . vvv rdf:type uuu . uuu rdf:type xxx . rdfs10 uuu rdf:type rdfs:Class . uuu rdfs:subClassOf uuu . rdfs11 uuu rdfs:subClassOf vvv . vvv rdfs:subClassOf xxx . uuu rdfs:subClassOf xxx . rdfs12 uuu rdf:type rdfs:ContainerMembershipProperty . uuu rdfs:subPropertyOf rdfs:member . rdfs13 uuu rdf:type rdfs:Datatype . uuu rdfs:subClassOf rdfs:Literal .
  • 11. RDFS extensional entailment rules + Name Condition Conclusion ext1 uuu rdfs:domain vvv . vvv rdfs:subClassOf zzz uuu rdfs:domain zzz . ext2 uuu rdfs:range vvv . vvv rdfs:subClassOf zzz . uuu rdfs:range zzz . ext3 uuu rdfs:domain vvv . www rdfs:subPropertyOf uuu . www rdfs:domain vvv . ext4 uuu rdfs:range vvv . www rdfs:subPropertyOf uuu . www rdfs:range vvv . ext5 rdf:type rdfs:subPropertyOf www . www rdfs:domain vvv . rdfs:Resource rdfs:subClassOf vvv . ext6 rdfs:subClassOf rdfs:subPropertyOf www . www rdfs:domain vvv . rdfs:Class rdfs:subClassOf vvv . ext7 rdfs:subPropertyOf rdfs:subPropertyOf www . www rdfs:domain vvv . rdf:Property rdfs:subClassOf vvv . ext8 rdfs:subClassOf rdfs:subPropertyOf www . www rdfs:range vvv . rdfs:Class rdfs:subClassOf vvv . ext9 rdfs:subPropertyOf rdfs:subPropertyOf www . www rdfs:range vvv . rdf:Property rdfs:subClassOf vvv .
  • 12. + Datatype entailment rules Name Condition Conclusion rdfsD1 ddd rdf:type rdfs:Datatype . uuu aaa "sss"^^ddd . _:nnn rdf:type ddd . where _:nnn identifies a blank node allocated to "sss"^^ddd by rule rule lg. rdfsD2 ddd rdf:type rdfs:Datatype . uuu aaa "sss"^^ddd . uuu aaa "ttt"^^ddd rdfsD3 ddd rdf:type rdfs:Datatype . eee rdf:type rdfs:Datatype . uuu aaa "sss"^^ddd . uuu aaa "ttt"^^eee .  Note, infinite number of rules!  Semantics by rules is easy to understand (most of them), but “hacky”
  • 13. + Other semantics for RDFS  RDFS rule-based semantics are SYNTACTIC, easy to understand, implemented everywhere  Syntactic rules are prone to incompleteness (several passes were necessary to fix RDFS rule-based semantics)  Sometimes not-intuitive  RDFS also has model-theoretic semantics, clear semantics based on set theory  Won’t see them in this course, see Chapter 3 in Foundations of Semantic Web
  • 14. + Rule-based inference  Basic idea, describe all mandatory inferences as rules.  A rule describes how new information based on the current state of the data/knowledge base. IF a holds in the data Then b holds in the data Pre-condition conclusion  Rule based inference cannot be used for ANY language., (key factors, non-determinism and termination)  They are enough to capture the semantics of RDFS
  • 16. + Implementing RDFS semantics  Most (really, almost all) reasoners that implement RDFS semantics use one (or both) of the following techniques  Forward chaining Deduction calculus for all the rules in the RDFS rules.  Backward chaining Looking for all possible facts from which we may derive the conclusion
  • 17. + Forward chaining  Objective: Is fact X implied by the data?  How: Pre-compute all implied facts, then just check if fact X is there  How it works    Works at “load” time Infers new facts based on the existing ones Continues applying inferences until reaching a fix point (graphs are sets)  New facts are added “immediately” to the repository  Natural match to RDFS rule-based semantics
  • 18. + Forward chaining  How it works  Works at “load” time  Infers new facts based on the existing ones  Continues applying inferences until reaching a fix point (graphs are sets)  New facts are added “immediately” to the repository  Natural match to RDFS rule-based semantics Complex interactions in forward chaining
  • 19. + Forward chaining, cons and pros  Pros   Rules are already given by the RDFS rule-based semantics   Easy to implement Retrieval is FAST (also query answering) Cons  Adds a lot of new information (maybe not necessary)  Extra space  Extra time  Updates are VERY complicated (truth maintenance)
  • 21. + Forward chaining, cons and pros  Pros     Cons      Easy to implement Rules are already given by the RDFS rule-based semantics Retrieval is FAST (also query answering) Adds a lot of new information (maybe not necessary) Extra space Extra time Updates are VERY complicated (truth maintenance) Possible optimizations: application order, parallelism (often incomplete)
  • 22. + Backward chaining  Objective: is fact X implied by the data?  How: Compute the facts that would be necessary for fact X to be implied, verify if any of those conditions is true.
  • 23. + Forward chaining, cons and pros  Pros   No data is generated, no extra loading time   Easy to implement Simple update management or truth maintenance Cons    Retrieval is slower Fast query time may require complex optimization techniques Possible optimizations: caching, low level indexes
  • 24. + Forward or Backward  Key aspects in deciding for forward or backward chaining:  Loading time  Query time  Space constraints  Updates
  • 25. + Any other ways to implement with RDFS semantics  There are other, more efficient methods  Not implemented in common frameworks  More to come in this course
  • 26. + RDFS reasoning in Sesame Easy
  • 27. + Sesame RDFS Sail  RDFS entailments are implemented using a SAIL  The sail is a ForwardChainingRDFSInferencer  On load time it will perform forward chaining
  • 28. + Sesame RDFS Sail  RDFS entailments are implemented using a SAIL  The sail is a ForwardChainingRDFSInferencer  On load time it will perform forward chaining
  • 29. + Setting it up  Create the repository of your choice and attach the sail Repository myRepository = new SailRepository( new ForwardChainingRDFSInferencer( new MemoryStore())); myRepository.initialize();  As with any forward chaining inference engine, load time will be affected by the use of this sail
  • 30. + Sesame RDFS in the console  In the console, simply create the pre-configured repos:  in-memory-rdfs  native-rdfs-types
  • 31. + Sesame and reasoning  Sesame’s native support for inferences is poor, only RDFS  Performance is not great  Options on large scenarios: OWLIM

Notes de l'éditeur

  1. soundness, completeness, termintion
  2. soundness, completeness, termintion
  3. soundness, completeness, termintion
  4. soundness, completeness, termintion
  5. soundness, completeness, termintion
  6. soundness, completeness, termintion
  7. soundness, completeness, termintion
  8. soundness, completeness, termintion
  9. soundness, completeness, termintion
  10. soundness, completeness, termintion
  11. soundness, completeness, termintion
  12. soundness, completeness, termintion
  13. soundness, completeness, termintion
  14. soundness, completeness, termintion
  15. soundness, completeness, termintion
  16. soundness, completeness, termination
  17. soundness, completeness, termintion