Open nichtich opened 1 month ago
We just published jskos-cli 0.7.0 with support of parent
in addition to broaderNotation
. Try this file example.csv
notation,prefLabel,parent
X85C,food,
437D,vegetables,X85C
together with example.json
:
{
"uri": "http://example.org/",
"namespace": "http://example.org/"
}
And convert with jskos-convert concepts example.csv -s example.json -m
:
{"uri":"http://example.org/X85C","notation":["X85C"],"inScheme":[{"uri":"http://example.org/"}],"prefLabel":{"en":"food"},"topConceptOf":[{"uri":"http://example.org/"}]}
{"uri":"http://example.org/437D","notation":["437D"],"inScheme":[{"uri":"http://example.org/"}],"prefLabel":{"en":"vegetables"},"broader":[{"uri":"http://example.org/X85C","notation":["X85C"]}]}
When converted to RDF with JSKOS JSON-LD context this equals:
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
<http://example.org/437D> skos:broader <http://example.org/X85C> ;
skos:inScheme <http://example.org/> ;
skos:notation "437D" ;
skos:prefLabel "vegetables"@en .
<http://example.org/X85C> skos:inScheme <http://example.org/> ;
skos:notation "X85C" ;
skos:prefLabel "food"@en ;
skos:topConceptOf <http://example.org/> .
If this is expected outcome of this tool as well, I'd recommend to:
notation
instead of identifier
als column nametop
as indicator for top concepts but have a flag to mark all concepts without parent as top concept@nichtich Thank you for your valuable suggestions! I am going to align our table scheme to your scheme at vzg in the future.
The command line tool jskos-convert created and used at VZG has a similar purpose. It's CSV format uses
notation
instead ofidentifier
(the value is not only used to construct URI but also to populateskos:notation
)prefLabel
is equivalent, but we also supportprefLabel@xx
for additional language labelsbroaderNotation
instead ofparent
level
as alternative method to specify a hierarchyI can add
parent
as alias forbroaderNotation
and need to think about how to processnotation
vs.identifier
. In any case both tools should accept the same format.