Designing and Building an Ontology


Winter 2019
Instructor: Raghava Mutharaju
IIIT-Delhi
IIIT Delhi

Designing an Ontology

Notes


  • There is no one correct way to model a domain
    • It is your view of the World
    • The level of detail depends on the application at hand the its possible extensions
  • Ontology development is an iterative process
    • We evaluate the ontology using the application, discuss with the domain experts and keep changing it
  • Generally nouns in the domain become concepts in the ontology and verbs become the properties

Steps


  • Determine the domain and scope of the ontology
    • What is the domain that the ontology will cover?
    • How will the ontology be used?
      • If it is used to assist natural language queries then synonyms of concepts and relations can be included
    • What are the questions that the ontology should provide an answer for?
    • Who will use and maintain the ontology?

In-class ontology


  • Determine the domain and scope of the ontology
    • Domain: Cooking Recipes
    • This ontology will be used for a "recipe discovery" website
    • Integrate cooking recipes from different websites
    • Enable fine grained search for recipes

Steps


  • Competency questions
    • List the type of questions that the ontology should be able to answer
    • Does the ontology contain enough information to answer them?
    • What kind of detail would the answers require?
    • Competency questions need not be exhaustive but they should capture different types of questions that could be asked
    • These questions serve as the litmus test of the ontology later on

In-class ontology


  • Competency questions
    • Retrieval of cooking instructions
      • Recipe for paneer tikka masala
    • Search by ingredients
      • Recipes using yogurt and tomatoes
    • Search by properties of the prepared food, e.g. calorie or carb content
      • Sweet breakfast under 100 calories
    • Search by properties such as cooking time, simplicity
      • A breakfast dish that can be prepared under 30 minutes using flattened rice and potatoes
    • Search by cooking utensils used
      • Butter chicken in a slow cooker

In-class ontology


Steps


  • Reuse existing ontologies
    • Save time and effort by reusing existing ontologies
    • If our application is part of a larger system that has an ontology then our ontology should be compatible with the existing ones
    • Existing ontologies can be imported into the ontology development environment (Protégé) and reused
    • Repositories of ontologies are available

Steps


  • Enumerate important terms in the domain
    • Domain expert should list the important nouns, phrases, and verbs in the domain
    • Generate classes and properties based on this list

In-class ontology


  • Enumerate important terms in the domain
    • Recipe
    • Preparation time
    • Ingredients
    • Classification of the dish (side, main, breakfast etc.)
    • Difficulty level
    • Cooking utensils
    • Nutritional information
    • Quantity

In-class ontology


  • Enumerate important terms in the domain
    • serving size
    • number of calories

Steps


  • Define classes and the class hierarchy
    • Top-down approach: Start with the most general classes and then build the specialized ones
    • Bottom-up approach: Start with the most specific classes (leaves in the hierarchy) and group them under more general classes
    • Combination: Use a combination of top-down and bottom-up approach. List the classes and generalize, specialize them appropriately

Steps


  • Define the properties of classes
    • Create the properties based on the listed verbs
    • Attach them to the most general class that a property is suitable for
    • All the subclasses inherit the properties of the superclass

Steps


  • Define the facets of the properties
    • Cardinality of properties
    • Determine whether they are object or data property
    • The datatype for the value of the data property
    • Domain and range of the property

Steps


  • Create instances of the classes
    • Decide which class an instance should be associated with
    • Fill in the property values associated with the instance

Building an Ontology

Demo


  • Build Cooking Recipes ontology using Protégé

References


  1. Ontology Development 101: A Guide to Creating Your First Ontology. Natalya F. Noy, Deborah L. Mcguinness. 2001
  2. A Tutorial on Modular Ontology Modeling with Ontology Design Patterns: The Cooking Recipes Ontology. Pascal Hitzler et. al. 2018