skohub-io / skohub-vocabs

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

multiple entries for skos:notes causes "No note in language xx" #281

Closed carlschuurbiers closed 2 months ago

carlschuurbiers commented 7 months ago

A small bug. This text in .ttf file:

<14003> a skos:Concept ;
    skos:prefLabel "140.03 Soziales Verhalten"@de ;
    skos:altLabel "Soziales Verhalten"@de ;
    skos:broader <140> ;
    skos:inScheme <> ;
    skos:note "Elementarbereich"@de,
        "Soziales Verhalten"@de,
        "Vorschulerziehung"@de,
        "frühkindliche Bildung"@de,
        "frühkindliche Erziehung"@de .

Causes No note in language "de" provided to be displayed.

image

Workaround: take all separate notes together as one note, then it works. Is the number of notes limited? This was an automatically imported document that just wrote a lot of stuff in separate note entries, I can organise it another way, but just wanted to let you know.

sroertgen commented 7 months ago

Is the number of notes limited?

No. This seems like a bug. Will look into it! Thanks for reporting!

sroertgen commented 7 months ago

After a look into the code, skos:note is currently expected to be a single value and not an array. This corresponds to your findings.

Before changing this, I'm asking @acka47 for his opinion: We have some fields, like skos:definition, skos:scopeNote, skos:example which could in theory occur multiple times, but we restrict cardinality to 1 . Regarding skos:definition I think it makes sense to only allow one. Regarding the other note fields, should we keep them this way as well or should we allow multiple?

Either way we should:

carlschuurbiers commented 7 months ago

I could see one reason for multiple skos:note: If changes are made to a skos:Consept, one could add a comment about that change and why it was made. Then when the next change comes one simply adds another note. So a kind of version remarks. But there may be a different skos:word for this...

For me, for now, a single skos:note would be fine.

carlschuurbiers commented 7 months ago

another idea: allow multiple entries, but simply concatenate and display as a single string?

Anyway don't waste too much time on this one, methinks..

acka47 commented 3 months ago

I could see one reason for multiple skos:note: If changes are made to a skos:Consept, one could add a comment about that change and why it was made. Then when the next change comes one simply adds another note. So a kind of version remarks. But there may be a different skos:word for this...

Yes, for this, there exists skos:historyNote & skos:changeNote as well as skos:editorialNote. But I am not sure whether you should add another note whenever you change something. I would first look how others use it.

acka47 commented 3 months ago

I have no real understanding how SKOS notes are commonly used. Generally, we should take a look at some SKOS vocabs and see that is common practice. Looking at STW, it seems like there is only onescopeNote or historyNote per language but several skos:note (though they use custom property for this). We should check other vocabs as well.

We might as well choose the simple solution and just support multiple notes altogether.

sroertgen commented 3 months ago

Looking at AgroVoc there are scopeNotes and changeNotes used. But only one note per language per concept.

We might as well choose the simple solution and just support multiple notes altogether.

At least in the SKOS reference I find nothing that would prohibit such. If ok, I would implement this.

acka47 commented 3 months ago

At least in the SKOS reference I find nothing that would prohibit such. If ok, I would implement this.

+1 However, I think, we should try to follow and support best practices with SkoHub Vocabs. I guess, we should open another issue to collect best practices re. notes. If single notes are indeed best practice, we could then add a warning in the validation process to let people know who use multiple notes.

acka47 commented 3 months ago

I have created a discussion topic for this at https://metadaten.community/t/community-patterns-fuer-skos-notes/255

sroertgen commented 3 months ago

We currently have scopeNote and note implemented in SkoHub Vocabs, which I will change to accept multiple values.

While on this, do we want to support historyNote, changeNote and editorialNote as well?

cc @acka47

carlschuurbiers commented 3 months ago

from SKOS primer:

.4 Documentary Notes

Semantic relationships are crucial to the definition of concepts, as many KOS guidelines emphasize it. However, next to these structured characterizations, concepts sometimes have to be further defined using human-readable ("informal") documentation, such as scope notes or definitions.

SKOS provides a skos:note property for general documentation purposes. Inspired by existing KOS guidelines, such as [ISO2788] or [BS8723-2], this property is further specialized into skos:scopeNote, skos:definition, skos:example, and skos:historyNote to fit more-specific types of documentation.

