0

I've multiple personal inference rules in Datalog Form. I can extend Jena GenericRuleReasoner in order to take them into account during the inference step. Here is an example of code to do that :

String rules = "[r1: (?e1 st:runningTask st:gic_eth0) -> (?e1 rdf:type st:dataFromEthernet2IP)]";
Reasoner reasoner = new GenericRuleReasoner(Rule.parseRules(rules));
reasoner.setDerivationLogging(true);
InfModel inf = ModelFactory.createInfModel(reasoner, rawData);

Actually, I'm want to use Pellet reasoner since it is easy to plug to Jena. I wonder if Pellet is extensible as GenericRuleReasoner ? and if it is, how to add my Datalog rules in it ?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Fopa Léon Constantin
  • 11,863
  • 8
  • 48
  • 82
  • 1
    It's not clear what your question is. First you're asking about parsing rules for a Generic Rule Reasoner (did that work for you?) and then you're asking about Pellet. Pellet doesn't support Jena rules, but it does support SWRL rules, which will work with OWL (but isn't as flexible as Jena rules). You can also layer inference models, so you could run Pellet on a rule-based inference model, or a rule-based reasoner on top of a Pellet model. – Joshua Taylor Jul 09 '14 at 20:35
  • @JoshuaTaylor Actually, `GenericRuleReasoner` works fine. So you mean instead of using Jena rule, `Pellet` use SWRL rules? can you provide an example on usage of SWRL with `Pellet` ? Thank you for your time. – Fopa Léon Constantin Jul 09 '14 at 22:13
  • There are other examples of ontologies with [tag:swrl] rules on Stack OVerflow, and elsewhere. I don't think much is gained by repeating them here, especially as the question as put isn't *about* SWRL rules. – Joshua Taylor Jul 10 '14 at 12:20

0 Answers0