Archive for August, 2015

Where a Pizza Ontology may help

August 13, 2015

A few people have pointed me at a recent news story on the BBC Web site about valid and invalid types of pizza and suggested that the Pizza Ontology should have helped. The story is entitled “the day I ordered pizza that doesn’t exist” and is written by Dany Mitzman in Bologna. The nub of the story as far as this blog is concerned is that she ordered a marinara pizza, which should be a simple pizza of just tamato and garlic. In Pizza Ontology terms this would be:

 

Class: marinaraPizza

    SubClassOf: NamedPizza,

    HasTopping some TomatoSauceTopping,

    HasTopping some Garlictopping,

    hasTopping only ( TomatoSaucetopping or GarlicTopping)

 

the NamedPizza class supplies the pizza base; MarinaraPizza is disjoint with all other NamedPizza and the restrictions on the MarinaraPizza class says that there is a tomato sauce topping, a garlic topping and that those are the only toppings that appear on this type of pizza.

 

What Dany, the journalist did, was ask for a marinara pizza with mozzarella; that is:

 

Individual: “Dany’s very own marinara pizza”

 

    Types:

        MarinaraPizza,

        hasTopping some MozzarellaTopping

 

the article reports that the pizza maker found this request inconsistant, as would the Pizza Ontology, if the class of pizza existed as above and an automated reasoner were used – the MarinaraPizza class describes that only tomato sauce and garlictoppings occur on this type of pizza, so adding another topping, such as the mozzarella, no matter what (as long as it cannot be inferred to be the same as either tomato sauce or garlic topping) mean that the stated constraints are broken and we all descend into a maelstrom of sin and corruption (or there is an inconsistency reported by the reasoner). Quoting the quote of the pizza maker in question “”You can’t have a marinara with mozzarella,” she says. “It doesn’t exist.”” – the marinara with mozzarella cannot exist as described in our ontology.

 

Of course, describing a class of pizza that has tomato sauce, garlic and mozzarella as its toppings would be fine, just as long as one doesn’t claim it’s a marinara pizza. Creating such a new pizza in the Pizza Ontology is possible; it’s just not a marinara according to the ontology.

 

This ability to make a bespoke class or individual pizza may also be the case with the pizza maker encountered by Dany. It may all be down to the name; asking “may I have a pizza with tomato sauce, garlic and mozzarella” may have elicited a different response, unles it is believed that only specified types of pizza exist. In this were the case, one would need a covering axiom in the ontology. Such an axiom would look like

 

NamedPizza

EquivalentTo:

        (MargheritaPizza or MarinaraPizza or NapolitanoPizza)

 

If one wanted a world in which only these three pizza existed (which I don’t and neither would any sensible person). This axiom asserts that if there is a pizza then it must be one of the three pizza covering the NamedPizza class In the Pizza Ontology itself there are many named pizza and should one wish to construct such a covering axiom, keeping it up to date with the disjoint named pizza in a tool such as protégé would be found to be tedious – Tawny-OWL allows covering axioms and so on to be generated with ease programmatically.

 

So, what have we learnt? From the original BBC article we find that, for at least one Italian pizza maker, that a pizza’s name is as good as its definition; a marinara pizza with another ingredient is no longer a marinara pizza. The Pizza Ontology plus a reasoner can convey the same kind of stance. For the pizza maker, it seems that the name of the pizza is its definition. In an OWL ontology we make such definitions explicit. Of course, even though the Pizza Tutorial adopts the use case of the “intelligent pizza finder” that uses the Pizza Ontology to allow diners to pick topping to include and exclude, form a DL query behind the scenes and select pizza that fulfil that query, the Pizza Ontology is not really going to help in such cross-cultural circmstances as described in the original article. One may perhaps imagine an ontology driven app on a mobile device where one describes one’s pizza of choice and one is told what it is and how to order it in a particular cultural setting, but the phrase “hammer to crack a nut” comes to mind.