owl protege how can I describe a class that has just some properties?
Asked Answered
A

1

5

Is it possible in protege (Thus in owl) to describe a class depending if it has some properties?

For example

I have a class Home, and I want to say that every instance that has property1 and property2 and property2 is considered an instance of that class?

Anglim answered 18/4, 2015 at 15:28 Comment(0)
D
19

Suppose you have a class Duck and you want to say that if something walks like a Duck, and talks like a Duck, then it is a Duck. You can do that with a class axiom:

        ((walksLike some Duck) and (talksLike some Duck)) SubClassOf Duck

A subclass axiom like this, where the left hand side is not just a class name, but is a complex class expression, is called a General Class Axiom. You can enter these in Protégé, under the Active Ontology tab:

General Class Axiom in Protege

For more about general class axioms, you may find Being complex on the left-hand-side: General Concept Inclusions useful.

Dufy answered 19/4, 2015 at 1:56 Comment(7)
Many thanks but I was looking for something different. First, I do have a name for this class, for example, but in your case, the class doesn't have a name. Second, i don't know the value of the relationship (property), and I don't care about the value, I just care that the instance does really have that property and that is enough for me, could you help please?Anglim
If you have a name for your class then you can reverse the axiom described by Joshua: YourClassName SubClassOf (talksLike some Duck); if the type of the filler is not important, i.e., you don't care those are Ducks, you can use Thing instead. YourClassName SubClassOf (talksLike some Thing);Panada
@MarcoDinatsoli Which of the following are you trying to say: (i) "IF something has values for properties P1 and P2, THEN it is an instance of C."; or (ii) "IF something is an instance of C, THEN is has values for properties P1 and P2"?Dufy
@JoshuaTaylor the first one, but in more presice words, i am trying to define a class, with all his instances has value (random value) for two properties, and i know the class name. (note, i can use equevlent, but in the assignment, i can't use direct subclass of )Anglim
@MarcoDinatsoli Well, if you only want one direction ("if A then B", but not "if B then A"), you need a subclass relationship. An equivalent class relationship will always give you both directions. The "some" restriction doesn't specify a particular value, just that there is some value from a particular class. E.g., (Human subClassOf (hasMother some Human)) doesn't specify anyone's particular mother, but just says that every Human has a Human mother. Anyhow, instead of (walksLike some Duck) you can say (walksLike some Thing), since all individuals are Things, or (walksLike min 1).Dufy
@JoshuaTaylor I tried your suggestion as this and (hasGarden min 1 ) and (hasSwimmingPool value true) where hasGarden has a range boolean, and I got error in the protege, i couldn't click okay until i change it to and (hasGarden min 1 boolean ) and (hasSwimmingPool value true) is that correct please?Anglim
@Marco Ah, I thought you were using object properties; yes, for datatype properties you might have to specify the datatype there. But (hasSwimmingPool value true) says that the actual value for "hasSwimmingPool" will be true, not just that there is a value for "hasSwimmingPool". Earlier you said I don't know the value of the relationship (property), and I don't care about the value, I just care that the instance does really have that property, so it should probably be (hasSwimmingPool some boolean) or (hasSwimmingPool min 1 boolean) [those are equivalent].Dufy

© 2022 - 2024 — McMap. All rights reserved.