Hide menu

Hands-On Session: Basic OWL modelling

Overview and tools

The idea behind this hands-on is to introduce the basic constructs in OWL and how to find them (in the tool) and use them, within an ontology engineering tool. The tool to use is up to the participants, but in the lectures Protege 5 will be used.

Protege can be downloaded from here.

Alternative tools to use: If you cannot or do not want to download any tool, you can use WebProtege, which is also online here, but that will not have all the functionality for all the hands-on sessions, so you will have to skip some parts. For more advanced users, and users who are very familiar with the Eclipse environment an alternative is to download the trial version of TopBraid Composer.

If you need to (or want to) look something up in the OWL specification, the best place to look is probably the OWL2 Primer.



Exercise

In this hands-on, you will try to model the sentences expressed below in OWL. Just try to express the sentences as closely as possible to what you think the intended meaning is, but you don't need to model anything beyond what the sentence actually states. Some sentences build on previous sentences, but some do not, don't worry that your ontology will look a bit strange in the end, i.e. where some things are used in other definitions and axioms and some are not. Sometimes you may also have to read the other sentences that comes next to be able to understand the best way to model the sentence at hand. The very last sentence should be interpreted as an instruction and question to you, rather than a sentence to literally model in the ontology.

Please note, that as always in modelling, there is not one correct solution. The choice of what becomes concepts and what becomes instances is one such example. Yes, you need to include some instances in this case, which would probably rather be data expressed somewhere else than in the ontology if this was a "real" ontology, but this is just for the sake of the exercise - so in this case everything should be included in one ontology file. You can save your file for instance in the Turtle syntax (Phd students have to hand in this file as part of the course examination). The URI of the ontology does not matter, use any "example" URI you can think of or the one suggested by the tool. You do not need to comment you ontology or the elements inside it, although that would normally be a good practice if you were creating and sharing an ontology with others.

  • Women are defined as persons that are also female (hint: you can use a class intersection)
  • A person cannot be both a man and a woman (hint: disjointness)
  • Persons are either men or women (hint: you can use a class union)
  • Liking something is a relation applicable to persons (hint: use a domain restriction)
  • A car is a kind of vehicle (hint: subclass relation)
  • Ferrari and Alfa Romeo are Italian cars (hint: in this case we will model car brands as instances of cars, we do not care about individual physical cars)
  • All women like some car (hint: others may also like cars, so use a subclass restriction rather than an equivalent class)
  • Women like only Italian cars
  • Men like at least one car
  • Clara is a woman, so is Samantha
  • Clara's full name is Clara Smith (hint: use either rdfs:label or create a datatype property)
  • Clara is 30 years old
  • Samantha and Clara are different individuals
  • Sam is the same person as Samantha
  • To adore is a special case of liking, where the thing being liked is always a car
  • To be adored by is the inverse of adoring
  • To have a part is a transitive relation
  • Cars have some wheels as parts
  • Add an instance of woman named Lena, add a man named Thomas, then add the fact that Thomas adores Lena. Run a reasoner over the ontology. What is concluded about Lena?




Page responsible: Olaf Hartig
Last updated: 2020-10-21