From: Timothy R. <tre...@st...> - 2014-04-06 02:09:30
|
Thanks for a much more useful and complete answer than mine was. I think though that there is a little more to be said with the valid languages. In particular, I don't think that the statement > These are somewhat ad-hoc; the RDF to OWL mapping spec only covers OWL > 2-DL, and the tolerant parsing mode has evolved incrementally. is quite right. I will come back to this. Here is my understanding of the situation. There are actually three OWL languages that are relevant: OWL 2 DL, OWL 2 and OWL 2 Full. The first two languages are described in the introduction to the language structural specification: http://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Introduction These two languages have a very simple relationship: OWL 2 DL is a subset of OWL 2 and they use the same semantics. (OWL 2 DL is first introduced in the third paragraph of the introduction). The OWL api handles OWL 2 and probably many reasoners work with the OWL 2 DL subset. The OWL 2 Full language is introduced in the document http://www.w3.org/TR/2012/REC-owl2-rdf-based-semantics-20121211/ This document is describing the semantics of an extension of RDF, so the syntax and the semantics of OWL 2 Full are distinct from the syntactic structure and semantics of OWL 2. Any RDF document can be parsed as OWL 2 Full. There is a theorem that describes the relationship between OWL 2 Full and OWL 2: http://www.w3.org/TR/2012/REC-owl2-rdf-based-semantics-20121211/#thm-correspondence So coming back to the statement that triggered this excursion: > These are somewhat ad-hoc; the RDF to OWL mapping spec only covers OWL > 2-DL, and the tolerant parsing mode has evolved incrementally. The RDF to OWL mapping specification does cover some ontologies that are OWL 2 but not OWL 2 DL. In particular, I think that the global restrictions on axioms that an OWL 2 DL ontology must satisfy are not relevant to the RDF to OWL 2 mapping specification: http://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Global_Restrictions_on_Axioms_in_OWL_2_DL However the typing constraints of OWL 2 DL do appear to be relevant: http://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL I think that the key to understanding these typing constraints is the slightly opaque statement: "These constraints are used for disambiguating the types of IRIs when reading ontologies from external transfer syntaxes." -Timothy On 04/04/2014 05:02 PM, Simon Spero wrote: > [Not addressed at Tim, hence subject line change) > > 1: Using a namespace is not the same as importing an ontology. > > The thesaurus fragment in the RDF/XML file defines an xml namespace, > "skos", which has the value "http://www.w3.org/2004/02/skos/core#". > > The IRIs <skos:Concept> and <skos:related> are expanded to references to > <http://www.w3.org/2004/02/skos/core#Concept> and > <http://www.w3.org/2004/02/skos/core#related>. > > However, these IRIs are just IRIs; they do not carry along with them > any of the axioms defined in the SKOS ontology. The OWL API parser > will make guesses as noted below, but some of these guesses are wrong, > and must, of necessity, be incomplete. > For example, OWL API will guess that by default, > <http://www.w3.org/2004/02/skos/core#related> is an AnnotationProperty. > > The fragment declares that <CoreSubjectThesaurus> is a > skos:ConceptScheme, and that <Abbreviations> is a skos:Concept. > However, because there are just IRIs, there is no way to infer that > these are different things; nor can we infer that <Land%20claims> is > a skos:Concept. > > Declaring an OWL ontology, and adding an OWL imports property will > bring in all of the available SKOS axioms [well, at least, the ones > that could be expressed in OWL 2-DL]. > <owl:Ontology rdf:about="http://www.thesaurus.gc.ca/concept/"> > <imports rdf:resource="http://www.w3.org/2004/02/skos/core"/> > </owl:Ontology> > > We can now make use of the axioms we weren't able to before. > > For example, if the thesaurus has BT relations, a reasoner will be to > tell that if A BT B and B BT C then A BT C ; it will also be able to > conclude that B NT A. [However, it will still not be able to deduce > that that C RT A is false, as that cannot be expressed using only OWL > 2-DL, so is only noted in a comment]. > > > > 2: Valid RDF vs. Valid OWL-2 DL vs Valid OWL 2 vs OWLAPI > > I think that the short answer is that this is not an OWL 2 > ontology. An OWL 2 compliant parser should reject your ontology > as unparsable. > In your small sample, notice that there are no declarations of > anything as owl entities > > It will parse as an OWL 2 Full ontology but the OWL api only has > partial support for that language. > > > > The original file was not valid RDF, due to an illegal space character > in an IRI. With the errant space properly escaped, the file can be > processed by the OWLAPI in LAX (not strict) mode. > > In order to load the ontology, OWLAPI has to make some guesses. These > are somewhat ad-hoc; the RDF to OWL mapping spec only covers OWL 2-DL, > and the tolerant parsing mode has evolved incrementally. > > Properties that aren't declared will usually be turned into Annotation > Properties, though a range declaration can generate an object or data > property as appropriate; a class assertion will lead to an assumed > class declaration, etc. > > The results are usually, but not always valid OWL 2-DL, due to the > gradual accumulation of repair heuristics over time - e.g. different > orders of triples can lead to different results; I don't think it's > possible to score a hat-trick anymore (get data, object, and > annotation property declarations inferred for the same property, but I > would not bet on it :-) The heuristics are not clearly documented in > any one place, and would be a good candidate for documenting or > refactoring - after version 4.0 :-) > > The heuristics used may not be the best choices for OWL 2 (Full), but > it's not always clear what the correct mapping ought to be when > converting to FSS Axioms. > > The API could be noisier / more selective when applying fixes and > catching exceptions. > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer |