skohub-io / skohub-vocabs

A lightweight tool to publish SKOS Vocabularies
https://skohub.io/
Apache License 2.0
36 stars 25 forks source link

Data guidance ? #103

Closed atiro closed 3 years ago

atiro commented 4 years ago

Discovered project via signing up for SWIB20, so forgive me if am jumping ahead, but generating the static site is exactly what we need for a project. I've sort of got it working (tree looks amazing) but I'm obviously failing to get it in quite the right format/sematics. As a sample I have:

<https://data.vam.ac.uk/CIT/CIT284490> a skos:ConceptScheme ;
    dc:description "This is the Project" ;
    dc:title "Project Title" ;
    skos:hasTopConcept <https://data.vam.ac.uk/CIT/CIT286958>,
        <https://data.vam.ac.uk/CIT/CIT286959>,
        <https://data.vam.ac.uk/CIT/CIT286960>,
        <https://data.vam.ac.uk/CIT/CIT286961>,
        <https://data.vam.ac.uk/CIT/CIT286963>,
        <https://data.vam.ac.uk/CIT/CIT287802>,
        <https://data.vam.ac.uk/CIT/CIT288669>,
        <https://data.vam.ac.uk/CIT/CIT289138> 

<https://data.vam.ac.uk/CIT/CIT286960> a skos:Concept ;
    dc:source "A Source" ;
    skos:altLabel "An Alt Label"@en ;
    skos:broader <https://data.vam.ac.uk/CIT/CIT284490> ;
    skos:narrower <https://data.vam.ac.uk/CIT/CIT284537>,
        <https://data.vam.ac.uk/CIT/CIT284541>,
        <https://data.vam.ac.uk/CIT/CIT287833>,
        <https://data.vam.ac.uk/CIT/CIT287835>,
        <https://data.vam.ac.uk/CIT/CIT288261>,
        <https://data.vam.ac.uk/CIT/CIT288365>,
        <https://data.vam.ac.uk/CIT/CIT288428>,
        <https://data.vam.ac.uk/CIT/CIT288441>,
        <https://data.vam.ac.uk/CIT/CIT288546> ;
    skos:prefLabel "Term Label"@en ;
    skos:scopeNote "Scope Notes"@en ;
    skos:topConceptOf <https://data.vam.ac.uk/CIT/CIT284490> .

But for some reason the Title isn't picked up, and pages aren't generated (just the navigation tree).

I would also like the ability to navigate the tree in more than one language ideally, but that's probably a feature request!

sroertgen commented 4 years ago

Hey @atiro,

I've modified your minimal example a bit and the below seems to work:

@base <https://data.vam.ac.uk/CIT/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

<CIT284490> a skos:ConceptScheme ;
    dct:description "This is the Project"@en ;
    dct:title "Project Title"@en ;
    skos:hasTopConcept <CIT286960>, <CIT286961> .

<CIT286960> a skos:Concept ;
    dct:source "A Source"@en ;
    skos:altLabel "An Alt Label"@en ;
    skos:prefLabel "Term Label"@en ;
    skos:scopeNote "Scope Notes"@en ;
    skos:topConceptOf <CIT284490> .

<CIT286961> a skos:Concept ;
    dct:source "A Source"@en ;
    skos:altLabel "An Alt Label"@en ;
    skos:prefLabel "Term Label"@en ;
    skos:scopeNote "Scope Notes"@en ;
    skos:topConceptOf <CIT284490> .
atiro commented 4 years ago

Thanks for the quick reply @sroertgen . I did have the prefixes but not the base, added now.

Switching to dct:title & dct:description fixed the missing title (needed lang tag as well), many thanks,

Still not getting pages per term though, maybe I need to have a skos:definition for this? I also get the warning from Gatsby (which I assume is related to skos:related field) :


warn There are conflicting field types in your data.

If you have explicitly defined a type for those fields, you can safely ignore this warning
message.
Otherwise, Gatsby will omit those fields from the GraphQL schema.

If you know all field types in advance, the best strategy is to explicitly define them with the
Concept.related:
 - type: [object]
   value: [ { id: 'https://data.vam.ac.uk/CIT/CIT280647' }, ... ]
 - type: object
   value: { id: 'https://data.vam.ac.uk/CIT/CIT284281' }
acka47 commented 4 years ago

You might take a look at https://github.com/dini-ag-kim/hcrt/blob/master/hcrt.ttl as reference vocab. With regard to skos:related I think we do not support it yet. I opened #105 for this. Perhaps it's time to start working on #91...

literarymachine commented 4 years ago

Still not getting pages per term though, maybe I need to have a skos:definition for this?

Using the exact version @sroertgen provided in https://github.com/skohub-io/skohub-vocabs/issues/103#issuecomment-720520285, the vocab builds fine for me. The snippet provided in https://github.com/skohub-io/skohub-vocabs/issues/103#issue-734073777 won't build a page for each Concept because only CIT286960 is explicitly defined. @atiro could you perhaps provide the entire vocab you are trying to build?

atiro commented 4 years ago

Many thanks all, that's working now. I was over complicating things for myself by generating all the labels in both English and Chinese, have reduced it down for the moment.

I'll check if it's OK to put the vocab up @literarymachine and send the link if so.

sroertgen commented 3 years ago

Hey @atiro, I will close this for now due to inactivity. Please reopen this issue, if you need any more help!