luckinet / ontologics

Code-Logics to Handle Ontologies
https://luckinet.github.io/ontologics/
GNU General Public License v3.0
3 stars 2 forks source link

Class IDs, labels and definitions #2

Closed rue-a closed 2 years ago

rue-a commented 2 years ago

The classes of the ontology should have not only an ID (currently this is a descriptive string), but also a label and a definition. From my point of view, the ID can still be the descriptive string, which would only require to add the label and the definition properties. Another option would be to also generate IDs (as for concepts), but change the separator symbol (e.g. to _).

Variant 1: new_class(class = "landcover", label = "Landcover", definition = "A good definition of Landcover", parent = NA, ontology = lulc) new_class(class = "land-use", label = "LandUse", definition = "A good definition of Land-Use", parent = "landcover", ontology = lulc)

=>

id parent label definition
landcover NA Landcover A good definition of Landcover
land-use landcover Land-Use A good definition of Land-Use

Variant 2: new_class(label = "Landcover", definition = "A good definition of Landcover", parent = NA, ontology = lulc) new_class(label = "LandUse", definition = "A good definition of Land-Use", parent = _01, ontology = lulc)

=>

id parent label definition
_01 NA Landcover A good definition of Landcover
_01_01 landcover Land-Use A good definition of Land-Use

Another note: parent could also be interpreted as SKOS:broader

EhrmannS commented 2 years ago

Very good point. I will first change all "parent" things to "broader" things and secondly also include the definition (and did already include parent https://github.com/luckinet/ontologics/commit/5a13cc346caea5811c333009a08dc554095444fb https://github.com/luckinet/ontologics/commit/f7371ced999b96d6a63d2d54de6173176079a5e1) into the @classes table .

EhrmannS commented 2 years ago

I guess the way these are called should then be handled in the scope of issue https://github.com/luckinet/ontologics/issues/3

EhrmannS commented 2 years ago

https://github.com/luckinet/ontologics/commit/0ca4ab35342007f45af7f8db414d655b6203cd19