Session 2: Defined Classes Nick Drummond

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

Mouse Tutorial for Win XP In this tutorial you will learn to: Move the mouse Click and double click Make selections Manage windows Use menus Click the.
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
“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.
Protégé Classes, Properties and Instances Susana R. de Novoa UNIK4710.
1 CSC 9010 Spring, Paula MatuszekSome slides taken from
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.
Editing Description Logic Ontologies with the Protege OWL Plugin.
DAML+OIL Ontology Tutorial Chris Wroe, Robert Stevens (Sean Bechhofer, Carole Goble, Alan Rector, Ian Horrocks….) University of Manchester.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Logics for Data and Knowledge Representation
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.
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.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 1: Primitive.
BioHealth Informatics Group A Practical Introduction to Ontologies & OWL Session 2: Defined Classes and Additional Modelling Constructs in OWL Nick Drummond.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 2: Defined.
© 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,
OilEd An Introduction to OilEd Sean Bechhofer. Topics we will discuss Basic OilEd use –Defining Classes, Properties and Individuals in an Ontology –This.
2nd Feb 2005Protege-OWL tutorial, © 2005 Univ. of Manchester1 Protégé-OWL Tutorial Session 2: Defined Classes Nick Drummond.
2nd Sept 2004UK e-Science all hands meeting1 Designing User Interfaces to Minimise Common Errors in Ontology Development Alan Rector, Nick Drummond, Matthew.
Fall 2003Sylnovie Merchant, Ph.D. ACCESS Tutorial Note: The purpose of this tutorial is to provide an introduction to some of the functions of ACCESS in.
Ontology Engineering Lab #3 – September 16, 2013.
ONTOLOGY ENGINEERING Lab #2 – September 8,
ONTOLOGY ENGINEERING Lab #3 – September 15,
Description Logics Dr. Alexandra I. Cristea. Description Logics Description Logics allow formal concept definitions that can be reasoned about to be expressed.
Ontology Engineering Lab #4 - September 23, 2013.
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
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.
Lesson 13 PROTECTING AND SHARING DOCUMENTS
A Practical Introduction to Ontologies & OWL
Tracking Students Throughout the Scholarship Season
Development Environment
Learning PowerPoint A Tutorial.
Chopping and Releasing HAZREPs
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
Saving, Modifying page, grammar & spell checking, and printing
Bomgar Remote support software
Lesson 13 PROTECTING AND SHARING DOCUMENTS
Object of the game Yahtzee Large straight Small straight Full house
CS646: OWL Tutorial (session 2)
ece 720 intelligent web: ontology and beyond
This presentation has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational purposes.
Session 1: Primitive Classes Nick Drummond
Making Procedural Methods
Drop Shape Analysis Quick Start Guide with ImageJ
Foundations of the Semantic Web: Ontology Engineering
Object of the game Yahtzee Large straight Small straight Full house
Add a dues payment to the Dues manager module for the Grand Lodge of Nebraska LSI Lodge Secretary Interface online Membership Database.
Description Logics.
Object of the game Yahtzee Large straight Small straight Full house
V3 Education: Building the HMD
Object of the game Yahtzee Large straight Small straight Full house
University of Manchester
Presentation transcript:

