Hey has anyone ever used owl:annotated(Source|Property|Target), or know of an actual example of its use in some ontology?
It makes me sad that so much of the configuration these days is done in YAML. Coulda been RDF. I think XML is an issue because human readability is an issue.
I have always avoided RDF/XML, and ever since TTL became a standard I have only used RDF/XML when files were provided in that format. (typically, I run those files through riot)
XML had just come out a couple of years prior to RDF, and the W3C was still trying to show that it could be used to serialize any data at all. So it was mostly political to insist on using XML to serialize RDF. Unfortunately, this had multiple problems. The first was perception: people thought that RDF was merely an XML vocabulary, and why would they bother with all that complexity when simpler XML could save the same data? People did not see or understand that there was a graph data model. Sure itās described in the RDF specs, like the Primer, but most people never read these. So the benefits of RDF were lost on most people. Another problem was that the vocabulary was complex. There were so many ways to express exactly the same thing. It made these files inconsistent, and parsers hard to write. Itās also a very verbose format. Why would you want to triple the size of your data files by storing in RDF/XML, when it would be so much smaller in a CSV (for example)? Also, you may remember that there were a lot of people who were just skeptical of XML in the first place. Whether this view of XML was justified or not, this ill opinion extended to RDF.
(sorry⦠Iām clearly being very opinionated in this thread. I apologize)
the PROV ontology uses it
Iāve never used them, mostly because I always felt they were more for OWL Functional Syntax than for expressing in RDF.
For instance, the example given for OWL Functional Syntax is to create an annotation about a class called :Person
AnnotationAssertion( rdfs:comment :Person "Represents the set of all people." )
That seems reasonable, but in RDF, itās just the simple triple (Iāll use TTL):
:Person rdfs:comment "Represents the set of all people." .
There is nothing here at all to indicate that itās an annotation!
So if youāre using RDF then you probably want the annotation that associated with what you said above. Thatās called āassociating an axiom with an annotationā. The functional syntax example is:
SubClassOf(
Annotation(rdfs:comment "States that every man is a person.")
:Man
:Person
)
And in RDF that looks like:
:Man rdfs:subClassOf :Person .
[ a owl:Axiom;
owl:annotatedSource :Man;
owl:annotatedProperty rdfs:subClassOf;
owl:annotatedTarget :Person ] rdfs:comment "States that every man is a person.".
(there are dozens of ways TTL could represent this)
This looks almost exactly like RDF reification. And on the note of RDF reification, almost no one ever implemented it as intended (inferring the properties), and instead declared it explicitly, adding both complexity and space to databases. If I were to do the above, I would use a system that supports RDF-*, and add the annotation directly to the statement:
<< :Man rdfs:subClassOf :Person >> rdfs:comment "States that every man is a person." .
But of course, thatās not OWL.Anyway⦠my point is that I think that itās a fine thing for an OWL document in functional syntax, and not if youāre representing it in RDF.
Yeah, and it seems to me that the description could be a lot closer to the spec. Why is owl:annotatedProperty just a rdf:Property and not a owl:AnnotationProperty?, why is it in the domain of rdfs:Resource and not owl:Axiom? Should it not range over rdf:Property? Would it kill someone to put in a rdfs:seeAlso ?.
Maybe there's some arcane reason I'm not seeing that explains why they can't do this, but it seems like half-assedness to me. Frustrating to see in one of the flagship products of the whole RDF infrastructure.
I suspect your questions are rhetorical, and that they may run deeper, but I can answer what you asked:
> Why is owl:annotatedProperty just a rdf:Property and not a owl:AnnotationProperty?
Because this is a property of an Annotation object, which is used for referring to an axiom that is annotated. Meanwhile, the properties used to do the annotation (such as rdfs:comment or rdfs:label) are the instances of owl:AnnotationProperty.
> why is it in the domain of rdfs:Resource and not owl:Axiom
Because it can be used to annotate owl:Annotation as well, and these classes are not related.
> Should it not range over rdf:Property
Thatās reasonable (and if it were my choice, I would probably have done that), though itās not a particularly useful distinction, since there are no specific semantics applied there.
> Would it kill someone to put in a rdfs:seeAlso
Personally, I think thatās a great idea. That said, the development of each part of the spec is typically performed by different teams within the working group. The RDF document may have been finished first, which would make references to documentation harder to do. It would be possible, but it would involve a lot of to-and-fro, and thereās an expectation that youāre going to read the spec before you look in the RDF/XML file š
No need to apologize. I've enjoyed and benefited from the discussion.
Sorry, got called away from my desk for a few days. Thanks for the explanation @quoll. Yeah prov-o was a great example, thanks @peter.royal. So am I correct in the impression that the primary use case for these is for documentation, and that OWL reasoners to not make inferences from this stuff?
I'm wondering if this would be a good construct to use like this:
:SummarizationAxiom rdfs:subClassOf owl:Axiom;
rdfs:subClassOf [
owl:onProperty owl:annotatedProperty;
owl:hasValue :summarizes
];
.
:hasSpouse :summarizes :StateOfWedlock.
[ a :SummarizationAxiom;
owl:annotatedSource :hasSpouse;
owl:annotatedTarget :StateOfWedlock;
:subjectRole :hasPartner;
:objectRole :hasPartner;
].
Or
:hasPopulation :summarizes :Census.
[ a SummarizationAxiom;
owl:annotatedSource :hasPopulation;
owl:annotatedTarget :Census;
:subjectRole :assessedRegion;
:objectRole :numberOfResidents;
].
Then maybe using SHACL rules or maybe just SPARQL to make inferences in either direction as appropriate.I donāt know how well it will work. The idea of annotations is that OWL reasoners will ignore them. I donāt know if they will ignore a subclass of owl:Axiom or restrictions on classes for the owl:annotatedProperty but they would be entitled to. So you could find the annotations failing to materialize properly.
Ah. OK. Thanks.
The OWL spec seems kinda under-specified:
owl:annotatedProperty a rdf:Property ;
rdfs:label "annotatedProperty" ;
rdfs:comment "The property that determines the predicate of an annotated axiom or annotated annotation." ;
rdfs:domain rdfs:Resource ;
rdfs:isDefinedBy <> ;
rdfs:range rdfs:Resource . Were they just being lazy I wonder?
But thatās a description, not the spec. The spec is at: https://www.w3.org/TR/owl2-syntax/#Annotations
Not that Iām saying the spec is particularly tractable š It reads like one of those things you have to already understand in order to understand it
Truth to be told, I would rather have a root canal than look at an RDF/XML file š±, but it's easy enough to translate those into Turtle. Reading w3c OWL specs is not that much better š. I take your point about the subtle distinction between Annotation Properties and properties of Annotation objects. A distinction that apparently does not merit the digital ink it would take to make this explciit. As for the domain description, domains and ranges can be expressed as unions, can't they? But you're right, I'm mainly bitching about my feeling that one of RDF's great value propositions is to serve as a medium for systematic technical specifications, and the people who define OWL seem to be pulling their punches in this regard. This, the XML thing, and a number of other things aggregate into a massive WTF factor. So now we all Describe Resources using not the Resource Description Framework, but instead use Yet Another Markup Language.
I think XML is a non-issue. Itās just a format for data serialization. Itās unfortunate that it was the only official format for many years, and one outcome of that was that the OWL WG had no choice but to publish the OWL doc using it.
Of course, these files can be converted without any real problems
> As for the domain description, domains and ranges can be expressed as unions, canāt they? Well, they can be a class, and classes can be defined as unions, yes. I guess I would use RDFS for the union, since domain/range are RDFS vocabulary, but thatās just my preference
> So now we all Describe Resources using not the Resource Description Framework, but instead use Yet Another Markup Language I donāt follow this at all?