简体   繁体   中英

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM