nfdi4cat / voc4cat

A SKOS vocabulary for catalysis maintained by NFDI4Cat & friends
https://nfdi4cat.github.io/voc4cat/
Creative Commons Zero v1.0 Universal
10 stars 8 forks source link

💡 Tutorial-like jupyter notebooks, e.g. How to add children of concepts in a collection to the collection? #52

Open markdoerr opened 5 months ago

markdoerr commented 5 months ago

Description

children of concepts should be automatically added to the collection ( or is this already implemented ?)

dalito commented 5 months ago

This is not implemented.

On what use case where you thinking? Should this be a way to flatten a hierarchy to a list and access the list as collection?

markdoerr commented 5 months ago

just to make collections more convenient: one only needs add the top-most concept (in stead of entering every single narrower concept) in the list, the hierarchy can still be kept. To avoid unintentional additions, we could introduce a syntax, like v4c-bc:0000001+ (addition of a plus at the end of the IRI) to indicate, please also include narrower terms as specified in the vocabulary.

dalito commented 5 months ago

We need not only Excel -> SKOS but also SKOS -> Excel which may get difficult for this convenience feature. Another detail to consider: skos:broader / skos:narrower may form circles that need to be handled. Both are not transitive by default. This will get too complex in my opinion.

Another way is to find the narrower concepts and add them to a collection via a separate script. With the help of a SPARQL query or by filtering the RDF triples the concepts missing in a collection can be found easily. An update of the collection turtle file can then be submitted as PR. A new Excel file with the extended collection will be automatically build by the pipeline.

Maybe we should add some jupyter notebooks that show how to do such things with rdflib.

markdoerr commented 5 months ago

I see your valid point, @dalito, and I think a separate script (or jupyter notebook) will certainly help - it is a good idea, worth putting on the list of future features.