bio-ontology-research-group / unit-ontology

An ontology of units of measurements
Creative Commons Attribution 4.0 International
19 stars 13 forks source link

Provide URIs for units as datatypes #29

Open cmungall opened 4 years ago

cmungall commented 4 years ago

we are exploring a has-quantity property that links a characteristic instance to a literal of the form "NUMBER"^^UNIT_DATATYPE

here is an example:

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix COB: <http://purl.obolibrary.org/obo/COB_> .

@prefix cellular_organism: <http://purl.obolibrary.org/obo/COB_0000118> .
@prefix has-characteristic: <http://purl.obolibrary.org/obo/COB_0000512> .
@prefix has-quantity: <http://purl.obolibrary.org/obo/COB_0000511> .
@prefix characteristic: <http://purl.obolibrary.org/obo/COB_0000502> .

@prefix cm: <http://purl.obolibrary.org/obo/UO_0000015> .

@prefix : <http://example.org/> .

:Chris a cellular_organism: ;
  has-characteristic: [
     a characteristic: ;
     has-quantity: "182"^^cm:
  ] .

This leads the owlapi to induce:

#################################################################
#    Datatypes
#################################################################

###  http://purl.obolibrary.org/obo/UO_0000015
<http://purl.obolibrary.org/obo/UO_0000015> rdf:type rdfs:Datatype .

I don't know if punning class vs datatype is allowed but it's kinda weird

https://github.com/OBOFoundry/COB/issues/35

cc @jamesaoverton

kaiiam commented 4 years ago

I don't know if punning class vs datatype is allowed but it's kinda weird

@cmungall if I understand correctly, the current use of UO that has the same purl be both the class and the instance of the class is "punning", and it might not necessarily be the best practice to do this? I'm curious about the reasons for this if you don't mind explaining a bit more why it might be stranger or non-desirable.

maybe use QUDT or something instead?

As far as I'm aware OM, OBOE and especially QUDT are the best available other units semantic resources it would be great to sync/map with them at some point. Are you suggesting that the instances of UO classes could or should be QUDT terms (or are they properties) or equivalent to them in some way?

cmungall commented 4 years ago

if I understand correctly, the current use of UO that has the same purl be both the class and the instance of the class is "punning"

Correct, this is one form of punning

it might not necessarily be the best practice to do this

it's perfectly logically valid. However, it is confusing for users. Some tooling may not explicitly take account of this. Or it may complicate the use of some tooling. See:

https://github.com/ontodev/robot/issues/709

Note also that neither OLS nor OntoBee show the axiomatization the makes each class equivalent to an enumeration of a single individual: http://purl.obolibrary.org/obo/UO_0000008

This is not necessarily bad, the browsers show the intuitive class-only view or the URI, but this itself could potentially lead to confusing as the punning and axiomatization is opaque

My proposal potentially makes things more confusing by additionally punning with datatypes. Over on the linked COB ticket we discuss the pros and cons of this model.

This is not straightforward and would be good to get @leechuck @jamesaoverton and others thoughts on this and arrive at something we can all agree on

As far as I'm aware OM, OBOE and especially QUDT are the best available other units semantic resources it would be great to sync/map with them at some point. Are you suggesting that the instances of UO classes could or should be QUDT terms (or are they properties) or equivalent to them in some way?

My thoughts on this are here:

https://github.com/pato-ontology/pato/issues/101