Re: Using boolean value vs class

On 26/09/2019 11:07, Mikael Pesonen wrote:
> Thank you for all the replies - very informative. Purpose of my question 
> was to think of a general case where one would like to tag something 
> with boolean value. It seems like the use of property vs class is 
> dependent of the case.
> 
> And realized that the same question applies to other than binary values 
> too.  It doesn't make sense to make classes for, lets say, file sizes 
> :FileOfSize1, :FileOfSize2 ... :FileOfSizeN, but could be useful to 
> smaller set of colors etc.

Color, hmm ...

In modelling terms then a useful test to think about is whether the 
characteristic is somehow intrinsic to the nature of the things you are 
modelling or just a descriptive property.

The classic example of this is a Wine Ontology.

In some domains, such as plastic toys, then colour is just a 
characteristic that varies, largely independent of other characteristics 
and so is typically modelled by a property.

With wine then the broad characteristic of whether it is a red or white 
wine is pretty intrinsic and affects the other properties that are 
relevant. For red wines you might be interested in properties like 
tannin levels and how "full bodied" whereas for white wines it might be 
things like acidity. So in that case you would often regard red and 
white wines as different classes.

There's no hard and fast difference here. In OWL you can say RedWines 
are any Wines that have a colour value of Red, and vice versa, and so 
move between class and property based representations how you like. But 
to communicate intent to other modellers then choosing to use a class to 
convey things that are key characteristics and affect other properties 
is often helpful.

Also, in practical terms then if a characteristic is quite changeable 
then using a property makes it easier to represent that change over time 
if you need to. There are common patterns of n-ary relationships that 
can model time dependent property values quite well. While there are 
approaches to represent change in class membership over time my 
subjective opinion is they are harder to work with. YMMV

Dave

> Even if semantic web languages have open world assumption, IMHO in real 
> world applications boolean values are closed world. Meaning that if you 
> have a boolean value in your data model, missing of the value from data 
> states the opposite. Missing of :isDeprecated or not belonging to 
> :Deprecated means that the resource is not deprecated.
> 
> I don't understand OWL reasoning enough yet to say how thing work there.
> 

Received on Thursday, 26 September 2019 10:59:47 UTC