With a philosophically implied meaning of “subject of existence”, the word “ontology” seems to generate a profusion of controversy in discussions about AI. It is also often confused with epistemology, which is about knowledge and knowing. However as a formal definition,T. R. Gruber illustrates ontology as a formal and explicit specification of a shared conceptualization. That is, an ontology is a description (like a formal specification of a program) of the concepts and relationships that can exist for an agent or a community of agents.
In this article, it is expected the reader to have a basic understanding on ontologies and ontology specification. The following sections illustrate the use of Protégé editor to generate and visualize an ontology with basic ontology definition concepts being covered. We will be looking in to creating a simple university ontology and later visualize it within Protégé editor through the use of VOWL Plugin.
Following diagram indicates the final ontological hierarchy that will be built at the end of this article.
What is Protégé and how to set it up
Protégé is a free, open source ontology editor and framework developed by Standford University for building intelligent systems . Protégé is supported by a strong community of academic, government, and corporate users, who use Protégé to build knowledge-based solutions in areas as diverse as bio-medicine, e-commerce, and organizational modeling.
Follow the below steps to get Protégé up and running.
- Download Protégé from here and extract it.
- Go inside the extracted folder and click protege.exe to run Protégé.
Creation of Ontology
The next step is to create your ontology in the Protégé. To do that, click on the “Entities” tab. When clicked, by default you will be put inside the “Classes” sub tab.
In this example, we will be looking into creating an ontology based on very basic concepts/scenarios in a university.
1. Teachers teach modules
2. Students study modules.
With those two concepts in hand, following classes, data properties, object properties and individuals could be identified.
Classes in ontologies are abstract groups, sets or collections of objects.
In object properties we are concerned with describing how classes can relate to each other based on their instances.
Data properties are just like object properties except their domains are typed literals.
Individuals (instances) are the basic, “ground level” components of an ontology.
For the simplicity purpose, certain data properties are omitted by intention.
Next step involves creating the identified classes, data properties, object properties in the ontology.
- Click on the classes tab and open the class hierarchy.
- Note that all classes identified above are sub classes of “Thing” class by default.
- Click on “Add subclass” icon and in the pop up menu, give the name of the class.
Remember to follow the class taxonomy identified in Figure 3 in creating the classes here. For an example, Class “Teacher” should be a sub class of “Person” class where “Person” class is again a subclass of “Thing” class. After creating class taxonomy, you should have the following class hierarchy defined.
Creating Object Properties
To create the identified object properties in the Figure 4, select the Object Properties tab and click on “Add sub property” icon. Note that all properties will be sub properties of the “topObjectProperty” by default.
However it should be noted that we can add domain and range to these object properties.
Syntactically, domain is a built-in property that links a property to a class description. An domain axiom asserts that the subjects of such property statements must belong to the class extension of the indicated class description.
Range is a built-in property that links a property to to either a class description or a data range. An range axiom asserts that the values of this property must belong to the class extension of the class description or to data values in the specified data range.
Hence for the object property “studies” we can add “Student” as the domain and “Module” as the range.
To add domain or range, simply click on the + button near the required item and select the items you want to add.
In the same way, for the object property “teaches” we can add “Teacher” as the domain and “Module” as the range.
Creating Data Properties
The next step is to create the identified data properties in Figure 5. To do this, simply click on the “Data Properties” tab and click “Add sub property” icon. Note that all properties will be sub properties of the “topDataProperty” by default.
After adding all the data properties identified, you should get the following overview.
In the same way, we did with object properties, we can define domain and range for each data property as well. However, in the range selection, rather having a class description,need to add a data types. For an example,
“first_name” data property has the range of “xsd:string”.
To add this data types click on the + button near “Range”and select “Built in data types” and select the relevant data type from the given list.
Add the following ranges to the other identified data properties as well.
first_name → xsd:stringlast_name → xsd:stringindex_no → xsd:intstaff_id → xsd:int
The final task in creating the ontology is adding individuals. To do this, click on the “individuals” tab and click on the “Add individual” icon.
First, let’s create a “Module” individual. Follow the below steps to set the individual properly.
- Create the “Module” individual “CS2341”.
- Add the Type for the “CS2341” as “Module”.
Do the same for other two modules “CS4032” and “MA4124”.
Secondly, let’s add individual “Student_1”. Follow the below steps to set the individual properly.
- Create the individual “Student_1”.
- Add the Type for the “Student_1” as “Student”.
- Add the object properties for “Student_1”.
4. Add the data properties to the “Student_1”. Refer below image for more details.
First select the “first_name” data property and then select type as “xsd:string”. Finally add the the value in the space provided (in the above example value = Vindula). Do the same for other data properties as well.
After finishing the above iterative process you should get the “Student_1” individual as below.
In the same way create the other individuals identified in Figure 6.
If you have completed the above steps correctly, Congratulations!! you just created the university ontology. Now the next step is visualization of the created ontology. Alternatively you could download the created ontology as an OWL file by File → Save As → OWL/XML Syntax.
Visualization of the Ontology
To visualize the ontology in the graphical manner, we need to install the ProtégéVOWL plugin. You can download the jar file from here. After downloading the VOWL jar, copy it to the plugins folder of Protégé, re-start Protégé and activate the plugin via Window → Tabs → VOWL.
That’s it. Simply click the “VOWL” tab in the Protégé and you could see the ontology created in graphical manner as below.