Re: 回复: Relationship and difference between N3 and RDF*

Hi Joy,

> But in practice, I still don't know which one to choose.
>
> In most cases, can I use N-quads or named graph, Like this:
>
>         ex:bob a ex:Person .
>
>         ex:bob ex:haschild  ex:meli  ex:ng1 .
>
>         ex:ng1 ex:saidBy  ex:lucy .
>
> Does this have the same effect as RDF* ?
>
Pierre-Antoine's explanation summarizes it quite nicely - it depends on 
your needs really. Notation3 allows you to insert a quoted graph (a.k.a. 
cited formula) into an statement and make assertions about it (i.e., 
describe the graph), whereas RDF* focuses on describing individual 
statements.

Using named graphs:

     :lucySays { ex:bob ex:haschild ex:meli } . :lucySays ex:saidBy 
ex:lucy ; ex:saidAt "2021-09-06"^^xsd:date .

Using N3:

     { ex:bob ex:haschild ex:meli } ex:saidBy ex:lucy ; ex:saidAt 
"2021-09-06"^^xsd:date .

> In addition, about “N3 adds an If-Then style of decision making in the 
> form of logical implications and variables”, I would like to know the 
> current progress in this respect, what kind of expression will be 
> used?   Does it have anything to do with ruleML or DMN?
>
>
Yes, Notation3 supports logical implications, as do the various RuleML 
formalisms. N3, in contrast to RuleML, builds on RDF (in particular, the 
Turtle notation) and extends it with quoted graphs and collections (or 
lists) - this may be more convenient for people coming from the Semantic 
Web world. N3 currently supports a rich set of builtins for operating on 
graphs, lists, strings, time, etc.. See here 
<https://github.com/w3c/N3/tree/master/ns> for a complete list of builtins.

Personally, what I believe sets N3 apart from other rule languages are 
its ties into the Web of Data: it includes builtins to access remote 
data (e.g., log:semantics builtin), inferring any conclusions from it, 
and/or checking whether it supports, or does not support, a given set of 
facts (e.g., log:includes, log:notIncludes builtin).

You can find some N3 examples here: 
https://github.com/w3c/N3/tree/master/examples 
<https://github.com/w3c/N3/tree/master/examples> . (For a comprehensive 
set of tests, see here 
<https://github.com/w3c/N3/tree/master/tests/N3Tests>).

You can try out N3 examples here: http://ppr.cs.dal.ca:3002/n3/editor/ 
<http://ppr.cs.dal.ca:3002/n3/editor/> (I'd recommend using Eye as the 
reasoner)


Regards,

William

> *发件人: *William Van Woensel <mailto:william.vanwoensel@gmail.com>
> *发送时间: *2021年6月7日21:23
> *收件人: *Joy lix <mailto:joylix4112@outlook.com>; public-rdf-star@w3.org 
> <mailto:public-rdf-star@w3.org>
> *抄送: *Dörthe Arndt <mailto:doerthe.arndt@ugent.be>
> *主题: *Re: Relationship and difference between N3 and RDF*
>
> Hi Joy,
>
> Thanks for looking into Notation3 (N3). Re the W3C specification - it 
> builds on top of prior "complete" W3C submissions (e.g., see here 
> <https://www.w3.org/TeamSubmission/n3/> and here 
> <https://www.w3.org/DesignIssues/Notation3>) - hence the new 
> incomplete spec <https://w3c.github.io/N3/spec/> may be giving a bit 
> of a misleading view on the current state of N3: there are already 
> mature systems that implement N3 (Eye and cwm). Our effort at 
> https://w3c.github.io/N3/spec/ <https://w3c.github.io/N3/spec/> is 
> meant to further standardize and flesh out N3, since the prior 
> documents are a bit vague on certain aspects.
>
> Re the difference with TriG: N3 allows quoted graphs (a.k.a. cited 
> formulae <https://w3c.github.io/N3/spec/#cformulae>) to be utilized 
> within triple statements, e.g., ":william :said { :william :wrote 
> :moby_dick }", whereas TriG supports graph statements such as 
> ":authorship_lies { :william :wrote :moby_dick }" that allow 
> specifying named graphs. Both serve similar purposes - attaching 
> context, provenance, and general metadata to statements - but have 
> different semantics. Well, AFAIK named graphs do not really have an 
> agreed-upon semantics - see here 
> <https://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225/> for a list 
> of possible interpretations of named graphs - while cited formulae 
> have more of a fixed semantics as referentially-opaque RDF graphs 
> (this corresponds to a particular interpretation 
> <https://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225/#the-graph-name-denotes-the-named-graph-or-the-graph> 
> of named graphs).
>
> You may notice that this is where there is an overlap with RDF*, since 
> it also means to allow attaching metadata to statements - in their 
> case, by simplifying reification within RDF.
>
> Hope that answers your question.
>
> Regards,
>
> William
>
> On 2021-06-05 7:25 p.m., Joy lix wrote:
>
>     I'm a beginner in semantic technology, and I'm learning about RDF*.
>
>     I notice that another W3C specification is also being drafted :
>     https://w3c.github.io/N3/spec/ <https://w3c.github.io/N3/spec/> .
>     Also it mentioned: “N3 adds an If-Then style of decision making in
>     the form of logical implications and variables”.
>
>     But I feel like it's not quite up to speed with RDF*, because
>     there are a lot of sections that still say "bla...".
>
>     I don't know how it is related to or different from RDF*, there is
>     also the W3C's TRIG, would some expert explain this briefly?   Thanks.
>
>     Regards,
>
>     Joylix
>

Received on Wednesday, 9 June 2021 14:16:40 UTC