Sveino / Inst4CIM-KG

Instance of CIM Knowledge Graph
Apache License 2.0
5 stars 1 forks source link

output ontologies as JSONLD #99

Open VladimirAlexiev opened 1 month ago

VladimirAlexiev commented 1 month ago

Use tricks from https://github.com/gs1/EPCIS/tree/master/Ontology#conversion-to-jsonld. make jsonld invokes commands like this

ttl2jsonld CGMES-NC/ttl/SteadyStateInstruction-AP-Voc-RDFS2020.ttl | \
  jsonld compact -c file://CIM-ontology-context.jsonld > CGMES-NC/jsonld/SteadyStateInstruction-AP-Voc-RDFS2020.jsonld

Then I check for JSON-LD irregularities with a command like this;

grep -h '       "@' */*/*.jsonld|perl -pe 's{^ +}{}' |sort|uniq -c

Here are the exceptions, with issue listed:

VladimirAlexiev commented 1 month ago

I also check whether all URLs are properly shortened

grep -h '"http' */*/*.jsonld|sort|uniq -c|less

Breakdown of problems:

VladimirAlexiev commented 1 month ago

This is largely done, see https://github.com/Sveino/Inst4CIM-KG/tree/develop/rdfs-improved/CGMES/jsonld.

They are all posted as separate issues, so we may as well close this one.