Session 2: Defined Classes Nick Drummond Protégé-OWL Tutorial Session 2: Defined Classes Nick Drummond Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester This session Issue: Primitive Classes & Polyhierarchies Advanced: Creating Defined Classes Reasoner: Classifying Union Classes: Covering Axioms Example: Creating a Vegetarian Pizza Issue: Open World Assumption Union Classes: Closure Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Loading OWL files from scratch Run Protégé.exe If you’ve only got an OWL file: Select “OWL Files” as the Project Format, then “Build” to select the .owl file If you’ve got a valid project file*: Select “OWL Files” as the Project Format, and then “Open Other” to find the .pprj file (if you’ve already opened it, it will be in “Open Recent”) Open C:\Protégé_3.0_beta\examples\pizzas\pizzas2_0.owl * Ie one created on this version of Protégé - the s/w gets updated once every few days, so don’t count on it unless you’ve created it recently– safest to build from the .owl file if in doubt Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Primitive Classes All classes in our ontology so far are Primitive We describe primitive pizzas Primitive Class = only Necessary Conditions They are marked as yellow in the class hierarchy We condone building a disjoint tree of primitive classes Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Describing Primitive Pizza Classes Start with pizzas2_0.owl Create a new pizza under NamedPizza either choose from the menu or make it up Create a new Existential (SomeValuesFrom) Restriction with the hasTopping property and a filler from PizzaTopping (eg HamTopping) Add more Restrictions in the same way to complete the description each restriction is added to an intersection – so a Pizza must have toppingA and must have toppingB etc see MargheritaPizza for an example Create another pizza that has at least one meat ingredient remember disjoints Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Polyhierarchies By the end of this tutorial we intent to create a VegetarianPizza Some of our existing Pizzas should be types of VegetarianPizza However, they could also be types of SpicyPizza or CheeseLoversPizza We need to be able to give them multiple parents Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Vegetarian Pizza attempt 1 Start with pizzas2_1.owl Create a new pizza called “VegetarianPizza” under Pizza make this disjoint from its siblings as we have been doing Select MargheritaPizza you will notice that it only has a single parent, NamedPizza Add VegetarianPizza as a new parent using the conditions widget “Add Named Class” button we have asserted that MargheritaPizza has 2 parents Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Reasoning about our Pizzas Start with your existing ontology Start RACER Classify your ontology You will see an inferred hierarchy appear, which will show any movement of classes in the hierarchy You will also see a results window appear at the bottom of the screen which describes the results of the reasoner MargheritaPizza turns out to be inconsistent – why? Remember MeatyVegetableTopping? Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Attempting again Close the inferred hierarchy and results Remove the disjoint between VegetarianPizza and its siblings When prompted, choose to remove only between this class and its siblings Re-Classify your ontology This should now be accepted by the reasoner with no inconsistencies Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Asserted Polyhierarchies We believe asserting polyhierarchies is bad We lose some encapsulation of knowledge Difficult to maintain let the reasoner do it! Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Defined Classes Have a definition. That is at least one Necessary and Sufficient condition Are marked in orange in the interface Classes, all of whose individuals satisfy this definition, can be inferred to be subclasses Reasoners can perform this inference Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Describing a MeatyPizza Start with your existing ontology, close the reasoner panes Create a subclass of Pizza called MeatyPizza Don’t put in the disjoints or you’ll get the same problems as before In general, defined classes are not disjoint from siblings Add a restriction to say: “Every MeatyPizza must have at least one meat topping” Classify your ontology What happens? Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Defining a MeatyPizza Start with your existing ontology, close the reasoner panes Click and drag your  hasTopping MeatTopping restriction from “Necessary” to “Necessary & Sufficient” The MeatyPizza class now turns orange, denoting that it is now a defined class Click and drag the Pizza Superclass from “Necessary” to “Necessary & Sufficient” Make sure when you release you are on top of the existing restriction otherwise you will get 2 sets of conditions. You should have a single orange icon on the right stretching across both conditions like this… Classify your ontology What happens? Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Reasoner Classification The reasoner has been able to infer that anything that is a Pizza that has at least one topping from MeatTopping is a MeatyPizza Therefore, classes fitting this definition are found to be subclasses of MeatyPizza, or are subsumed by MeatyPizza The inferred hierarchy is updated to reflect this and moved classes are highlighted in blue Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Viewing our Hierarchy Graphically Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester OWLViz Tab View Asserted Model View Inferred Model Polyhierarchy tangle Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

