Is anybody familiar with a way to add reasoning on top of an existing SPARQL endpoint ? I can think about a component called "SPARQL Endpoint Reasoning Decorator", that will have a backward chaining reasoner. The Reasoning Decorator will itself be a SPARQL endpoint. It will receive a SPARQL query, apply the backward chaining reasoner to the query, according to some ontology - rewrite the query and send the rewritten query to the original SPARQL endpoint. This way, the inferred data will not be materialized in the decorator - no additional memory/storage will be required.

Here is a diagram to illustrate the question:

alt text

A solution could be similar to using InfModel of Jena on top of an existing Jena Model (InfModel is the Reasoning Decorator in this case). Is there a way to create Jena Model on top of existing SPARQL endpoint, without materializing the triples served by the endpoint ?

Any ideas/tips are welcome.

asked 06 Nov '12, 09:39

Vadim%20Eisenberg's gravatar image

Vadim Eisenberg
accept rate: 0%

edited 09 Nov '12, 05:07


It would seem important to note the SPARQL 1.1 Entailment Regime Candidate Recommendation here.

Also, you would probably need to pick an OWL profile to reason over. For example, conjunctive query answering over OWL (2) DL is not known to be decidable.

(20 Nov '12, 18:48) Signified ♦ Signified's gravatar image

OWL2 QL is very amenable to query re-writing (you can do rewriting for all the profiles, but QL is an easy place to start), so you could easily put something in front of a SPARQL endpoint, rewrite the incoming queries, and forward those onto the endpoint. As you point out, this is the decorator pattern for reasoning & an endpoint. You could even do this client side and sent the rewritten queries directly to the endpoint if you don't have the ability to edit the endpoint itself, for example, the DBPedia public endpoint.

As you illustrated in your diagram, all your rewriter really needs is the ontology. I don't know of anything out of the box you could splat on top of existing Jena models, but I think you'd want to hook in via ARQ rather than a Model (Jena folks can correct me if I'm wrong). You might be able to implement the rewriting as an optimization to ARQ's internal query algebra, which after rewriting, can be passed onto the Model for querying giving the the reasoning support you're looking for.

There's a lot of scholarly work on how to best perform rewriting, and some of the more academically inclined folks on here might be able to point you to some good papers to read to get you started.

permanent link

answered 09 Nov '12, 11:17

mhgrove's gravatar image

accept rate: 29%

This appears to be just the kind of processing one can do with SPARQLMotion, which is basically a RDF data processing pipeline technology. See TopBraid SPARQLMotion for more. It would be pretty easy to set up and would look a lot like your diagram when finished, with each box representing a module - read in ontology, read in rules (in addition to reasoner), process via a reasoner, and output results in SPARQL Endpoint format as XML, JSON, csv or tsv. The edges would represent the order in which the actions occurred.

Well worth consideration for this use case. Disclosure: I work for TopQuadrant.

permanent link

answered 21 Nov '12, 13:46

scotthenninger's gravatar image

scotthenninger ♦
accept rate: 17%

edited 21 Nov '12, 14:50

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Nov '12, 09:39

question was seen: 2,134 times

last updated: 21 Nov '12, 14:50