On 27/03/14 04:31, Adeeb Noor wrote:
Hi All:
I have a question about the the differences between a reasoner and
sparqlUpdates. Are one better than the other ?
Is a water melon better than a kumquat? Depends on what you want.
Are they functionally
different ?
Oh yes.
I feel that everything I need to do with Pellet reasoner, which consumes
too much time. is easily and time effective with sparqlUpdates.
Please help me with that as I am in the middle and really do not know if I
should just get out of the reasoner because of time consuming.
Since you've not said what you want out of reasoning it is hard to be
specific.
Using something like Sparql Update allows you to deduce one set of
triples from the existing set. Repeatedly doing this allows you to make
further deductions. So repeatedly running a set of Sparql Updates until
you see no further changes is a brute force way to implement a variant
of rule based inference.
(1) For simple cases (like most of RDFS inference) this is not only
sufficient but you probably don't have to iterate very many times in
practice (once may even be sufficient) so it can be better performance
than more general alternatives. In particular it's more scalable because
you are keeping no state other than the internal iteration state of the
Sparql Update.
(2) For some cases then such a rule based inference is sufficient but a
little more complex. For example OWL has the OWL/RL profile which
captures most of what OWL inferences can be usefully done using rules.
However you may have to iterate your rules/updates a lot to get the
answers and repeated Sparql Updates will redo work on each iteration.
For cases where one rule triggers another rule then people invented
things like RETE which keep a lot of state around so one change (either
external or the result of a rule firing) can trigger the next change
directly without have to re-run all the queries. For some rule sets and
data this can be a *lot* more efficient than repeated query-and-update,
for some cases it can be less efficient or at least not worth the
storage overhead.
(3) Complete OWL inference can't be done with such rules. There are
consequences of the OWL semantics that can't be found that way. You can
express interesting logic problems in OWL ranging from sudoku to serious
medical diagnosis tasks. Hence the need for specialist reasons like DL
reasoners as implemented by Pellet.
The questions you have to answer for yourself are: why do you want to
use a reasoner, what effect are you trying to achieve, what is the most
appropriate way to achieve that?
If you want to see a few simple deductions like domain/range or direct
sub-class inference, and if your data is largely static then Sparql
Update will be fine.
If you need slightly more complex inference and/or you'll be adding new
triples to your data and want to efficiently compute the consequences
incrementally then consider using a rule system.
If you are working with OWL and you need completeness, you need to
guarantee that all inferences are made and that all contradictions are
detected then you need something like Pellet. Ontology checking would be
a good example of this.
Dave