- From: Hugh Glaser <hugh@glasers.org>
- Date: Tue, 24 Sep 2019 14:57:44 +0100
- To: Antoine Zimmermann <antoine.zimmermann@emse.fr>
- Cc: semantic-web@w3.org
Very interesting question, thanks - it helps me explore my understanding. Sorry - as I have said, I'm not really very good on this stuff, but I do like to try to understand. Antoine, some of what you say puzzles me. Looking at class :Deprecated > The second model with a class :Deprecated ensures that an entity is either of type :Deprecated, or not. Is it not more properly the case that an Entity is either of type :Deprecated or we don't know? (Open world) So the boolean version seems to perhaps give me a richer way of recording knowledge. To model the boolean equivalent, you could also have a :notDeprecated class. And then you would have the same four categories for the class version as you have for the boolean version. (Not saying this is good!) [Hang on - I have just realised that Mikael makes no suggestion that he will ever assert "false" - so your introducing the "false" categories (3 & 4) is like me introducing the :notDeprecated class.] Although I worry about your argument here, I think that the general principle may well be very good. If you see booleans, especially where they always seem to be "true", it is a flag that maybe a class should be used. (This is very similar to seeing "= true" in an expression in a programming language, someone isn't thinking right :-) ) I usually view an rdf:type triple as nothing special compared with any other. You assert them and match them just the same. It just so happens that "we" have chosen that we can do sub-classing, and so if we do that, we get some special magic that can happen, which doesn't happen with everything else. And that is sometimes very useful, although it can make things quite hard to get the hang of. Then, as you say, there are a whole bunch of practical questions about efficiency of stores and reasoners when you do things in different ways. But, as with programming, most efficiency things should be left to the system implementation, and the source should be modelled in the most understandable and maintainable way. Best Hugh > On 24 Sep 2019, at 13:48, Antoine Zimmermann <antoine.zimmermann@emse.fr> wrote: > > Mikael, > > > These two options definitely affects reasoning. > > If you have a property :isDeprecated, then any entity can fall into 4 disjoint categories: > > 1. The entities that have no value for :isDeprecated. > 2. The entities that have value "true" only. > 3. The entities that have value "false" only. > 4. The entities that have both values "true" and "false". > > Moreover, if the range of the property is unrestricted, it can have all sorts of literal values, in any combination. > > If you want to make sure that all entities have exactly one of "true" or "false" as value for :isDeprecated, you need to introduce a cardinality axiom, which increases the complexity of reasoning (and you need to find a reasoner that supports cardinality restrictions on datatype properties). > > The second model with a class :Deprecated ensures that an entity is either of type :Deprecated, or not. This comes for free with any reasoner that supports a logic as simple as RDFS, without extra axioms. Many more reasoners support axioms made on classes than axioms made on literals and datatype properties. It's easier to define subclasses of deprecated documents, for instance. > > In general, when I review an ontology document, I mark all use of boolean properties as a mistake. Usually, boolean properties comes from adopting a programming approach to ontology engineering rather than a knowledge representation approach (that is, it uses the ontology as a data structure for computation rather than as an information model about the world, for knowledge interchange). > > However, when you have to go back and forth between an existing data model such as tabular data etc. and RDF, it can be convenient to translate booleans to booleans, so there can be exceptions to my rule of thumb of excluding all boolean properties. > > > Best, > --AZ > > Le 24/09/2019 à 13:57, Mikael Pesonen a écrit : >> Hi, >> lets say we have documents and we want to say wheather they are valid or deprecated. There are two ways to do this: >> :doc1 a foaf:Document ; >> :isDeprecated "true"^^xsd:boolean . >> or >> :doc1 a foaf:Document ; >> a :Deprecated . >> Are there some different implications on the use? Does is affect OWL reasoning, for example? >> Mikael > > -- > Antoine Zimmermann > Institut Henri Fayol > École des Mines de Saint-Étienne > 158 cours Fauriel > CS 62362 > 42023 Saint-Étienne Cedex 2 > France > Tél:+33(0)4 77 42 66 03 > Fax:+33(0)4 77 42 66 66 > http://www.emse.fr/~zimmermann/ > Member of team Connected Intelligence, Laboratoire Hubert Curien > -- Hugh 023 8061 5652
Received on Tuesday, 24 September 2019 13:58:19 UTC