How do we Define a Vegetarian Pizza? Nasty Define in words? “a pizza with only vegetarian toppings”? “a pizza with no meat (or fish) toppings”? “a pizza that is not a MeatyPizza”? More than one way to model this Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Defining a Vegetarian Topping Start with your existing ontology Create a subclass of PizzaTopping called VegetarianTopping Click “Create New Expression” in the Conditions Widget Type in or select each of the top level PizzaToppings that are not meat or fish (ie DairyTopping, FruitTopping etc) and between each, type the word “or” the “or” will be translated into a union symbol Press Return when finished you have created an anonymous class described by the expression Make this a defined class by moving both conditions from the “Necessary” to the “Necessary & Sufficient” conditions Classify your ontology Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Class Constructors: Union AKA “disjunction” This OR That OR TheOther (This That TheOther) Set theory Commonly used for: Covering axioms (like VegetarianTopping) Closure Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Covering Axioms Covered class – that to which the condition is added Covering classes – those in the union expression A covering axiom in the “Necessary & Sufficient” Conditions means: the covered class cannot contain any instances from a class other than one of the covering classes Gender  Female Male In this example, the class Gender is “covered” by Male or Female All individuals in Gender must be individuals from Male or Female There are no other types of Gender Gender Male Female Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Vegetarian Pizza attempt 2 Start with your existing ontology Select MargheritaPizza and remove VegetarianPizza from its superclasses Select VegetarianPizza and create a restriction to say that it “only has toppings from VegetarianTopping” Make this a defined class by moving all conditions from “Necessary” to “Necessary & Sufficient” Make sure when you release you are on top of the existing restriction otherwise you will get 2 sets of conditions. You should have a single orange icon on the right stretching across both conditions Classify your ontology What happens? Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Open World Assumption The reasoner does not have enough information to classify pizzas under VegetarianPizza Typically several Existential restrictions on a single property with different fillers – like primitive pizzas Existential should be paraphrased by “amongst other things…” Must state that a description is complete We need closure for the given property This is in the form of a Universal Restriction with a Union of the other fillers using that property Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Closure Example: MargheritaPizza All MargheritaPizzas must have: at least 1 topping from MozzarellaTopping and at least 1 topping from TomatoTopping and only toppings from MozzarellaTopping or TomatoTopping The last part is paraphrased into “no other toppings” The union closes the hasTopping property on MargheritaPizza Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Closing Pizza Descriptions Start with your existing ontology Select MargheritaPizza Create a Universal Restriction on the hasTopping property with a filler of “TomatoTopping MozzarellaTopping” Remember, you can type “or” to achieve this, or you can use the expression palette Close your other pizzas Each time you need to create a filler with the union of all the classes used on the hasTopping property (ie all the toppings used on that pizza) Classify your ontology Finally, the defined class VegetarianPizza should subsume any classes that only have vegetarian toppings Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Other Definitions of Veggie Pizzas Start with your existing ontology Create a VegetarianPizza2 Create a new class expression ”not MeatyPizza” You can type “not” to achieve this, or you can use the expression palette Convert this class to a defined class Move both Pizza and NOT MeatyPizza to the necessary & sufficient conditions Classify your ontology Finally, the defined class VegetarianPizza2 should subsume any classes that are not MeatyPizzas Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Other Definitions of Veggie Pizzas Start with your existing ontology Create a VegetarianPizza3 Create a restriction to state that it has some MeatTopping Negate this by editing the class expression (double click on it) Convert this class to a defined class Classify your ontology Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Other Definitions of Veggie Pizzas Start with your existing ontology Create a VegetarianPizza4 Create a universal restriction on the hasTopping property with a a filler of “NOT MeatTopping” Convert this class to a defined class Classify your ontology Note that this is an equivalent class to the previous definition of VegetarianPizza “ hasTopping NOT meat” “NOT  hasTopping meat” Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Properties: Domain and Range Start with your existing ontology Add a domain of Pizza to hasTopping Create a class Icecream under DomainConcept Create a restriction to state that Icecream has at least one topping from CheeseTopping (yuk!) Classify your ontology What has happened to Icecream? Make sure Icecream is disjoint to its siblings and reclassify Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Properties: Domain and Range Domain and Range are not used to restrict the interface They are used by the reasoner to infer additional information about individuals An individual that uses a property with a domain set can be inferred to be a member of the domain class (the same holds for range) Classes that uses a property with a domain set in an existential restriction will be inferred to be a subclass of the domain class (or inconsistant if these classes are disjoint) - the same does not apply to range. This is because all individuals in this class must have at least one relationship using this property Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Properties: Functional Properties Start with your existing ontology Make hasTopping functional Classify your ontology – what happens? Undo your change to hasTopping, but make hasBase functional Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Other Exercises: Create an InterestingPizza Create a class, InterestingPizza under Pizza Create a minCardinality restriction for hasTopping with a value of 3 Convert to a defined class Classify to check that it works – you may need to add some more pizzas Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Other Exercises: Define RealItalianPizza Convert RealItalianPizza to a defined class Add information to your pizzas to allow some of them to classify under this one Classify remember to check your disjoint if you have problems Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Other Exercises Add FishTopping to PizzaToppings, and correct your vegetarian pizzas to use “MeatTopping OR FishTopping” Create other PizzaToppings Create other Pizzas from the menu and check that they classify correctly Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Summary You should now be able to: Use Defined Classes to allow a polyhierarchy to be computed Classify using a Reasoner Create Covering Axioms Close Class Descriptions to cope with Open World Reasoning Appreciate that there can be several ways to model a class (some of which are exactly equivalent) Understand the effects of using domain and range on properties Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Your Pizza Finder Once you have a pizza ontology you are happy with, you can “plug it in” to the PizzaFinder Instructions available on line at… Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester The Software Protégé is Free The OWL Plugin is Open Source Many plugins are available from scripting to visualisation Software / resources / community at: http://protege.stanford.edu/ http://www.co-ode.org/ Protege-OWL tutorial, © 2005 Univ. of Manchester 2nd Feb 2005