Search code examples
c#.netrdfdotnetrdfn3

Does dotNetRDF support Maths?


I saw the "math" built-in mentioned in one of the unit test resources (path2.n3) and tried it out but it doesn't seem to work:

@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix : <http://test#>.

{ (2 1) math:sum ?y. } => { :result :is ?y. }.
:result :is (2 1)!math:sum.

Using this query:

SELECT ?s WHERE { :result :is ?s. }

I'm applying the RdfsReasoner followed by the SimpleN3RulesReasoner.

It doesn't return anything for the implication and returns just a blank node for the second line. There's a similar kind of behaviour for the "string" built-in as well with concatenation.

Am I doing something wrong or is there currently no support for this?


Solution

  • The test file is used for the N3 parser unit tests. The reasoner currently only supports the implication operator, none of the N3 math or string functions are implemented, nor are the other logic operators like log:includes or log:semantics.