skos:scopeNote supplies some, possibly partial, information about the intended meaning of a concept, especially as an indication of how the use of a concept is limited in indexing practice. The following example is adapted from [ISO2788]:

ex:microwaveFrequencies skos:scopeNote "Used for frequencies between 1GHz to 300Ghz"@en. skos:definition supplies a complete explanation of the intended meaning of a concept. The following example is adapted from [ISO2788]:

ex:documentation skos:definition "the process of storing and retrieving information in all fields of knowledge"@en. skos:example supplies an example of the use of a concept:

ex:organizationsOfScienceAndCulture skos:example "academies of science, general museums, world fairs"@en. skos:historyNote describes significant changes to the meaning or the form of a concept:

ex:childAbuse skos:historyNote "estab. 1975; heading was: Cruelty to children [1952-1975]"@en. In addition to these notes that are intended for users of a concept scheme, SKOS includes two specializations of skos:note that are useful for KOS managers or editors: skos:editorialNote and skos:changeNote.

skos:editorialNote supplies information that is an aid to administrative housekeeping, such as reminders of editorial work still to be done, or warnings in the event that future editorial changes might be made:

ex:doubleclick skos:editorialNote "Review this term after company merger complete"@en. ex:folksonomy skos:editorialNote "Check spelling with Thomas Vander Wal"@en. skos:changeNote documents fine-grained changes to a concept, for the purposes of administration and maintenance:

ex:tomato skos:changeNote "Moved from under 'fruits' to under 'vegetables' by Horace Gray"@en. It is important to notice that the hierarchical link between skos:note and its different specializations allows all the documentation associated with a concept to be retrieved in a straightforward way. Every skos:definition is a skos:note, every skos:scopeNote is a skos:note, and so on.

As illustrated above, SKOS documentation properties can be simply used with RDF plain literals. Section 4.2 will show that there are other possible patterns, as the range of these properties is not be restricted to literals. One important feature of simple literals, however, is the ability to use language tags, as done for labeling properties. Documentation may thus be provided in multiple languages:

ex:pineapples rdf:type skos:Concept; skos:prefLabel "pineapples"@en; skos:prefLabel "ananas"@fr; skos:definition "The fruit of plants of the family Bromeliaceae"@en; skos:definition "Le fruit d'une plante herbacée de la famille des broméliacées"@fr. Before concluding this section, it is important to note that other, non-SKOS properties could be used to document concepts. The dct:creator property from Dublin Core [DC] can for instance be used to point to a person that created the concept:

ex:madagascarFishEagle dct:creator [ foaf:name "John Smith" ].

carlschuurbiers commented 3 months ago

labels that I could imagine are useful for me:

skos:changeNote, skos:editorialNote and possibly skos:historyNote.

maybe also skos:skopeNote

Already using skos:example and skos:definition.

carlschuurbiers commented 3 months ago

While on this, do we want to support historyNote, changeNote and editorialNote as well?

cc @acka47

Yes please!

carlschuurbiers commented 3 months ago

when more then one entry, display under one heading ("Change notes:") and then the individual notes as bullet list?

acka47 commented 3 months ago

Hab mir gerade nochmal die Beispiele für editorialNote und changeNote im SKOS primer angeschaut. Die werden wir zumindest im KIM-Kontext nicht benötigen, weil diese Informationen auf GitHub zu finden sind – in Tickets bzw. commit messages. Das spricht aber nicht dagegen, sie in SkoHub zu unterstützen.

In addition to these notes that are intended for users of a concept scheme, SKOS includes two specializations of skos:note that are useful for KOS managers or editors: skos:editorialNote and skos:changeNote.

skos:editorialNote supplies information that is an aid to administrative housekeeping, such as reminders of editorial work still to be done, or warnings in the event that future editorial changes might be made:

ex:doubleclick skos:editorialNote "Review this term after company merger 
complete"@en.
ex:folksonomy skos:editorialNote "Check spelling with Thomas Vander Wal"@en.

skos:changeNote documents fine-grained changes to a concept, for the purposes of administration and maintenance:

ex:tomato skos:changeNote 
"Moved from under 'fruits' to under 'vegetables' by Horace Gray"@en.