Challenged by real-world ontologies – recipes

One of my apparently never-ending projects that I’ve spent a lot of time thinking about lately is how to build a system to represent recipes (like, cooking recipes). At first it seemed like a problem that wasn’t that hard to solve. No deep hierarchies, no complex multiple parents and constraints. However, this was an illusion. As I started with the modeling, using OWL and Protege, I quickly realized that I was hitting the old challenge of all ontology-based systems I’ve worked in the past: what is a type and what is an instance.

When you look at a problem in an abstract sense, it’s not too hard to draw a line on where you will set as being a class and all the rest are instances of the class. For example, the classic Noy and McGuinness Wine Ontology. In this case they work on varietals and characteristics and that makes it all classes. Then the actual wine bottle is an instance. Easy enough? Well, until you try to get to more interesting things like properties.

Let’s say that you want to represent a winery and provide information about the wines they produce. So far it seems easy: a winery is an instance and it has an object property that will connect it to the instances of the wines it produces. But now let’s say that you want to provide information about the type of wine it produces. Type, so now you are talking really about a relationship between the winery and actually a class of wines. Which now means that if there is a winery with only one wine, now this wine also has to be a class of wines. So far, almost good. You can say that the range is a class, but I’m not aware of a way of saying that the range is a class that is a subclass of Wine. The only solution is to go back to calling it an instance and use the single class instance pattern. But then how can you relate the wine to their specialty in the ontology?

That’s just the beginning of it. Now let’s say that you want to represent wine pairings. Some types of wine go well with types of food. That relationship is actually on an instance of type of wine to an instance of type of food. Now you have again two elements for one single concept. And this will keep happening and the cost for the person that is trying to maintain it is quite large.

Now for my specific case, representing recipes. The problem or recipes is that most of them are actually defined as a class of recipes. Relating back to wines, a recipe can call for a dry white wine. There are many dry white wines out there and each choice will actually generate slightly different results in the recipe. The only “complete” way I was able to represent something like this is to define it as a class and then have each ingredient be a type of object property, which now explodes exponentially the number of types of elements that exist, which makes it pretty much impossible to maintain manually. If it’s not manually maintainable, I’m not sure it’s that useful.

So, how to solve this issue? That’s a very good question. I’m not sure I have the answer for it right now, so I’ll defer it to a future post. I’ve started looking at rule-based constraints, instead of class-based, and they do help some, but not enough. There is still a need to increase the fluidity of classes and instances, but it’s complicated to define “recursive” metadata that is applicable to itself and still keep inference bounded. What is the use of creating a language and not being able to actually benefit from its semantics?

Anyway, I probably should go back to reading research on the subject. I think I’m missing something important somewhere.


0 Responses to “Challenged by real-world ontologies – recipes”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

RSS My FriendFeed RSS

  • An error has occurred; the feed is probably down. Try again later.

%d bloggers like this: