On 07/08/16 09:24, lookman sanni wrote:
Thank you Niels, you made my day with the notEqual() function. The built-in
primitives page that you suggested is a gold mine.
@Dave: Jena does support N3 rules
Not really. Jena rules and N3 have some similar capabilities but also
differences.
N3 writes it's rules in extended RDF (N3 is itself extended RDF with
nested structures called "formula").
Jena has a separate rules language, and own execution engine with both
forward and backward rules.
Jena does parse N3 (at best, it treats it like Turtle from RDF 1.1 -
that does not include formulae)
See
https://www.w3.org/2000/10/swap/doc/Processing
Their example: note combines data and rules in one file
----
@prefix : <uncle#>.
:Joe has :father :Fred.
:Fred has :brother :Bob.
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@forAll :who1, :who2.
{ :who1 :father [ :brother :who2 ] } log:implies { :who1 :uncle :who2 }.
----
cwm - the original N3 interpreter - is a forward-chaining engine without
RETE.
Andy