Martynas Jusevičius
2016-11-27 20:24:08 UTC
Hey all,
I have a rule that does what I need using GenericRuleReasoner, but I
am still struggling with performance.
It might not be a problem with the engine but with the rule itself,
which is more OO-like. The latest version goes like this:
[inh: (?class rdf:type
<http://www.w3.org/2000/01/rdf-schema#Class>), (?class ?p ?o), (?p
rdf:type <http://www.w3.org/ns/ldt#InheritedProperty>), (?subClass
rdfs:subClassOf ?class), (?subClass rdf:type
<http://www.w3.org/2000/01/rdf-schema#Class>), noValue(?subClass ?p)
-> (?subClass ?p ?o) ]
Dave had suggested how to optimize them, but noValue() is the
problematic bit, as I understand:
https://mail-archives.apache.org/mod_mbox/jena-users/201606.mbox/%***@gmail.com%3E
I think however instead of optimizing the rule, I will rather write a
standalone optimized Reasoner which hardcodes it, as performance is
crucial at this level.
So the question is: is there some base Reasoner that can be extended
for that purpose? It will need to traverse the subclass hierarchy.
Could it be the TransitiveReasoner?
https://jena.apache.org/documentation/inference/#transitive
Thanks,
Martynas
I have a rule that does what I need using GenericRuleReasoner, but I
am still struggling with performance.
It might not be a problem with the engine but with the rule itself,
which is more OO-like. The latest version goes like this:
[inh: (?class rdf:type
<http://www.w3.org/2000/01/rdf-schema#Class>), (?class ?p ?o), (?p
rdf:type <http://www.w3.org/ns/ldt#InheritedProperty>), (?subClass
rdfs:subClassOf ?class), (?subClass rdf:type
<http://www.w3.org/2000/01/rdf-schema#Class>), noValue(?subClass ?p)
-> (?subClass ?p ?o) ]
Dave had suggested how to optimize them, but noValue() is the
problematic bit, as I understand:
https://mail-archives.apache.org/mod_mbox/jena-users/201606.mbox/%***@gmail.com%3E
I think however instead of optimizing the rule, I will rather write a
standalone optimized Reasoner which hardcodes it, as performance is
crucial at this level.
So the question is: is there some base Reasoner that can be extended
for that purpose? It will need to traverse the subclass hierarchy.
Could it be the TransitiveReasoner?
https://jena.apache.org/documentation/inference/#transitive
Thanks,
Martynas