Re: SPARQL and the owl web language

(Sorry, not on this list. Just happened to see this by happenstance.)

> From: Matt Williams <matthew.williams@cancer.org.uk>
> Subject: Re: SPARQL and the owl web language
> Date: Sat, 18 Mar 2006 13:58:52 +0000
>
> > Dear Claudio,
> >
> > No, sensible questions, I think.
> >
> > AFAIK (corrections welcome) SPARQL will not return OWL (or RDFS)
> > inferences. However, if you run a reasoner (e.g. Pellet, KOAN2, 
> Racer,
> > FACT ++) over the rdf graph, then it will make new inferences, and 
> then
> > you could query the inferred graph.
>
> Well, this is quite problematic.  The set of OWL inferences over an 
> RDF graph
> is infinite, so directly querying is out.  Even if you think of the 
> graph as
> only virtually being there, there are many other problems, some of 
> which have
> been discussed in the DAWG.

Let's chuck the "virtual graph" lingo right now. It's been a confusion 
from the start. Query answers in SPARQL are defined in terms of 
entailment:
	http://www.w3.org/TR/rdf-sparql-query/#BasicGraphPatternMatching

And does not cover owl, though there is an extensibilty hook for it:
	"""This specification covers only simple entailment [RDF-MT] as 
E-entailment. Examples of other E-entailment regimes are RDF entailment 
[RDF-MT], RDFS entailment [RDF-MT], OWL entailment [OWL-Semantics]."""

Now, theoretically, there may be some expressive supersets of RDF that 
you could hack into the current SPARQL model (RDFS, perhaps) via some 
notion of a completion under rules, blah blah. Don't bother! If you 
have some implementation technique or what have you, keep it to 
yourself :)

Now, systems like Pellet, KAON2, and RACER (and, I believe cerebra) 
offer various sorts of conjunctive ABox query. It is convenient to use 
SPARQL Graph Patterns as the surface syntax for these queries, and to 
use the SPARQL algebra to combine and filter the results of such 
queries. This is what Pellet and KAON2 do, to various extents. Racer is 
going to do this (according to 
<http://www.racer-systems.com/products/racerpro/features.phtml>). I 
don't know Cerebra's plans.

> > However, happily, Pellet contains a SPARQL query function that takes
> > SPARQL queries and does the inferencing bit for you.
>
> I'm not sure how Pellet sidesteps the problems using SPARQL and OWL.  
> I'll let
> the Pellet team speak for themselves.

Note some restrictions. Only tree like queries (the decision problem 
for cyclic conjunctive queries over SHOIQ ABoxes is still open, I 
believe). No mixed TBox or ABox queries (well, we actually have some 
unexposed, preliminary support with a better approach coming). I 
*believe* KAON2 only supports queries with all distinguished variables, 
whereas pellet has support for true distinguished variables. (Though, 
the current version is a bit broken in how it interprets what marks a 
variable as distinguished; this was a change in SPARQL that we've not 
caught up with yet.) Performance varies between the two, depending on 
ontology, query, and tester :)

> [...]
>
> > My suggestion would be Pellet.

Pellet has the advantage of being free and open source :)

You can test queries with the online demo:
	http://www.mindswap.org/2003/pellet/demo.shtml

There is also a query window in Swoop that uses Pellet.

Cheers,
Bijan Parsia.

Received on Sunday, 26 March 2006 23:24:24 UTC