The aim of this guide is to get familiar with the ontology editor Protégé. In particular, by following this tutorial you will be able to create an ontology and then automatically infer information on that ontology by exploiting OWL's language logical structure combined with the built in reasoners offered by Protégé. It is based on the 5.5 version of Protégé. Please verify the version in case you find some inconsistencies between your results and the ones provided here.
This tutorial is a slightly modified dhdk-esque version of the tutorial created by Fabio Papacchini available here.
The Ontology built using this tutorial will be a very simple conceptualization of University Exams.
Every step is accompanied by a reference image and additional information if needed.
Before starting, during this tutorial you will encounter these particular terms:
By going to the Entities and then Classes sections your screen should look like this:
Let's create our first class: Exam. Select owl:Thing from the classes and follow the steps highlighted in the image.
To change the prefix of your ontology, go to the tab Active Ontology, then click on Ontology Prefixes and follow the indications in the image. As for what to put in the field, I suggest you to write ":" as it should leave it blank.
To delete a class from your ontology. Simply select it and click the highlighted button in the image
An easier way to create class, if you already have a class hierarchy, is to use the function create a class hierarchy in Protégé. Follow the images to create your class hierarchy of the Exams. You can take the text from the block below
Exam NamedExam KnowledgeOCH KnowledgeRaE ScolarlyEditing Usability MachineLearning Faculty FICLIT ComputerScience EvaluationType Written Oral Project Structure Modular Single
This step serves as a validation check for the things done so far. Expand the class hierarchy by clicking on the arrows that you can see highlighted in the images below. Then, click a class and click on the usage tab on the right to check its axioms. Everything should look like the images provided
In this step you will create the object properties that will represent the possible relationships between the classes you have created before. The three object property that will be created are:
Go to the object tab and can create them by following the steps shown in the images below.
In this step you will add a Range and a Domain to the properties just created. Follow the examples in the images below, these are the domain and range for each property (in the image there is only one domaina and range added, add them all):
In this step you will add the restrictions to some of the generated classes in forms of Axioms. These axioms will be useful for the automatic inference based classification of the NamedExams. For each name exams add the axioms written below following the instructions in the images:
In this step you will add one Equivalent to axiom to the class Structure. It will be equivalent to :Single or :Modular. Follow the images for the instructions, then check if the property :hasStructure looks like the one in the second image
In this step you will create the first class that will be used as a defined class. It will be useful for the reasoner-based classification. Follow the images to create a new class and make it defined. You have to create a normal class like always, then add the restriction action and then use the Protégé command to make it a defined class.
First of all, check whether your class looks like the one in the first image. Then proceed to create the other classes, which are all subclasses of :Exam, following these instructions:
Make all of them defined classes and they should look like the second image.
In this step you will add a Data Property, go on the data properties tab and create it as shown in the images.
In this step you just have to add a domain and a range to the data property previously created like shown in the images
In this step you will add an axiom to the class NamedExam. Look at the images to see how to add an axiom related to the data property previously created. Be careful to follow every step
In this step you will start the Reasoner, a tool that will help you to check whether your ontology is consistent (if your axioms make sense all together) and also it will generate some infereces based on the axioms that you have created before. Follow the images to start the reasoner and change the view from asserted to inferred to see the inferences. As you will see, all the named exams will be reclassified under the defined classes.
In this step you will save your ontology. In the first image it is shown how to save it as a normal version. In the second image instead, it is shown how to save also the inferences made by the reasoner.
At the end of the tutorial, your 2 saved ontologies should be the same as the files you can find here.