rdf-canon

Canonicalize RDF datasets into a deterministic form for hashing and diffing.

8|1|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/sparq-org/sparq --skill rdf-canon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rdf-canon
Source: https://github.com/sparq-org/sparq/tree/main/skills/rdf-canon
Command: npx skills add https://github.com/sparq-org/sparq --skill rdf-canon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sparq-canon, and includes scripts (resource) components.

What problem does it solve?

This Skill canonicalizes RDF datasets, ensuring consistency in data representation for operations like hashing, deduplication, and RDF-isomorphism testing.

Core Features & Use Cases

  • RDF Dataset Canonicalization: Converts datasets into a deterministic form, replacing blank nodes and ordering quads.
  • Use Case: If you need to ensure two RDF datasets are isomorphic, or need a consistent serialization for hashing or diffing, this skill is invaluable.

Quick Start

To canonicalize an RDF dataset named 'data.nt', execute the following command: rdf-canon canonicalize data.nt ntriples ./idx

Frequently Asked Questions about rdf-canon

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I canonicalize an RDF dataset for consistent hashing?

You can canonicalize an RDF dataset by converting it into a stable form, replacing blank nodes and ordering quads. This deterministic serialization ensures consistent hashing and dataset comparison for data scientists.

What is RDF dataset canonicalization and when do I need it?

RDF dataset canonicalization converts datasets into a deterministic form by replacing blank nodes and ordering quads. You need it when performing RDF-isomorphism testing, deduplication, or ensuring consistent serialization for hashing.

How do I check if two RDF datasets are isomorphic?

To check if two RDF datasets are isomorphic, canonicalize both datasets to establish a stable, deterministic form. If their canonical forms match, the original datasets are isomorphic and structurally identical.

Does RDF dataset canonicalization work with ntriples serialization?

Yes, RDF dataset canonicalization supports ntriples serialization. You can process an input file like 'data.nt' and specify 'ntriples' as the output format during the canonicalization process.

Do I need the sparq-canon dependency to process quad sequences?

Yes, you need the sparq-canon dependency because the canonicalization process requires the rdf-canon crate to process quad sequences and generate a stable canonical form for your datasets.

What's the best way to prepare RDF data for diffing?

The best way to prepare RDF data for diffing is dataset canonicalization, which replaces blank nodes and orders quads into a stable form. This ensures a consistent serialization for accurate dataset comparison.