gbv/jskos-cli

jskos-convert: support RDF/Turtle output format

Opened this issue · 3 comments

Converting from JSKOS to RDF should be straight-forward with the existing JSON-LD context document.

This feature is required to better support vocabularies in annif

Support of Turtle serialization is possible with n3. jsonld library only supports nquads serialization so the rdf data needs to be re-parsed and serialized with n3.

See https://www.npmjs.com/package/jsonld2rdf for implementation. Requires gbv/jsonld2rdf#2 for integration.

Current workaround is to use jsonld2rdf command line client, JSKOS context and a list of prefixes but this should better directly be supported by jskos-convert:

jskos-convert ... > result.ndjson
jq -s . result.ndjson | jsonld2rdf -c ../jskos/context.json -p prefixes.json