w3c / N3

W3C's Notation 3 (N3) Community Group
46 stars 18 forks source link

[Spec] a canonical form of N3 #123

Open domel opened 1 year ago

domel commented 1 year ago

Although there is a canonical version of N-Triples, we will not find recommendations on the specific features of the N3.

Dependencies:

gkellogg commented 1 year ago

Why is a canonical form of N3 needed? Similar need to RDF Dataset Canonicalization? Quoted Graphs, and any resource type in any position make this pretty challenging without resorting to a more primitive reified form. Even then, blank node predicates would be a problem for RDF C14N.

domel commented 1 year ago

Yes, I imagine comparison is an important use case. For example, this feature would make the Interwoven Hash algorithm much easier [1].

[1] Tomaszuk, D., Głąb, S., Turoboś, F., Pawlik, T., Kuziński, D., & Sopek, M. (2022, August). Interwoven Hash of Vicious Circle Free Graph. In 2022 IEEE International Conference on Blockchain (Blockchain) (pp. 449-454). IEEE.

gkellogg commented 1 year ago

I think having some description of describing N3 as RDF Datasets would be helpful. My own implementation does this using my own mechanism of re-writing blank node identifiers and using blank nodes as graph names. To do it normatively probably requires more, and treads on the general problem of the lack of semantics in RDF datasets, but it could be defined for the purposes of representation N3 in RDF, which also makes things such as C14N available. Looks like that's what's going to happen for Quoted Triples, so it would make sense to do this for N3.

domel commented 1 year ago

Quoted Graphs are one thing but N3 Rules with are little bit complicated.