[
https://issues.apache.org/jira/browse/JENA-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16379994#comment-16379994
]
Andy Seaborne commented on JENA-1496:
-------------------------------------
{{rdf:plainLiteral}} should not appear in RDF at all. It is for translation
with other systems when RDF 1.0 did not have datatypes for the plain literals
strings and language literals. RDF 1.1 changed that. All literals have
datatypes.
> 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:
> {noformat}
> ==== 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
> {noformat}
> 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)