Creating an ontology in Protégé 5.0

  • Tutorial
Logo ProtégéProtégé is a free, open source software tool for editing ontologies and knowledge management systems 1 . Version 5.0 is relevant today (more about it ). Therefore, I thought that a simple tutorial, as a small introduction to working with this program, would not be superfluous on Habré.

Creating a new ontology


To create an ontology, open the Protégé 5.0 editor (you can download it from the official site or use the online version) and enter its name - for example, NQF_FQF, and the version - /1.0.



Note: We create an ontology using the example of the National Qualifications Framework of Ukraine.

To add an annotation that would explain what your ontology is about, you need to click on the plus sign next to the word Annotation.



In the Value field, enter the annotation text and click OK.
Since we write ontology using the Ukrainian language, we do not select the language of annotation.
To edit annotations here and in other sections of the editor, click on the “circle” in the right corner of the annotation.



Class creation


To create classes you need to go to the Classes tab. If you don’t see it in the editor, select Window - Tabs - Class views from the toolbar.



All previous tutorials have advised against touching the default class - Thing .. We do this.
Next, create your own class. To do this, click on the Add subclass button.


In the window that opens, enter the name of the class. It should be noted that Cyrillic characters work, but for the Ukrainian language it doesn’t work '- apostrophe. When writing a word with an apostrophe, part of the text is cut off to the apostrophe.

Note: well, we need Cyrillic in class names for a more visual representation in the graph. Yes, of course you can write in Latin and no problems :)

Also, class names of the type are not written:
1_word
Instead, the editor turns out
_word
But you can write like this:
Word_1
That is, the editor does not like it when the class name begins with a number.
After introducing the name of the class, a new class appears in the structure of the ontology.

So we created one class and three subclasses.

For a better description of the ontology, we will make the classes unconnected.
To do this, you must select a class, then in the Description window click on the plus sign next to Disjoint With.



In the classes window that opens, select those that you do not want to bind. The combination Ctrl + left mouse button allows you to select several classes at once. Next - approx.

Now you need to create level 2 classes for each of the level 1 classes. A remarkable feature of the editor is that by making one class unconnected, the rest are done automatically.
To do this, in the subclass "Competency" we create 8 subclasses: Рівень_1, Рівень_2 ... Рівень_8.
To create subclasses, we use the function to create a class hierarchy. From the main menu, from the Protege Tools, select Create Class hierarchy.

In the window that opens, select the main class and click Continue.

Then in the Prefix field we write "Рівень_", and below in the field you need to write the names of the added classes separated by a space and press Continue.



This is what should result in the end.


As explained above, we will make these classes unconnected using in the Description window - Disjoint With.

Creating Links


These subclasses (Рівень_1 ... Рівень_8) cannot be copied to all the rest (and we need all previous classes to have these levels), but you can add links.
To do this, select the class and in the Description window click on the plus sign next to SubClass Of.



In the window that opens, select the Class hierarchy tab and select the ones you want to link from the list of classes. The combination Ctrl + left mouse button allows you to select several classes at once. Next - approx.
Thus, a list of related classes appears in SubClass Of.



If you add the OntoGraf plugin, you can see the ontology structure in the form of a graph after switching to the OntoGraf tab.



Adding Properties


Learn how to add properties.

Note: we have created additional classes, so the names of classes that were not written above will appear.

Create a property on the Object Properties tab. As when creating a class, select the property and click the button .

In the window that opens, write the property names. The rules for writing names here are the same as for class names.

Now we assign this property to the object, for example, "Elementary_zagalni_znannya."
To do this, on the same tab in the Description window, click on the plus sign next to Domens (intersection).



In the window that opened, select the class "Elementary_zagalni_znannya."
Next, click the plus sign near Ranges (intersection) and in the window that opens, select the class "R_ven_0". As a result, we bind these classes through the property “lay”.

And this is displayed by the corresponding lines in the OntoGraf graph.


Adding Feature


In order to add a property to a property, you need to select it, then in the Characteristics window click the “tick” next to Symmetric.

In the same way we do with other classes, subclasses, properties, etc. ...

As a result, we get a graph. In order to present the graph in a digestible form, you need to “move” the elements with “pens” so that everything is clearly visible, because OntoGraf automatically places not very pretty.



Full tutorial can be downloaded here .

Also popular now: