Warning:
This wiki has been archived and is now read-only.

Annotation system 2

From OWL
Jump to: navigation, search

Overview

This is a proposal for richer annotations, with ideas taken from [1] and [2], including a limited ability to have annotations on annotations. Annotations are serialized to a second OWL file associated with the source ontology in style suggested by [1]. Not all features from either [1] or [2] are included in the interest of making the proposal simpler. Specifically, [1] includes a reified representation of the axioms in the ontology available in the meta-ontology, and proposes a query language for querying across a combination of domain and meta statements. The first of these would be compatible with this proposal, the second seemingly out of scope of our effort. [2] proposes multiple annotation spaces, as well as qualifiers mustUnderstand, mayUnderstand for these spaces. I did not evaluate multiple annotation spaces to keep this proposal simpler. This proposal corresponds to mayIgnore. I have not consider what would be involved in extending this proposal to include any further aspects of those proposals.

Call m(O) the second ontology which contains the annotations.

Specifying Imports for m(O)

AnnotationsImports(ontologyURI)

Notes an ontology that should be imported to m(O).

Ontologies imported into m(O) have annotations in them stripped on import so that we don't have a cascade of associated annotation files m(m(O)) m(m(m(O))) ...

Extending AnnotationProperty axiom to specify property type in m(O)

AnnotationProperty(AP [mPropertyType])

mPropertyType is one of ObjectProperty, AnnotationProperty, DatatypeProperty. If not specified mPropertyType defaults to AnnotationProperty

New element of RDF mapping syntax

+:xxx 

A fresh uuid is allocated and substituted for each occurance +:xxx within the ontology.

Serialization of Annotations in O

Each entity or axiom that has an annotation has a new triple added to the serialization of O to associate a name with the entity for the purpose of annotations. The property owl:annotatedAs is used for this purpose and is considered an annotation property for the purposes of OWL Full, and invisible for the purposes of OWL DL.

For:

EntityAnnotation( EntityType( E )
    Annotation( AP1 ect1 )
    ...
    Annotation( APm ectm )
)

we add

E owl:annotatedAs E 

For:

AnonymousIndividualAnnotation( _:a 
    Annotation( AP1 ect1 )
    ...
    Annotation( APm ectm )
)

we add

_:a owl:annotatedAs +a-anon

For Axioms:

Reification of Single and Multiple triple axioms that are annotated is as in the current spec. However annotations are not attached to the reified statements. Instead only add the annotation

_:x1 owl:annotatedAs +axiom-n  

Where n is a unique number for each axiom in O.

For multiple triple axioms, this annotation is repeated on each reified triple.

Serialization of annotations in m(O)

Each entity or axiom that has an annotation has a name that relates it to the entity or axiom it annotates in the source ontology. We relate annotations on the entity by relating them to this name in m(O).

  • For each AnnotationsImports(ontologyURI) in O we add Imports(ontologyUri)
  • For each AnnotationProperty(AP [mPropertyType]) in O we add mPropertyType(AP)

For:

EntityAnnotation( EntityType( E )
    Annotation( AP1 ect1 )
    ...
    Annotation( APm ectm )
)

we add

E rdf:type owl:AnnotatedEntity
ect1 rdf:type owl:AnnotatedEntity
...
ectm rdf:type owl:AnnotatedEntity
E AP1 ect1
...
E APm ectm

For:

AnonymousIndividualAnnotation( _:a 
    Annotation( AP1 ect1 )
    ...
    Annotation( APm ectm )
)

we add

+a-anon rdf:type owl:AnnotatedAnonymousIndividual
ect1 rdf:type owl:AnnotatedEntity
...
ectm rdf:type owl:AnnotatedEntity
+a-anon AP1 ect1
...
+a-anon APm ectm

For Axioms

for +axiom-n annotated with

Annotation( AP1 ect1 )
...
Annotation( APm ectm )

we add

+axiom-n rdf:type owl:AnnotatedAxiom
ect1 rdf:type owl:AnnotatedEntity
...
ectm rdf:type owl:AnnotatedEntity
+axiom-n AP1 ect1
...
+axiom-n APm ectm

Annotations on Annotations

I propose a single level of further annotations on annotations. This would be accomplished by reifying the annotation type triple in m(O) and adding annotations of annotations to that reified statement.

e.g.

EntityAnnotation(Individual(sam)
		  Annotation(rdfs:label "sammy"
			       Annotation(rdfs:comment "called that as a kid")))

would result in no statements added to O.

and in m(O)

sam rdfs:label "sam"
_:x rdf:type rdf:Statement
_:x rdf:subject sam
_:x rdf:predicate rdfs:label
_:x rdf:object "sam"
_:x owl:annotatedAs +axiom-n
+axiom-n rdf:type owl:AnnotatedAnnotation
+axiom-n rdfs:comment "called that as a kid."

Note that the english referent of "that" is "sam", not the axiom, so the above might be considered a modeling error by some. There currently no provision to directly annotated the object of an annotation specifically.

using SELF in annotations

In each case, serialization of Annotation( AP ect ) eventually results in a single triple. Call subject the first element of that triple.

subject AP ect.

If we have, instead,

Annotation(SELF AP ect )

we serialize as above.

If we have

Annotation(ect AP SELF )

we serialize as

ect AP subject.

Annotations with SELF as predicate are disallowed.

Annotations (annotation bundles)

The semantics of an annotation bundle were not exactly clear to me. Specifically, what would the difference between a bundle and a series of separate annotations? However, on thing that bundles introduced was the ability to add arbitrary facts to the annotation space. Here we extend the syntax and allow (at top level, not only current annotation contexts)

Annotation(s AP o)

To O we add

s owl:annotatedAs s
o owl:annotatedAs o

to m(O) we add

s type owl:annotatedEntity
o type owl:annotatedEntity
s AP o

Semantics, Query

Each ontology is reasoned over as a separate document - satisfiability and consistency of each can not affect the other.

Although no query is defined, once can imagine a not-implausible scenario where SPARQL queries with each ontology as a "virtual graph" in a separate named graph would yield useful access queries across ontology and meta-ontology.

Known issues and open questions

  • I haven't specified or given a way to specify the uri for m(O).
  • Should "simple" annotations, in particular the builtin label and comment, be applied to entities be serialized to O (in addition or instead of m(O)).
  • Version URIs?
  • How do imports work. I think that it is the case that if O imports O' then m(O) would import m(O'), but haven't thought this through well enough.
  • Does the two file solution for RDF necessitate that a two file solution be used for the XML syntax. Hope not.
  • Are all three classes owl:AnnotatedEntity, owl:AnnotatedAxiom, owl:AnnotatedIndividual necessary or can we do with just a single owl:AnnotatedThing
  • for Annotation(s AP o) do we care if s and o are declared in O? If they aren't should the x owl:AnnotatedAs x statements desirable?
  • It has been proposed that an alternative to two files is to instead include the serialization of the second file as, e.g. an ontology property