[Pellet-users] how to load rules from separate file

Thurn, Martin martin.thurn at ngc.com
Wed Feb 20 15:12:46 UTC 2008


I found the following sample code posted by Evren last year.  I'm trying
to use it, but RuleUtils is not found.  I have pellet 1.5.1.  Is this
code still accurate?  Where is RuleUtils defined?  (what do I need to
import?)  TIA

// load the ontology
Reasoner reasoner = new Reasoner();
OWLOntology ont = OntologyHelper.getOntology(URI.create(ontFile));
reasoner.setOntology(ont);
// load the rules
Set rules = RuleUtils.parseRules(rulesFile);
reasoner.getKB().setRules(rules);

 - - Martin 



More information about the Pellet-users mailing list