Pizzas in 10 Minutes Ontology Tutorial

Protege is a no-cost, open-source platform that offers tools for building domain models and creating knowledge-based applications using ontologies. It is supported by a growing user community. 

This blog will explain the standard 10 Minute-Pizza ontology. You will learn how to use the W3C Web Ontology Language (OWL) by following this tutorial. Note that this is not a complete walkthrough and it does not explain everything step by step. For that, you can check out the Pizzas in 10 Minutes page on the Protege Wiki website. Although the tutorial is slightly outdated with the most recent version of the program, it should not be hard to go through the steps. 

In the beginning, having a basic structure defined on paper similar to the image below should be useful. 

Class hierarchy available in pizza ontology  

To use Protege, you should first download Protege Desktop, install the Matrix and Annotation template plugins, and put them in the plugins folder. 

After that, start Protge and create a new OWL Ontology. Name and save the file to a directory. Then, you need to configure the UI to set up the tabs you will need, the renderer, and the entities tab.

Now, it is time to build the ontology. For that, we need to create the top hierarchy. Here, a tab indenting denotes a subclass of a class. After the first step, the class hierarchy should look like this:


After that, we need to create the skeleton hierarchy. For this, create Pizza, Pizza_topping, and Pizza_base under Independent_entity and have them disjoint. 

Then, create each branch of the taxonomy. This includes the Independent_entity's subclasses and Value will have Spiciness in it. While creating class hierarchies, the prefixes and suffixes are automatically added to the item if selected. But the classes in the Pizza category should not be disjoint because we will make some of these classes defined, so we will add the disjoints afterward. Then close the value partition by adding a covering axiom to the Spiciness_value. After all, the class hierarchy should look like below. Just note that this could be even more detailed and could have more content in it. This is just a quick showcase:


Now is a good time to write descriptions for the classes that may be ambiguous. For instance, what is a Four_seasons_pizza? This can be achieved by using annotations as seen below:


Now, create object properties so that it looks like this:


Then add the property characteristics from the Property Matrix tab. How the table should look is shown below:


After that, go to the Class Matrix tab, add the toppings of the Pizzas, and input the spiciness values of the toppings. After all that, the table should look like this:


After that, you need to close the pizza toppings so that no others can be added. This can be done by creating a closure axiom on the toppings of a pizza. This will an "AllValuesFrom" restriction along the property in the restriction you selected.

Then it comes to adding the definitions for the defined classes based on existentials. This step is all about determining which toppings have what kind of properties and which types of pizzas include (or do not include, e.g. vegetarian pizza) these toppings, hence having the same properties. One example is that Spicy Seafood Pizza is a Spicy Pizza since it has Spicy Calamari on it. After this is done, three dashes appear next to the pizza category, and Spicy Seafood pizza is placed in the Spicy Pizza category.


After everything is set, save your work and use a reasoner to automatically classify your ontology. If something is wrong, the reasoner will alert you and show some explanations. This will give you a way to correct your mistakes such as disjoint axiom issues.

And there you go, this is a said 10-minute tutorial on how to create a pizza ontology. Though, it seems that it will take more than 10 minutes for a beginner to grasp and do everything.

Thanks for reading!

Oğuz Arslan





















Comments

Popular posts from this blog

Why we hate each other on the internet? (by Kurzgesagt)

Gephi Quick Start Guide