You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2018/02/28 09:04:00 UTC

[jira] [Updated] (JENA-1496) Inference with SPARQL and GenericRuleReasoner gives different results

     [ https://issues.apache.org/jira/browse/JENA-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne updated JENA-1496:
--------------------------------
    Issue Type: Question  (was: Bug)

> Inference with SPARQL and GenericRuleReasoner gives different results
> ---------------------------------------------------------------------
>
>                 Key: JENA-1496
>                 URL: https://issues.apache.org/jira/browse/JENA-1496
>             Project: Apache Jena
>          Issue Type: Question
>    Affects Versions: Jena 3.6.0
>            Reporter: Arhs Team
>            Priority: Minor
>         Attachments: DemoApplication.java
>
>
> Hi,
> we are trying to manually infer some properties based on the SKOS definition. Some of our models are huge and cannot be handled by Jena.
> We tried OWL reasoner (+micro, +mini) and binding the SKOS definition with bindSchema, we also tried the GenericRuleReasoner with OWL reasoning capabilities but nothing worked. Some inference never finished, was too slow or the memory consumption was too big.
> We are now trying to do a lightweight inference of some properties with SPARQL queries or Rules defined in the GenericRuleReasoner (without OWL reasoning). In the rules, we manually create the triples we need : a skos:narrower b -> b skos:broader a, we don't define skos:narrower owl:subPropertyOf skos:broader since we don't have reasoning capabilities enabled.
> We tried a few things and we found some inconsistencies between how a model is updated with SPARQL queries and the GenericRuleReasoner if the object is a resource or a literal.
> The attached DemoApplication.java gives the following result:
> ---------------------------------------------------------------------
> ==== Test adding reasoner inferred object literal - not added
> Size model 1, print : 
> <http://url.com/one>  <http://www.w3.org/2008/05/skos-xl#literalForm> "http://url.com/two" .
> Size inf 2, print : 
> <http://url.com/one>  <http://www.w3.org/2008/05/skos-xl#literalForm> "http://url.com/two" .
> Add inf to model
> Size new model 1, print : 
> <http://url.com/one>  <http://www.w3.org/2008/05/skos-xl#literalForm> "http://url.com/two" .
> Size deduction model : 1
> ==== Test adding reasoner inferred object resource - added
> Size model 1, print : 
> <http://url.com/one>  <http://www.w3.org/2008/05/skos-xl#literalForm> <http://url.com/two> .
> Size inf 2, print : 
> <http://url.com/two>  a  <http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral> .
> <http://url.com/one>  <http://www.w3.org/2008/05/skos-xl#literalForm> <http://url.com/two> .
> Add inf to model
> Size new model 2, print : 
> <http://url.com/one>  <http://www.w3.org/2008/05/skos-xl#literalForm> <http://url.com/two> .
> <http://url.com/two>  a  <http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral> .
> Size deduction model : 1
> ==== Test adding sparql inferred object literal - construct model empty
> Size model 1
> Size construct model 0
> Add construct model to model
> Size new model 1
> ==== Test adding sparql inferred object resource - added 
> Size model 1
> Size construct model 1
> Add construct model to model
> Size new model 2
> ---------------------------------------------------------------------
> When the object is a resource, a new triple is inferred, visible and can be added to another model for both SPARQL update or GenericRuleReasoner.
> When the object is a literal, the SPARQL construct query doesn't return anything, the GenericRuleReasoner infers a triple but it is not visible when printing the model and we cannot add the triple to another model. With the generic rule reasoner, we can still see that there is a triple inferred in the deduction model but we cannot do anything with it.
> This is causing some troubles for us because we don't know how to handle that kind of scenarios based on invalid initial query/rule. 
> Thank you.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)