Warning:
This wiki has been archived and is now read-only.

Decision Incubator Tools/OWL Tutorial Hints

From Decision XG
Jump to: navigation, search

Sentence 1

  • Class or instance? Think about what you want to say, i.e. what are the requirements? If doll is an instance of toy you can state facts about dolls, i.e. dolls are your most fine grained objects in your domain. However if you want to state facts about specific kinds of dolls, or even particular doll objects in the real world, then (at least in OWL 1.0) you need to model doll as a class in order to be able to later instantiate it. In the case of this sentence, take a look later in the sentences, will you create facts about individual dolls?

Sentence 2

  • Defined as? We usually add class restrictions in two ways, either as subclass restrictions or as equivalent class restrictions. A subclass restrictions says (roughly) that the instances of the class we are creating is a subset of the instances of the superclass. For example, the class "doctor" could be defined as a subclass of the class "persons that have a medical degree", meaning then that doctors have to have a medical degree but there area people with medical degrees that are not doctors. On the other hand an equivalent class restriction says (roughly) that the set of instances of the class we are defining can be identified by this exact restriction, i.e. the classes have the same set of instances. For example, the class "adult" could be defined as equivalent to the class "people over the age of 18" (which is by the way not an easy constraint to represent natively in OWL). With an equivalent class restriction we can classify new instances as belonging to the class or not, with only the subclass restriction we cannot spot class members using the reasoner.

Sentence 3

  • Cannot be both? This is cue for adding a disjointness axiom. Classes in OWL are not disjoint by default, if you want two classes to be disjoint you have to state it explicitly, otherwise instances may be inferred to belong to both classes. Disjointness means that no individual can even belong to both classes.

Sentence 4

  • Again we are defining a class, which is the equivalent of some other class. So we put a class definition in the slot for equivalent classes of young person. What we want to say it that the class of young persons is equivalent to the union of the classes of young men and young women, i.e. there is nothing else than those two kinds of young persons.

Sentence 5

  • Time to create some instances. Instances should always have a type, i.e. a class that they are an instance of. If you don't know a more specific type you make them instances of owl:Thing, which is the top concept of all OWL ontologies. Emily and Lenore are instances of the class "Doll".
  • In our case we also know something about the instances, so let's add some facts (RDF triples). We know that these particular dolls are "famous". There are other ways of modeling this but one option is to add the class "Popularity" with instances such as "famous" and "notFamous", and then the property "hasPopularity". Based on this we can add the triple "Emily hasPopularity famous".

Sentence 6

  • Add this on the "young woman" class.
  • Are there other things than young women that play with some doll? If so -> young women are a subclass of this class.

Sentence 7

  • Add this to the young women class (again).
  • Are there other things/people that also play only with famous dolls or is this how we can identify young women?

Sentence 8

  • Cardinality constraint on the young man class.
  • Note: saying "all things that have at least one value for this property" is also a class definition, hence, we can define something as a subclass of this.

Sentence 9

  • Create an instance.

Sentence 10

  • Use the owl:differentFrom construct.

Sentence 11

  • Use the owl:sameAs construct.

Sentence 12

  • If playing is a property, then dressing needs to be a sub-property. Properties are arranged in a hierarchy just as classes.
  • Sub-properties do not inherit all the "attributes" of their super-properties, rather the inference engine will infer that the super-properties also hold.
  • "...where the toy is a doll." refers to a range that is different from the super-property.

Sentence 13

  • Create a new object property, then define it to be the inverse of the other one by using owl:inverseOf.

Sentence 14

  • This will be two (or four if you also create the inverses) new properties, on being the sub-property of the other one.
  • The related-to property needs to be defined as a transitive property, which is a special type of object properties.
  • Since "attributes" such as transitivity are not inherited by sub-properties, you do not need to say that the sub-property is "not transitive". Just create a sub-property that is a "normal" object property.


.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.