Hi all,

I am trying to reason over data using Jena rules (a separate txt file) and a 
data file (which is an ontology file having instances). Just to give an idea of 
how my simple code looks like, have a look at the piece of code given below:


public static void main(String[] args) throws MalformedURLException {



  Model instances = ModelFactory.createDefaultModel();



     instances.read ("/Users/Desktop/Ontology/IoT-Ontology-file.owl", "TURTLE");



     Reasoner reasoner = new

                    
GenericRuleReasoner(Rule.rulesFromURL("/Users/Desktop/rules_iot.txt"));



  reasoner.setDerivationLogging(true);



  InfModel inf = ModelFactory.createInfModel(reasoner, instances);



Let me clearly say that the above code is not complete. I have run my code over 
three Jena rules successfully and derived/inferred new facts from the data file 
(ontology file) but it does not work for one rule. It does not give any error 
but the rule seems to be not firing. Though, when I run the Ontology reasoner 
(Pellet reasoner) over my ontology, it successfully fires and infers a new fact.


Can someone please help me out? I can't send my data file (ontology file) to 
the group because of confidentiality and privacy issues but I can send it to a 
particular individual at his/her email address who could help.


Should you require any further information please let me know.


Many thanks in advance.


Best regards,


Izhar



Reply via email to