You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Jeffrey Kenneth Tyzzer <jk...@ucdavis.edu.INVALID> on 2020/09/18 06:23:13 UTC

Two questions about Fuseki reasoner

Hello, Group.

I have two questions re: the Fuseki reasoner (we’re using v.3.14.0 but the questions are, I think, version-agnostic):


  1.  Five or so years ago, Andy wrote<https://users.jena.apache.narkive.com/rqCd9MTM/rdfs-inference-in-fuseki-w-tdb> re: persisting entailments for performance gains that "[i]n the current codebase the only two options are using [the] in-memory reasoner or forward-chaining the data when it is loaded."



Is it still the case that the reasoner can only be in-memory?



  1.  Via tdb2.tdbquery –explain,  I was hoping to be able to be able to get some insights into how the reasoner might affect the query plan of a query against TDB2-based data, but according to this<https://users.jena.apache.narkive.com/Gq5M7ZCT/inference-on-tdbquery>, “inference results are purely in memory and not part of the TDB data.”



Does this mean there’s no way to see/report the effect of the inferencer’s entailments on a given query (outside of writing Java ModelFactory code)?

The task at hand is, beginning with a fairly elaborate extant ontology, prune it down to the bare minimum required by the application that’ll use it. This process will be iterative, with repeated testing of different combinations of the ontology’s extent and the right reasoner among those supported by Fuseki, e.g., OWLMicroFBRuleReasoner.

Thank you.

--Jeff

Re: Two questions about Fuseki reasoner

Posted by Jeffrey Kenneth Tyzzer <jk...@ucdavis.edu.INVALID>.
Thank you, Dave.

Judging by subsequent questions on the users list there's a fair amount of interest in option 2 ("query the union....").

--Jeff

On 9/20/20, 4:12 AM, "Dave Reynolds" <da...@gmail.com> wrote:

    On 18/09/2020 07:23, Jeffrey Kenneth Tyzzer wrote:
    > Hello, Group.
    > 
    > I have two questions re: the Fuseki reasoner (we’re using v.3.14.0 but the questions are, I think, version-agnostic):
    > 
    > 
    >    1.  Five or so years ago, Andy wrote<https://users.jena.apache.narkive.com/rqCd9MTM/rdfs-inference-in-fuseki-w-tdb> re: persisting entailments for performance gains that "[i]n the current codebase the only two options are using [the] in-memory reasoner or forward-chaining the data when it is loaded."
    > 
    > 
    > 
    > Is it still the case that the reasoner can only be in-memory?

    Yes.

    You can, in principle, copy the inference closure to another graph, 
    persist that in TDB and then at runtime query the union of the base and 
    closure graph without inference but (a) that requires code and (b) 
    that's only useful for static data.

    >    1.  Via tdb2.tdbquery –explain,  I was hoping to be able to be able to get some insights into how the reasoner might affect the query plan of a query against TDB2-based data, but according to this<https://users.jena.apache.narkive.com/Gq5M7ZCT/inference-on-tdbquery>, “inference results are purely in memory and not part of the TDB data.”
    > 
    > Does this mean there’s no way to see/report the effect of the inferencer’s entailments on a given query (outside of writing Java ModelFactory code)?

    Correct. TDB and thus tdbquery know nothing about inference. If some 
    inference closure has been performed before loading then to TDB it is 
    just dealing with more triples. If you have a base model in TDB and 
    configure inference over the top then the inference results are computed 
    in memory by the InfGraph and the TDB base model doesn't see any of that.

    Dave


Re: Two questions about Fuseki reasoner

Posted by Dave Reynolds <da...@gmail.com>.
On 18/09/2020 07:23, Jeffrey Kenneth Tyzzer wrote:
> Hello, Group.
> 
> I have two questions re: the Fuseki reasoner (we’re using v.3.14.0 but the questions are, I think, version-agnostic):
> 
> 
>    1.  Five or so years ago, Andy wrote<https://users.jena.apache.narkive.com/rqCd9MTM/rdfs-inference-in-fuseki-w-tdb> re: persisting entailments for performance gains that "[i]n the current codebase the only two options are using [the] in-memory reasoner or forward-chaining the data when it is loaded."
> 
> 
> 
> Is it still the case that the reasoner can only be in-memory?

Yes.

You can, in principle, copy the inference closure to another graph, 
persist that in TDB and then at runtime query the union of the base and 
closure graph without inference but (a) that requires code and (b) 
that's only useful for static data.

>    1.  Via tdb2.tdbquery –explain,  I was hoping to be able to be able to get some insights into how the reasoner might affect the query plan of a query against TDB2-based data, but according to this<https://users.jena.apache.narkive.com/Gq5M7ZCT/inference-on-tdbquery>, “inference results are purely in memory and not part of the TDB data.”
> 
> Does this mean there’s no way to see/report the effect of the inferencer’s entailments on a given query (outside of writing Java ModelFactory code)?

Correct. TDB and thus tdbquery know nothing about inference. If some 
inference closure has been performed before loading then to TDB it is 
just dealing with more triples. If you have a base model in TDB and 
configure inference over the top then the inference results are computed 
in memory by the InfGraph and the TDB base model doesn't see any of that.

Dave