scossu / rdf_canon

Generate a canonical serialization of a RDF graph to calculate its checksum.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RDF Canon

WORK IN PROGRESS: Non-functional code.

This libray generates a canonical serialization of a RDF graph that is amenable to hashing.

The logic is drawn from a publication by Edzard Höfig and Ina Schieferdecker.

Note: This implementation represents RDF identifiers in their full N3 syntax: fully qualified IRIs are represented with angle brackets, literals with double quotes, and so on, e.g.:

<http://ex.org/a> # An IRI
"Ahoy"^^<http://www.w3.org/2001/XMLSchema#string> # A string literal
3 # An xsd:int literal

Note: there has been further development of this logic since the original publication. Most notably, prof. Miguel Ceriani discovered two edge cases that invalidate the logic. This implementation attempts to resolve the first one but the second one will require further research. See related discussion.

About

Generate a canonical serialization of a RDF graph to calculate its checksum.

License:Apache License 2.0


Languages

Language:C 74.9%Language:Python 24.5%Language:Makefile 0.6%