If you don't have to use a reasoner you can easily make the copy of the data 
and the inference work with SPARQL queries.

An INSERT WHERE query could allow you to copy some type of data to a target 
graph (it exists a COPY query too, if you want to copy an entire graph 
directly), and you can run inference only on this targeted graph by the use of 
queries like this one :

#rdfs inference of symmetric triples.

INSERT { graph <inference graph> {?o ?p ?s} }

WHERE{
    graph <targeted graph> { ?s ?p ?o}.
    ?p rdf:type SymetricPropery
}


The inference graph at the end will contain all the inferred triples.

Hope this could help you ! 

VAÏSSE-LESTEVEN Arthur.



________________________________
 De : David Jordan <[email protected]>
À : [email protected] 
Envoyé le : Vendredi 23 août 2013 2h03
Objet : inferencing a small subset of a graph
 


The default Jena reasoner performs inference on an entire graph. For a very 
large graph, this inferencing can be fairly expensive. I got asked today 
whether there is any way to just do inferencing on a small subset of a very 
large graph.

I am wondering whether it would be feasible and make sense to create a new 
in-memory graph and then essentially make a copy of the relevant triples from 
the very large graph into this in-memory graph, and then perform inferencing 
just on that small graph. The purpose is to answer a query or question on a 
small subset of the graph without incurring the overhead of doing it for the 
entire graph.

Is this a common practice? Best practice? Are there any recommended ways to 
efficiently implement the copy process from the stored graph into the in-memory 
graph?

If I could get a response by noon EST Friday, that would be great, as I have a 
presentation at 1 that this may come up.

Reply via email to