Hi,

Your email came through too scrambled to read but ...

On 16/04/16 18:26, Abduladem Eljamel wrote:
Hi,,I am not sure if I am using Jena reasoning and rules correctly. I could not 
get any results after following some of examples in jena website. This one of 
the codes which I do not know where is wrong in it:
OntModel schema = 
ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF);

Probably best to make that plain OWL_MEM, at least to begin with otherwise you have the OWL reasoner running underneath a generic rule reasoner which will complicate your debugging.

.schema.add(kwakeb, employerOfNAry, rel01);

What are the values of all these variables? Especially employerOfNAry?

You haven't shown us the rest of your code.

schema.add(rel01, hasRelationValue, hadi);
String ruleSrc ="[r1: (?org employerOfNAry ?nary) (?nary hasRelationValue ?per) -> 
(?org employerOf  ?per)] ";List rules = Rule.parseRules(ruleSrc);

This is using "employerOfNAry" as the predicate in the rule, but that's not a URI and so is unlikely to match whatever you have put into schema.

Make sure you use consistent URIs in both your data and rules.

Dave

Reply via email to