You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Beaudet, David" <D-...@NGA.GOV.INVALID> on 2021/12/21 17:56:34 UTC

Re: Missed inference in Jena Fuseki

Hello,

In 2020, there was a question to the list (see below) about inference and queries involving predicates that have an owl:inverseOf and I think I'm running into a similar issue with crm:P46_is_composed_of vs. crm:P46i_forms_part_of where the latter is not resolving in SPARQL queries using any of the OWL or RDFS Jena reasoners.

Was a ticket ever created for to investigate this further?  Is duplicating the inverted predicates in the data still the recommend approach?  The Jena documentation seems to suggest that (all?) of the built-in reasoners have support for owl:inverseOf although in practice is that actually the case?

I can provide a full working example with code and data for the latest Jena snapshot if it would help.

Thanks,

Dave Beaudet



Hello, I'm using Jena Fuseki 3.13.1 (with OWLFBRuleReasoner), and I have asserted (uploaded) the following triples: @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema>> . @prefix owl: <http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl>> . @prefix f: <http://vleo.net/family#<http://vleo.net/family>> . f:Bob f:hasWife f:Alice . f:Bob f:hasWife f:Alice2 . f:Alice2 f:hasHusband f:Bob2 . f:hasWife a owl:FunctionalProperty . f:hasWife a owl:InverseFunctionalProperty . f:hasHusband owl:inverseOf f:hasWife . Now, If I query and ASK { f:Alice owl:sameAs f:Alice2 }, I get true. However, If I ASK { f:Bob owl:sameAs f:Bob2 }, I get false! Loading the same triples on another reasoner (owl-rl), I get the triple f:Bob owl:sameAs f:Bob2 inferred. I have asked this very question on StackOverflow (https://stackoverflow.com/questions/59603569/jena-fuseki-missed-inference?noredirect=1#comment105379894_59603569 <https://stackoverflow.com/questions/59603569/jena-fuseki-missed-inference?noredirect=1#comment105379894_59603569>), and I got pointed out to the owl-fb rules file. Tweaking it a bit I noticed that If I explicitly add the forward version of inverseOf, I get that f:Bob owl:sameAs f:Bob2: [inverseOf2b: (?P owl:inverseOf ?Q), (?X ?P ?Y) -> (?Y ?Q ?X) ] Am I missing something? Best regards, Andrea Leofreddi

Re: Missed inference in Jena Fuseki

Posted by Andy Seaborne <an...@apache.org>.

On 21/12/2021 17:56, Beaudet, David wrote:
> 
> Hello,
> 
> In 2020, there was a question to the list (see below) about inference and queries involving predicates that have an owl:inverseOf and I think I'm running into a similar issue with crm:P46_is_composed_of vs. crm:P46i_forms_part_of where the latter is not resolving in SPARQL queries using any of the OWL or RDFS Jena reasoners.
> 
> Was a ticket ever created for to investigate this further?  Is duplicating the inverted predicates in the data still the recommend approach?  The Jena documentation seems to suggest that (all?) of the built-in reasoners have support for owl:inverseOf although in practice is that actually the case?
> 
> I can provide a full working example with code and data for the latest Jena snapshot if it would help.
> 
> Thanks,
> 
> Dave Beaudet
> 
> 
> 

which is

https://lists.apache.org/thread/bz4tmrvqh94f8n8b61755wy1tmdz9vh6

which has an explanatory reply.

> Hello, I'm using Jena Fuseki 3.13.1 (with OWLFBRuleReasoner), and I have asserted (uploaded) the following triples: @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema>> . @prefix owl: <http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl>> . @prefix f: <http://vleo.net/family#<http://vleo.net/family>> . f:Bob f:hasWife f:Alice . f:Bob f:hasWife f:Alice2 . f:Alice2 f:hasHusband f:Bob2 . f:hasWife a owl:FunctionalProperty . f:hasWife a owl:InverseFunctionalProperty . f:hasHusband owl:inverseOf f:hasWife . Now, If I query and ASK { f:Alice owl:sameAs f:Alice2 }, I get true. However, If I ASK { f:Bob owl:sameAs f:Bob2 }, I get false! Loading the same triples on another reasoner (owl-rl), I get the triple f:Bob owl:sameAs f:Bob2 inferred. I have asked this very question on StackOverflow (https://stackoverflow.com/questions/59603569/jena-fuseki-missed-inference?noredirect=1#comment105379894_59603569 <https://stackoverflow.com/questions/59603569/jena-fuseki-missed-inference?noredirect=1#comment105379894_59603569>), and I got pointed out to the owl-fb rules file. Tweaking it a bit I noticed that If I explicitly add the forward version of inverseOf, I get that f:Bob owl:sameAs f:Bob2: [inverseOf2b: (?P owl:inverseOf ?Q), (?X ?P ?Y) -> (?Y ?Q ?X) ] Am I missing something? Best regards, Andrea Leofreddi
>