Adding new fields to the Skosmos

60 views
Skip to first unread message

Omid Ghiasvand

unread,
Aug 28, 2024, 8:33:58 AM8/28/24
to Skosmos Users
Hello,

I am trying to add some new features to a thesaurus in Skosmos. For examples "is_process_of" is not part of features of a concept in Skosmos. Does anyone know how I can get it added to the Skosmos?

Just to let you know that, I have added it in my ttl file like "skos:is_part_of" .

Any comments and guidance are greatly appreciated.

Bests,
Omid

db...@essex.ac.uk

unread,
Aug 28, 2024, 12:20:43 PM8/28/24
to Skosmos Users
Hi Omid.  We use a number of non-Skos properties in Skosmos.  For example,  if you look at https://thesauri.cessda.eu/elsst-4/en/page/bf0d664a-e89a-4ec3-80d2-04f664b359ab you will see a concept property called "DEFINITION SOURCE".  This actually comes from a vocabulary called XKOS.

The underlying triple (see https://thesauri.cessda.eu/rest/v1/elsst-4/data?uri=https%3A%2F%2Felsst.cessda.eu%2Fid%2F4%2Fbf0d664a-e89a-4ec3-80d2-04f664b359ab&format=text/turtle) is:
In order to let Skosmos know that  http://rdf-vocabulary.ddialliance.org/xkos#additionalContentNote should be displayed as "DEFINITION SOURCE" in the user interface, we add an additional triple to the data that is uploaded into Fuseki:
<http://rdf-vocabulary.ddialliance.org/xkos#additionalContentNote> <http://www.w3.org/2000/01/rdf-schema#label> "DEFINITION SOURCE"@en .
You can do this with any predicate you like.

In your case, you're using something called skos:is_part_of
Now, this doesn't exist in Skos, so I would recommend instead that you find an appropriate property in an already published vocabulary.  I don't know exactly in what context you are using  skos:is_part_of but you could conceivably use http://rdf-vocabulary.ddialliance.org/xkos#IsPartof instead.

In that case, you data triple would be:
To let Skosmos know how to display xkos:IsPartof in the user interface, you would create a triple in your data file like
<http://rdf-vocabulary.ddialliance.org/xkos#IsPartof> <http://www.w3.org/2000/01/rdf-schema#label> "Is Part Of"@en .

Best wishes, Darren Bell (UK Data Archive)

Omid Ghiasvand

unread,
Aug 29, 2024, 3:36:02 AM8/29/24
to Skosmos Users
Also where can I see list of all pre-defined fields show-able in the Skosmos UI?

Joeli Takala

unread,
Sep 2, 2024, 12:11:07 PM9/2/24
to Skosmos Users
Hello Omid,

Here are the properties that come with a label in Skosmos: https://github.com/NatLibFi/Skosmos/wiki/Data-Model
And here you can search the UI translation template for an example of those labels in English: https://github.com/NatLibFi/Skosmos/blob/main/resource/translations/skosmos_en.po

Outside of the properties that come with a label through the UI translation component, you need to designate the labels in all the UI languages you want to support for the vocabulary. You can do this by using a rdfs:label for the property URI just like Darren showed.

Hope this helps,

______________
Joeli Takala

Omid Ghiasvand

unread,
Sep 11, 2024, 9:24:46 AM9/11/24
to Skosmos Users
Hello,

Joeli and Darren, thank you so much for your responses. I have deployed them and fortunately  got good results. 

Now I would like to ask how is possible to define my own properties like xkos:isPartOf. Since, I do have many properties that can not be fitted into predefined skos or xkos, I have to define some of them by myself. For example "isAffectedBy". I have around 128 properties that could around 10-15 of them found in dc, skos, and xkos. Please tell me how can I define a new property, in which file I must introduce them. Please make an example for the isAffectedBy. The property must show a semantic relationship with other concepts.

Bests,
Omid

Joeli Takala

unread,
Sep 13, 2024, 6:15:06 AM9/13/24
to Skosmos Users
Hello Omid,

In my opinion, it would be best to be able to use existing properties so that the semantics of the property can be more easliy understood by a third party using the linked data. For example, schema.org has schema:isAffectedBy (although it propably falls short for you since it is in the domain of medical tests). Picking an existing property from another schema still means you need do copy the definition of the property to the vocabulary data, though.

If no suitable property can be found in existing schemas, you have two options:


Option one is to create your own property. The minimal implemantation is following:

# A basic concept in your vocabulary that uses a custom property

vocab:c1 a skos:Concept ;
  skos:inScheme vocab:myScheme ;
  skos:prefLabel "Concept label"@en ;
  ex:property "Custom value" .

# The minimal definition of the custom property needs a rdfs:label (or several if you tag them by language), and a type saying it is a property
# You can and should add a rdfs:domain, rdfs:range and a skos:definition/rdfs:comment explaining what is the nature of the relation
# Even better if you can designate it as a rdfs:subPropertyOf some existing property

ex:property a <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> ;
    rdfs:label "Example property" .

This way you get exactly what you asked for, but it might reduce the reusability of your data by a third party. Then again, if you publish your schema definitions in a findable, accessable, interoperable and reusable form you certainly help out the linked open data aspect quite a bit.


Option two is to recycle some existing property, but overriding the displayed property name in Skosmos UI, using the config.ttl file:

:vocabID a skosmos:Vocabulary, void:Dataset ;
    skosmos:propertyLabelOverride [ skosmos:property skos:prefLabel ; rdfs:label "Satz"@de, "record"@en ]  .

This way, you would not change the semantics of the rdf dataset, you would just tweak the labels of the properties to fit with some established naming convention in the context of your Skosmos users.


Hope this makes sense,

______________
Joeli Takala

Omid Ghiasvand

unread,
Sep 17, 2024, 7:20:28 AM9/17/24
to Skosmos Users
Hello,

Thanks for the advice. Problem solved.

Bests,
Omid
Reply all
Reply to author
Forward
0 new messages