copyright 2007 larkc early adopters rule-based reasoner prototype barry bishop sti innsbruck
TRANSCRIPT
Copyright 2007
LarKC Early Adopters
Rule-based Reasoner Prototype
Barry BishopSTI Innsbruck
Introduction
• Purpose:– show how a pipeline of plug-ins fit together– show wrappingg an existing reasoner (IRIS)– demonstrate anytime behaviour
• Rule-based reasoning in LarKC– setup an eclipse project with prototype plug-ins– execute some queries– change the statements to be reasoned with– WEB RDF documents => Linked Life Data– modify entailment rules
2
18/05/2009
18/05/2009
Rule-based Reasoning
• Rule-based reasoning is– Reasoning with formalisms whose semantics can
be captured in (Horn) rules– i.e. if X and Y then Z
• This is useful in LarKC because– RDF, RDFS, L2, etc have rule-based semantics
3
Entailment Rules
• Example rules:
4
/* rdfp3 */triple(?v, ?p, ?w) :- triple(?w, ?p, ?v), triple(?p, _iri('rdf:type'), _iri('owl:SymmetricProperty')).
/* rdfp7 */triple(?u, _iri('owl:sameAs'), ?w) :- triple(?u, _iri('owl:sameAs'), ?v), triple(?v, _iri('owl:sameAs'), ?w).
18/05/2009
Getting Started
• Required software– Java JDK 1.6– eclipse
• Import LarKC eclipse projects– file menu -> import– choose general -> existing projects in to workspace– select "copy projects into workspace"
• platform• plugins• pipelines
5
18/05/2009
Execute a query
• Step 1: In the project 'pipelines' run the class:– rule-scenario/src/.../ConfigurableSimplePipeline– set max heap size: -Xmx1024m
• If you have an internet connection, then you should see several iterations of pipeline output
• Plug-ins used:– sparql to triple pattern query transformer– sindice identifier– growing data selecter– IRIS reasoner plug-in (with no rules)
6
18/05/2009
Different Data
• Step 2: Switch to some local data– http://dev.isb-sib.ch/projects/uniprot-rdf/
• Use the SimpleFileReaderIdentifier to read in some uniprot data-sets
• Use the IRIS reasoner plug-in, but without any rules yet
• Execute a query to get all triples– two iterations of pipeline– ~9800 triples
7
18/05/2009
Change Inference Rules
• Step 3: Switch on inference– RDF, L2 or RDFS– Output: More triples (~28000 for RDFS)
• Step 4: Look for sub-classes of 'pathway 402'– No inference: ~50 sub-classes
• Step 5: Look for sub-classes of 'pathway 402'– With inference (RDFS): 238 sub-classes
8
18/05/2009
Create Inference Rule
• Step 6: Sub-classes of self– Output (any entailment): Nothing!– Why?– Look for ':Class' in core.owl
• Step 7: Fix– Copy L2_entailment.rules to L2_plus.rules– Add this:– triple(_iri("owl:Class"),_iri("rdfs:subClassOf"),_iri("rdfs:Class")) :- .
– Use the new rule-file and re-run– Now we see the inferences!
9
18/05/2009
Summary
• You have:– seen a handful of LarKC plug-ins– used them together in a simple pipeline– swapped plug-ins– experimented with rule-based reasoning
10
18/05/2009