There is a question I have been asking myself since I first got confronted with ontology modeling. My first attempt to learn OWL was through the famous Pizza tutorial and it occurred to me that there was a clear difference between the two concepts PizzaTopping and MozarellaTopping, the first one still being very generic and abstract, and the second one not so much. If I had to model this situation, I would have naturally used a class for PizzaTopping and an individual for MozarellaTopping (with a type PizzaTopping)... and yet they are both classes in the tutorial. Why ?

I understand why this is correct (or valid) to do it that way, but I can't find a reason why it would be a good way of doing it.

Is there any good practices that apply to most cases ?

[edit] I replaced CheeseTopping by MozarellaTopping to clarify the example.

asked 31 Jan '12, 12:11

morphyn's gravatar image

accept rate: 0%

edited 31 Jan '12, 12:48

What about BuffaloMozarellaTopping?

(01 Feb '12, 07:44) Michael Schn... ♦ Michael%20Schneider's gravatar image

Why might MozarellaTopping be a class? Because there's one mozarella topping on my pizza, and another mozarella topping on your pizza. The ontology views individual pizzas as ... well ... individuals, each with an individual topping from some class. This might suit a pizzeria, for example, that wants to keep track of sales of toppings for each pizza.

A better example might be the book "The Road" which we'll call ex:The_Road. It's an individual right? A member of ex:Book?

...well, not necessarily. If you were in a library (or a bookstore, etc.), you might have several copies of ex:The_Road, each with its own library code, each with its own location or availability/unavailability, each with its own front-cover illustrations, etc. In this case, calling ex:The_Road a class makes sense.

Conversely, if you were making an ontology for a book review site, you're indifferent to that level of granularity. Any copy of the "The Road" is the same, so you can call ex:The_Road an individual.

In other words, as per the other answers, the choice between class and individual is often contextual, and application-dependent.

permanent link

answered 31 Jan '12, 13:36

Signified's gravatar image

Signified ♦
accept rate: 37%

I was about to answer exactly the first part of your answer...

(31 Jan '12, 13:46) Antoine Zimm... ♦ Antoine%20Zimmermann's gravatar image

Yes, excellent, concise, example.

(31 Jan '12, 14:13) scotthenninger ♦ scotthenninger's gravatar image

@Antoine, the key is to hit refresh every 7 seconds so you get a head-start over the competition. :)

@scott, thanks!

(31 Jan '12, 14:21) Signified ♦ Signified's gravatar image

Thanks! I didn't see it that way (obviously)

(31 Jan '12, 14:55) morphyn morphyn's gravatar image

@Signified and @Antoine, this site should really have auto update! :-)

(01 Feb '12, 08:48) Michael Schn... ♦ Michael%20Schneider's gravatar image

To some degree it is just common sense where you make the distinction and where you make the distinction may vary depending on your domain. Typically if something can encompass multiple individuals with different characteristics it should be a class but YMMV

In terms of your specific example cheese is still a very generic term - if I go to the supermarket to buy cheese there are hundreds of varieties to choose form (less so if you live in the US where it is all plastic and orange ;-) ) and each variety has very different characteristics in terms of color, taste, smell etc. Equally if I order pizza I can often choose pizzas with a variety of different cheeses used as toppings.

So CheeseTopping IMO is most definitely a class because it encompasses a wide variety of things, whereas something like MozzarellaTopping would be an individual since it is specific enough to refer to just one thing

permanent link

answered 31 Jan '12, 12:25

Rob%20Vesse's gravatar image

Rob Vesse ♦
accept rate: 29%

I really didn't choose the best example... but I guess my point still stands since MozzarellaTopping is also a class in the tutorial :)

You're answer confirms what I was thinking: it's a matter of common sense...

(31 Jan '12, 12:44) morphyn morphyn's gravatar image

Yep, @Signified kinda covers the reasons why MozzarellaTopping should also be a class

(31 Jan '12, 19:21) Rob Vesse ♦ Rob%20Vesse's gravatar image

I haven't seen the ontology, but a better analogy would have something like MeatTopping as a subClassOf a PizzaTopping - i.e a more specific class of topping,. Some individuals of this class might include pepperoni (my favourite), ground beef and chicken, actually a poultry, but under most Pizza menus, comes under meat toppings. I can't also comment on whether its a good or bad ontology, but the point is, specifying like this lets you create other classes like PizzasSuitableForVegetarians (owl restrictions excluding any toppings that are MeatToppings or complement thereof). You probably need to spend more time discussing this with a real Pizza domain expert. Maybe it would also help trying a few pizzas at a few different restaurants.

permanent link

answered 31 Jan '12, 12:24

William%20Greenly's gravatar image

William Greenly
accept rate: 13%

I will definitely take this last advice :)

More seriously, my issue is not directly related to the Pizza domain and I may not have chosen the best examples. Let's take the PepperoniTopping that you're suggesting: for me it's clear that it should be an individual and not a class, but I don't really know why. Maybe because I wouldn't want to bother the creator of the ontology every time I want to add a fancy new topping ?

(31 Jan '12, 12:32) morphyn morphyn's gravatar image

Ok, so there is also a line of thought (somehow associated with OWL FULL) that saying every instance is also a a class (just as every class is also an instance). In this example or might actually describe the physical lump of cheese that is an instance of a cheese topping.

(31 Jan '12, 12:49) William Greenly William%20Greenly's gravatar image

William, it's not generally true that every instance is a class in OWL Full, but the opposite is always true.

(31 Jan '12, 13:22) Antoine Zimm... ♦ Antoine%20Zimmermann's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 31 Jan '12, 12:11

question was seen: 3,707 times

last updated: 01 Feb '12, 08:48