© O. Corcho, MC Suárez de Figueroa Baonza 1 OWL and SWRL Protégé 4: Building an OWL Ontology Mari Carmen Suárez-Figueroa, Oscar Corcho {mcsuarez,

Slides:



Advertisements
Similar presentations
29/11/2004CS646: N. Drummond, M. Horridge1 Presented by the CO-ODE and HyOntUse projects Funded by CS646: OWL Tutorial (session 2)
Advertisements

SOTIRIS BATSAKIS EURIPIDES G.M. PETRAKIS TECHNICAL UNIVERSITY OF CRETE INTELLIGENT SYSTEMS LABORATORY Imposing Restrictions Over Temporal Properties in.
29/11/2004CS646: N. Drummond, M. Horridge1 Presented by the CO-ODE and HyOntUse projects Funded by CS646: OWL Tutorial (session 1)
Developing OWL Ontologies with Protégé 4
An Introduction to RDF(S) and a Quick Tour of OWL
“Elephant Traps” Alan Rector with The Bio Health Informatics Group The CO-ODE Team University of Manchester With acknowledgements to Natsha Noy and the.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 3: Additional.
1 OWL Pizzas: Practical Experience of Teaching OWL-DL: Common Errors & Common Patterns Alan Rector 1, Nick Drummond 1, Matthew Horridge 1, Jeremy Rogers.
Protege Tutorial Based on ProtegeOWLTutorial at protege website.
Protege Tutorial Based on ProtegeOWLTutorial at protege website.
Tutorial Le Phuoc Son Hoang Huu Hanh Hue University.
Of 27 lecture 7: owl - introduction. of 27 ece 627, winter ‘132 OWL a glimpse OWL – Web Ontology Language describes classes, properties and relations.
1 Ontology Language Comparisons doug foxvog 16 September 2004.
Chapter 8: Web Ontology Language (OWL) Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
Ontology development in Protégé. Lecture 2 Introduction to Protégé 2 Pablo Romero, Department of Informatics Overview Components of an ontology The ontology.
Ontologies - Design principles Cartic Ramakrishnan LSDIS Lab University of Georgia.
Protégé Classes, Properties and Instances Susana R. de Novoa UNIK4710.
1 CSC 9010 Spring, Paula MatuszekSome slides taken from
Chapter 8: Web Ontology Language (OWL) Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
The Semantic Web Week 15 Reasoning with (and Visualising) Ontologies Module Website: Practical :Protégé-2000 WITH.
The Semantic Web Week 14 Module Website: Lecture (SHORT): OWL PIZZAS Practical (LONGER): Getting to know Protégé-2000.
DAML+OIL Ontology Tutorial Chris Wroe, Robert Stevens (Sean Bechhofer, Carole Goble, Alan Rector, Ian Horrocks….) University of Manchester.
Chapter 4 The Enhanced Entity-Relationship (EER) Model
Specialization and generalization
Logics for Data and Knowledge Representation
13 Dec. 2006CmpE 583 Fall 2006 OWL Lite- Property Char’s. 1 OWL Lite: Ch. 13- Property Characteristics Atilla ELÇİ.
SEMANTIC WEB, OWL & PROTÉGÉ Matthew J Wood CS 570 – Topics in Artificial Intelligence Spring 2013.
Protege OWL Plugin Short Tutorial. OWL Usage The world wide web is a natural application area of ontologies, because ontologies could be used to describe.
1 Making OWL Easier: Practical Ontology Development in using Protégé-OWL-CO-ODE Tools Alan Rector, Hai Wang, Jeremy Rogers with acknowledgement to Nick.
8/11/2011 Web Ontology Language (OWL) Máster Universitario en Inteligencia Artificial Mikel Egaña Aranguren 3205 Facultad de Informática Universidad Politécnica.
OWL 2 Web Ontology Language. Topics Introduction to OWL Usage of OWL Problems with OWL 1 Solutions from OWL 2.
Building an Ontology of Semantic Web Techniques Utilizing RDF Schema and OWL 2.0 in Protégé 4.0 Presented by: Naveed Javed Nimat Umar Syed.
USCISIUSCISI Background Description Logic Systems Thomas Russ.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 1: Primitive.
OWL 2 in use. OWL 2 OWL 2 is a knowledge representation language, designed to formulate, exchange and reason with knowledge about a domain of interest.
BioHealth Informatics Group A Practical Introduction to Ontologies & OWL Session 2: Defined Classes and Additional Modelling Constructs in OWL Nick Drummond.
Umi Laili Yuhana December, Context Aware Group - Intelligent Agent Laboratory Computer Science and Information Engineering National Taiwan University.
Advanced topics in software engineering (Semantic web)
Logic …. Disjoint Properties As for disjoint classes, two properties can be disjoint (owl : propertyDisjointWith) Property p and p’ are disjoint if no.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 2: Defined.
OilEd An Introduction to OilEd Sean Bechhofer. Topics we will discuss Basic OilEd use –Defining Classes, Properties and Individuals in an Ontology –This.
Organization of the Lab Three meetings:  today: general introduction, first steps in Protégé OWL  November 19: second part of tutorial  December 3:
2nd Feb 2005Protege-OWL tutorial, © 2005 Univ. of Manchester1 Protégé-OWL Tutorial Session 2: Defined Classes Nick Drummond.
© University of Manchester Simplifying OWL Learning lessons from Anaesthesia Nick Drummond BioHealth Informatics Group.
Towards a Glossary of Activities in the Ontology Engineering Field Mari Carmen Suárez-Figueroa and Asunción Gómez-Pérez {mcsuarez, Ontology.
Ontology Engineering Lab #5 – September 30, 2013.
Ontology Engineering Lab #3 – September 16, 2013.
ONTOLOGY ENGINEERING Lab #2 – September 8,
ONTOLOGY ENGINEERING Lab #3 – September 15,
Ontology Engineering Lab #4 - September 23, 2013.
ΑΝΑΠΑΡΑΣΤΑΣΗ ΓΝΩΣΗΣ ΣΤΟΝ ΠΑΓΚΟΣΜΙΟ ΙΣΤΟ OWL. RDF-RDFS Limitations Binary ground predicates Only subclass & subproperty hierarchy Domain and range definitions.
BioHealth Informatics Group Copyright © 2005, The University of Manchester1 A Practical Introduction to Ontologies & OWL Additional Exercises: Common Errors.
Of 29 lecture 15: description logic - introduction.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 1: Primitive.
Ccs.  Ontologies are used to capture knowledge about some domain of interest. ◦ An ontology describes the concepts in the domain and also the relationships.
1 Letting the classifier check your intuitions Existentials, Universals, & other logical variants Some, Only, Not, And, Or, etc. Lab exercise - 3b Alan.
A Practical Introduction to Ontologies & OWL
Based on ProtegeOWLTutorial at protege website
Information Organization
ece 720 intelligent web: ontology and beyond
Lab exercise - 3a Alan Rector & colleagues
Presentation by the COODE and
Session 2: Defined Classes Nick Drummond
CS646: OWL Tutorial (session 2)
ece 720 intelligent web: ontology and beyond
Session 1: Primitive Classes Nick Drummond
Description Logics.
Knowledge Representation Part VII Protégé / RDFS / OWL / ++
The kinship domain example from cs. manchester. ac
Presentation transcript:

© O. Corcho, MC Suárez de Figueroa Baonza 1 OWL and SWRL Protégé 4: Building an OWL Ontology Mari Carmen Suárez-Figueroa, Oscar Corcho {mcsuarez, Ontology Engineering Group. Departamento de Inteligencia Artificial Facultad de Informática Universidad Politécnica de Madrid May 2008

© O. Corcho, MC Suárez de Figueroa Baonza 2 OWL and SWRL Named Classes (I) An ontology contains classes – indeed, the main building blocks of an OWL ontology are classes. An empty ontology contains one class called Thing. OWL classes are interpreted as sets of individuals or sets of objects. The class Thing is the class that represents the set containing all individuals. Because of this all classes are subclasses of Thing.

© O. Corcho, MC Suárez de Figueroa Baonza 3 OWL and SWRL Named Classes (II) Creating classes in the pizza example: Pizza, PizzaBase, and PizzaTopping. Add Subclass Add Sibling Class Delete Class Classes

© O. Corcho, MC Suárez de Figueroa Baonza 4 OWL and SWRL Disjoint Classes (I) OWL Classes are assumed to ‘overlap’. We therefore cannot assume that an individual is not a member of a particular class simply because it has not been asserted to be a member of that class. In order to ‘separate’ a group of classes we must make them disjoint from one another. This ensures that an individual which has been asserted to be a member of one of the classes in the group cannot be a member of any other classes in that group.

© O. Corcho, MC Suárez de Figueroa Baonza 5 OWL and SWRL Disjoint Classes (II) Making the classes Pizza, PizzaTopping and PizzaBase disjoint from one another. This means that it is not possible for an individual to be a member of a combination of these classes – it would not make sense for an individual to be a Pizza and a PizzaBase. Add Disjoint Classes

© O. Corcho, MC Suárez de Figueroa Baonza 6 OWL and SWRL Named Classes (III) Creating subclasses in the pizza example: ThinAndCrispyBase and DeepPanBase. 1 2 Subclasses of PizzaBase 34

© O. Corcho, MC Suárez de Figueroa Baonza 7 OWL and SWRL Class Hierarchy (I)

© O. Corcho, MC Suárez de Figueroa Baonza 8 OWL and SWRL Class Hierarchy (II) The Meaning of Subclass: all individuals that are members of the class TomatoTopping are members of the class VegetableTopping and members of the class PizzaTopping as we have stated that TomatoTopping is a subclass of VegetableTopping which is a subclass of PizzaTopping. In OWL subclass means necessary implication. In other words, if VegetableTopping is a subclass of PizzaTopping then ALL instances of VegetableTopping are instances of PizzaTopping, without exception — if something is a VegetableTopping then this implies that it is also a PizzaTopping.

© O. Corcho, MC Suárez de Figueroa Baonza 9 OWL and SWRL OWL Properties OWL Properties represent relationships. There are two main types: Object properties and Datatype properties. OWL also has a third type of property: Annotation properties. Datatype Property Annotation Property

© O. Corcho, MC Suárez de Figueroa Baonza 10 OWL and SWRL Object Properties Creating object properties in the pizza example: hasIngredient, hasBase, and hasTopping. Delete Object Property Object Properties Add Object Property Add Subproperty

© O. Corcho, MC Suárez de Figueroa Baonza 11 OWL and SWRL Inverse Properties Each object property may have a corresponding inverse property. If some property links individual a to individual b, then its invers property ling individual b to individual a. Creating inverse properties in the pizza example: isIngredientOf.

© O. Corcho, MC Suárez de Figueroa Baonza 12 OWL and SWRL OWL Object Properties Characteristics (I) OWL allows the meaning of properties to be enriched through the use of property characteristics. Functional Properties Inverse Functional Properties Transitive Properties Symmetric Properties Antisymetric Properties Reflexive Properties Irreflexive Properties

© O. Corcho, MC Suárez de Figueroa Baonza 13 OWL and SWRL Functional Properties If a property is functional, for a given individual, there can be at most one individual that is related to the individual via the property. hasBirthMother is funtional

© O. Corcho, MC Suárez de Figueroa Baonza 14 OWL and SWRL Inverse Functional Properties If a property is inverse functional then it means that the inverse property is functional. For a given individual, there can be at most one individual related to that individual via the property. isBirthMotherOf is inverse functional This is the inverse property of hasBirthMother — since hasBirthMother is functional, isBirthMotherOf is inverse functional

© O. Corcho, MC Suárez de Figueroa Baonza 15 OWL and SWRL Transitive Properties If a property is transitive, and the property relates individual a to individual b, and also individual b to individual c, then we can infer that individual a is related to individual c via the property. hasAncestor is transitive

© O. Corcho, MC Suárez de Figueroa Baonza 16 OWL and SWRL Symmetric Properties If a property is symmetric, and the property relates individual a to individual b then individual b is also related to individual a via the property. hasSibling is symmetric

© O. Corcho, MC Suárez de Figueroa Baonza 17 OWL and SWRL Antisymmetric Properties If a property is antisymmetric, and the property relates individual a to individual b then individual b cannot be related to individual a via the property. isChildOf is antisymmetric

© O. Corcho, MC Suárez de Figueroa Baonza 18 OWL and SWRL Reflexive Properties A property is said to be reflexive when the property must relate individual a to itself. knows is reflexive

© O. Corcho, MC Suárez de Figueroa Baonza 19 OWL and SWRL Irreflexive Properties If a property is irreflexive, it can be described as a property that relates an individual a to individual b, where individual a and individual b are not the same. isMotherOf is irreflexive

© O. Corcho, MC Suárez de Figueroa Baonza 20 OWL and SWRL Exercise Modelling that a pizza has only one pizza base; and that if a pizza topping has ingredients, then the pizza itself contains also such ingredients.

© O. Corcho, MC Suárez de Figueroa Baonza 21 OWL and SWRL OWL Properties: Domain and Range (I) Properties may have a domain and a range specified. Properties link individuals from the domain to individuals from the range. Specifiying the domain (Pizza) and range (PizzaTopping) of hasTopping property.

© O. Corcho, MC Suárez de Figueroa Baonza 22 OWL and SWRL OWL Properties: Domain and Range (II) Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 23 OWL and SWRL Property Restrictions A restriction describes an anonymous class (an unnamed class). The anonymous class contains all of the individuals that satisfy the restriction (i.e. all of the individuals that have the relationships required to be a member of the class). Restrictions are used in OWL class descriptions to specify anonymous superclasses of the class being described. Existential restrictions describe classes of individuals that participate in at least one relationship along a specified property to individuals that are members of a specified class. For example, “the class of individuals that have at least one (some) hasTopping relationship to members of MozzarellaTopping”. Universal restrictions describe classes of individuals that for a given property only have relationships along this property to individuals that are members of a specified class. For example, “the class of individuals that only have hasTopping relationships to members of VegetableTopping”.

© O. Corcho, MC Suárez de Figueroa Baonza 24 OWL and SWRL Existential Restrictions (I) An existential restriction describes a class of individuals that have at least one (some) relationship along a specified property to an individual that is a member of a specified class. Existential restrictions are also known as Some Restrictions, or as some values from restrictions. Adding a restriction to Pizza that specifies a Pizza must have a PizzaBase (hasBase some PizzaBase). You are creating a necessary condition. A Pizza is a subclass of the things that have at least one PizzaBase

© O. Corcho, MC Suárez de Figueroa Baonza 25 OWL and SWRL Existential Restrictions (II) Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 26 OWL and SWRL Existential Restrictions (III) Adding two restrictions to say that a MargheritaPizza has the toppings MozzarellaTopping and TomatoTopping. If something is a member of the class MargheritaPizza it is necessary for it to be a member of: the class NamedPizza, the anonymous class of things that are linked to at least one member of the class MozzarellaTopping via the property hasTopping, and the anonymous class of things that are linked to at least one member of the class TomatoTopping via the property hasTopping. Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 27 OWL and SWRL Exercise Create an American Pizza that is almost the same as a Margherita Pizza but with an extra topping of pepperoni.

© O. Corcho, MC Suárez de Figueroa Baonza 28 OWL and SWRL Exercise: Solution Create an American Pizza that is almost the same as a Margherita Pizza but with an extra topping of pepperoni.

© O. Corcho, MC Suárez de Figueroa Baonza 29 OWL and SWRL Using a Reasoner One of the key features of ontologies that are described using OWL-DL is that they can be processed by a reasoner. One of the main services offered by a reasoner is to test whether or not one class is a subclass of another class. By performing such tests on the classes in an ontology it is possible for a reasoner to compute the inferred ontology class hierarchy. Another standard service that is offered by reasoners is consistency checking. Based on the description (conditions) of a class the reasoner can check whether or not it is possible for the class to have any instances. A class is deemed to be inconsistent if it cannot possibly have any instances.

© O. Corcho, MC Suárez de Figueroa Baonza 30 OWL and SWRL Inferring Ontology Class Hierarchy The ontology can be ‘sent to the reasoner’ to automatically compute the classification hierarchy. The ‘manually constructed’ class hierarchy is called the asserted hierarchy. The class hierarchy that is automatically computed by the reasoner is called the inferred hierarchy. Protege 3.4. Pellet 1.5.1

© O. Corcho, MC Suárez de Figueroa Baonza 31 OWL and SWRL Checking Ontology Consistency This strategy is often used as a check so that we can see that we have built our ontology correctly. Creating a CheesyVegetableTopping as subclass of CheesyTopping and VegetableTopping. 1 2 Why?

© O. Corcho, MC Suárez de Figueroa Baonza 32 OWL and SWRL Necessary and Sufficient Conditions (I) All of the classes that we have created so far have only used necessary conditions to describe them. Necessary conditions can be read as: “If something is a member of this class then it is necessary to fulfil these conditions”. A class that only has necessary conditions is known as a Primitive Class or Partial Class. With necessary conditions alone, we cannot say that, “If something fulfils these conditions then it must be a member of this class”. To make this possible we need to change the conditions from necessary conditions to necessary AND sufficient conditions. A class that has at least one set of necessary and sufficient conditions is known as a Defined Class or Complete Class.

© O. Corcho, MC Suárez de Figueroa Baonza 33 OWL and SWRL Necessary and Sufficient Conditions (II) Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 34 OWL and SWRL Universal Restrictions (I) All of the restrictions that we have created so far have been existenctial ones (some). However, existential restrictions do not mandate that the only relationships for the given property that can exist must be to individuals that are members of the specified filler class. To restrict the relationships for a given property to individuals that are members of a specific class we must use a universal restriction. Universal restrictions constrain the relationships along a given property to individuals that are members of a specific class. For example the universal restriction hasTopping MozzarellaTopping describes the individuals all of whose hasTopping relationships are to members of the class MozzarellaTopping.

© O. Corcho, MC Suárez de Figueroa Baonza 35 OWL and SWRL Universal Restrictions (II) Creating a Vegetarian Pizza that only have toppings that are CheeseTopping or VegetableTopping. Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 36 OWL and SWRL Automatic Classification and Open World Assumption (I) We want to use the reasoner to automatically compute the superclass-subclass relationship (subsumption relationship) between MargheritaPizza and VegetarianPizza. We believe that MargheritaPizza should be vegetarian pizza (they should be subclasses of VegetarianPizza). This is because they have toppings that are essentially vegetarian toppings — by our definition, vegetarian toppings are members of the classes CheeseTopping or VegetableTopping and their subclasses. Having previously created a definition for VegetarianPizza (using a set of necessary and sufficient conditions) we can use the reasoner to perform automatic classification and determine the vegetarian pizzas in our ontology.

© O. Corcho, MC Suárez de Figueroa Baonza 37 OWL and SWRL Automatic Classification and Open World Assumption (II) MargheritaPizza have not been classified as subclass of VegetarianPizza. Reasoning in OWL (Description Logics) is based on what is known as the open world assumption (OWA). The open world assumption means that we cannot assume something does not exist until it is explicitly stated that it does not exist. In the case of our pizza ontology, we have stated that MargheritaPizza has toppings that are kinds of MozzarellaTopping and also kinds of TomatoTopping. Because of the open world assumption, until we explicitly say that a MargheritaPizza only has these kinds of toppings, it is assumed (by the reasoner) that a MargheritaPizza could have other toppings.

© O. Corcho, MC Suárez de Figueroa Baonza 38 OWL and SWRL Automatic Classification and Open World Assumption (III) To specify explicitly that a MargheritaPizza has toppings that are kinds of MozzarellaTopping or kinds of MargheritaTopping and only kinds of MozzarellaTopping or MargheritaTopping, we must add what is known as a closure axiom or restriction on the hasTopping property. Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 39 OWL and SWRL Cardinality Restrictions (I) In OWL we can describe the class of individuals that have at least, at most or exactly a specified number of relationships with other individuals or datatype values. The restrictions that describe these classes are known as Cardinality Restrictions.  A Minimum Cardinality Restriction specifies the minimum number of P relationships that an individual must participate in.  A Maximum Cardinality Restriction specifies the maximum number of P relationships that an individual can participate in.  A Cardinality Restriction specifies the exact number of P relationships that an individual must participate in.

© O. Corcho, MC Suárez de Figueroa Baonza 40 OWL and SWRL Cardinality Restrictions (II) Creating a Customized Pizza that has at least three toppings. Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 41 OWL and SWRL Qualified Cardinality Restrictions (I) Qualified Cardinality Restrictions (QCR), which are more specific than cardinality restrictions in that they state the class of objects within the restriction. Creating a Four Cheese Pizza, as subclass of NamedPizza, which has exactly four cheese toppings. Protege 3.4

© O. Corcho, MC Suárez de Figueroa Baonza 42 OWL and SWRL Datatype Properties Creating a datatype property in the pizza example: hasDiameter. Add Datatype Property Add Subproperty

© O. Corcho, MC Suárez de Figueroa Baonza 43 OWL and SWRL Restrictions and Boolean Class Constructors

© O. Corcho, MC Suárez de Figueroa Baonza 44 OWL and SWRL Exercise Create a Meaty Pizza. Create a Vegeterian Pizza, which have no meat and no fish toppings. Create a Real Italian Pizza, which only have bases that are ThinandCrispy. Create a subclass of Named Pizza with a topping of Mozzarela.

© O. Corcho, MC Suárez de Figueroa Baonza 45 OWL and SWRL Individuals Creating individuals of class Country.

© O. Corcho, MC Suárez de Figueroa Baonza 46 OWL and SWRL hasValue Restriction Specifying Italy as country of origin for Mozzarella.