information-artifact-ontology / ontology-metadata

OBO Metadata Ontology
Creative Commons Zero v1.0 Universal
19 stars 8 forks source link

Why are so many Annotation Properties out there Object or Data properties in the standards that define them? #90

Open matentzn opened 2 years ago

matentzn commented 2 years ago

After years of working with OWL, I am really at a loss on that one - it does not make any sense to me. The OWL 2 spec states:

However, OWL 2 DL still imposes certain restrictions: it requires that a name cannot be used for both a class and a datatype and that a name can only be used for one kind of property.

This means an annotation property cannot be a data or object property at the same time.

We have been trying to look into MOD (https://www.isibang.ac.in/ns/mod/index.html), SKOS and other vocabularies as sources of properties for our metamodelling (provenance, comments, licensing, etc). Wherever in the Semantic Web world I look, I see people expressing properties intended for metada modelling as Data or Object Properties. Why? The only thing I can think of is that none of these semantic web vocabularies were defined with classes in mind (only "individuals").

Lets look at this example, where we import dcterms:creator from MOD 2 to say: "TMP:0000001" was created by {some IRI}.

Declaration(Class(<http://purl.obolibrary.org/obo/TMP_0000001>))
Declaration(ObjectProperty(<http://purl.org/dc/terms/creator>))
AnnotationAssertion(<http://purl.org/dc/terms/creator> <http://purl.obolibrary.org/obo/TMP_0000001> <https://orcid.org/0000-0002-7356-1779>)

While this is not recognised by the OWLAPI as out-of profile, if you load save it with the API, it will be turned into this:

Declaration(Class(<http://purl.obolibrary.org/obo/TMP_0000001>))
Declaration(ObjectProperty(<http://purl.org/dc/terms/creator>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/TMP_0000001>))
Declaration(NamedIndividual(<https://orcid.org/0000-0002-7356-1779>))
ObjectPropertyAssertion(<http://purl.org/dc/terms/creator> <http://purl.obolibrary.org/obo/TMP_0000001> <https://orcid.org/0000-0002-7356-1779>)

So introducing a pun on my class to an individual, than attaching the assertion as an object property assertion. I am assuming that there is no one out there that believes that this is a good thing.

Neither can I believe that MOD, SKOS, PROV, PAV and other vocabulary developers where thinking we would be using existential restrictions for meta modelling:

T:1 subClassOf dcterms:creator some <https://orcid.org/0000-0002-7356-1779>

This will imply that T:2 was also created by https://orcid.org/0000-0002-7356-1779.

T:2 subClassOf T:1

So here my question: how are we supposed to re-use MOD, SKOS, PROV, PAV directly? The only way I see is to import the IRIs into OMO and re-type them from object/data to annotation properties. Please tell me that I am wrong!

Please help @jonquet @AlasdairGray @cmungall

cmungall commented 2 years ago

Very good points.

I don't see any way forward other than what you say: re-type.

But we can formalize the procedure and push this upstream to providers of metadata ontologies. For any metadata ontology O there is a parallel O-dl (with some standard naming/IRI convention) that can be imported into OWL-DL TBox ontologies, where all DPs/OPs are retyped as APs and any inapplicable logical axioms are removed.

(more formally: at the RDF/OWL-Full level a lot of triples like rdfs:subPropertyOf can remain, but if we are implementing at the OWL-DL level there is an actual axiom change here)

TBD: should APs have ranges auto-added? E.g. if an OP is retyped we know it's applicable to Things not literals. We can add an annotation property range to owl:Thing which would induce punning if APs were not ignored by OWL-DL, so I think it's safe and useful to add these

alanruttenberg commented 2 years ago

The behavior you are getting seems wrong to me. It should complain that it is out of profile. I've submitted a ticket to the OWLAPI repo. As for solution, Chris is correct that you need to re-type them. Yes it is annoying.

matentzn commented 2 years ago

Thank you both.. now what is remaining is someone to tell me why :P

biswanathdutta commented 2 years ago

Yes, we also faced this problem during the design and testing of MOD (the OWL file). This is due to the fact, as we realized, OWL DL does not support punning for the properties (though OWL 2 DL supports punning for Classes and Individuals.)

cmungall commented 4 months ago

Given this issue is already non-actionable, I'll add an unsolicited opinion:

APs are a massive hack necessary for OWL1. With OWL2, classes can be sort-of-effectively in the Domain of Discourse. We could be much more precise and use DPs and OPs on classes, and dispense with APs. We could use reasoning in a more unified way to validate TBox axioms over the biological domain and OMO TBox over the OMO domain (e.g. max cardinality constraints on literals). This would solve multiple entire categories of problems we face from validating OMO through to DPs.

Of course, in practice punning is massively confusing in tools like Protege, and my proposal to dispense with APs, while theoretically sound, might be a disaster with current tooling.

So my comment is slightly pointless but I hold out hope that we will one day have a more appropriate framework for knowledge representation.

biswanathdutta commented 4 months ago

Thank you @cmungall for reactivating issue#90 I went through the comments/ questions raised by @matentzn

Answering @matentzn, re-use of, for example, MOD can happen in two ways:

  1. use MOD suggested properties (OPs and DPs) for creating semantic artifact metadata. For this, we have to re-type the properties (as @cmungall @alanruttenberg and others said). We do not have any tool (as per my knowledge) at this time that would allow us to import the MOD OPs and DPs as APs.

Here, MOD acts as a metadata vocabulary providing a set of elements for describing the semantic artifacts

  1. use MOD ontology (the TBox) readily to generate KB for semantic artifacts. This is a straightforward re-use of MOD.

Here, MOD acts as an ontology, a KR model for facilitating the creation and capture of information about semantic artifacts. The knowledge about semantic artifacts and related objects can be reasoned.

@jonquet may add more.

matentzn commented 4 months ago

@biswanathdutta

use MOD ontology (the TBox) readily to generate KB for semantic artifacts. This is a straightforward re-use of MOD.

Not sure what this means practically. Can you elaborate?

@cmungall what you are saying if I understand it correctly is to basically accept that if we assert:

my:Class prov:wasGeneratedBy their:Activity

with prov:wasGeneratedBy being an OP, that my:Class becomes types as an owl:Class and owl:NamedIndividual (which is legal punning).

Lets entertain this thought for a moment. Why do we believe this is all that bad? The only tool we urgently need to sort out is module extraction, but apart from that, and the fact this looks funny in Protege, what is most at risk to break?