Session 1: Primitive 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

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.
XP Tutorial 4 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Personalizing Your Windows Environment Tutorial 4.
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.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
The Semantic Web Week 15 Reasoning with (and Visualising) Ontologies Module Website: Practical :Protégé-2000 WITH.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
The Semantic Web Week 14 Module Website: Lecture (SHORT): OWL PIZZAS Practical (LONGER): Getting to know Protégé-2000.
XP New Perspectives on Microsoft Office Word 2003 Tutorial 1 1 Microsoft Office Word 2003 Tutorial 1 – Creating a Document.
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
XP 1 Microsoft Office Word 2003 Tutorial 1 – Creating a Document.
Editing Description Logic Ontologies with the Protege OWL Plugin.
Ch 9 Managing Active Directory User Accounts. Objectives Create Organizational Unit Creating User Accounts in Active Directory Disabling, Enabling, and.
Access Tutorial 10 Automating Tasks with Macros
Logics for Data and Knowledge Representation
SEMANTIC WEB, OWL & PROTÉGÉ Matthew J Wood CS 570 – Topics in Artificial Intelligence Spring 2013.
| | Tel: | | Computer Training & Personal Development Outlook Express Complete.
MICROSOFT WORD GETTING STARTED WITH WORD. CONTENTS 1.STARTING THE PROGRAMSTARTING THE PROGRAM 2.BASIC TEXT EDITINGBASIC TEXT EDITING 3.SAVING A DOCUMENTSAVING.
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.
CIS—100 Chapter 15—Windows Vista 1. Parts of a Window 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.
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
XP 1 Microsoft Word 2002 Tutorial 1 – Creating a Document.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 1: Primitive.
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
XP New Perspectives on Microsoft Access 2002 Tutorial 21 Microsoft Access Tutorial 2 – Creating And Maintaining A Database.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
BioHealth Informatics Group A Practical Introduction to Ontologies & OWL Session 2: Defined Classes and Additional Modelling Constructs in OWL Nick Drummond.
Unit 1: Java and Eclipse The Eclipse Development Environment.
Using Advanced Options Lesson 14 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft Word 2013.
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.
© University of Manchester Simplifying OWL Learning lessons from Anaesthesia Nick Drummond BioHealth Informatics Group.
2nd Sept 2004UK e-Science all hands meeting1 Designing User Interfaces to Minimise Common Errors in Ontology Development Alan Rector, Nick Drummond, Matthew.
BioHealth Informatics Group Copyright © 2005, The University of Manchester1 A Practical Introduction to Ontologies & OWL Additional Exercises: Common Errors.
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.
OWL (Ontology Web Language and Applications) Maw-Sheng Horng Department of Mathematics and Information Education National Taipei University of Education.
A Practical Introduction to Ontologies & OWL
Tutorial 1 – Creating a Document
Creating Oracle Business Intelligence Interactive Dashboards
Based on ProtegeOWLTutorial at protege website
Business Objects Overview
Information Organization
About SharePoint Server 2007 My Sites
Lab exercise - 3a Alan Rector & colleagues
Presentation by the COODE and
Tutorial 1 – Creating a Document
Creating Database Tables
Session 2: Defined Classes Nick Drummond
Lesson 9 Windows Management
CS646: OWL Tutorial (session 2)
Windows xp PART 1 DR.WAFAA SHRIEF.
Microsoft Official Academic Course, Access 2016
Microsoft Office Access 2003
Approving Time in Kronos Manager/Supervisor Reference Guide
University of Manchester
Presentation transcript:

Session 1: Primitive Classes Nick Drummond Protégé-OWL Tutorial Session 1: Primitive Classes Nick Drummond Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester This session Review: OWL Basics Intro: Protégé-OWL Interface: Creating Classes Tools: The Reasoner Concept: Disjointness Interface: Creating Properties Concept: Describing Classes Interface: Creating Restrictions Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Review of OWL (30 secs) OWL… is a W3C standard – Web Ontology Language comes in 3 flavours (lite, DL and full) we are using OWL DL (Description Logic) DL = decidable fragment of First Order Logic (FOL) is generally found in XML/RDF syntax is therefore not much fun to write by hand So, we have tools to help us Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Starting Protégé-OWL Run Protégé from Start Menu Select “OWL Files” Select “New” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Protégé OWL plugin Protégé tabs Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protégé OWL plugin: Tabs Used in this tutorial Changing the GUI Populating the model Top-level functionality Extensions (visualisation) Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Classes Tab Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Classes Tab: Asserted Class Hierarchy Subsumption hierarchy (superclass/subclass) Structure as asserted by the ontology engineer Create and Delete classes (actually subclasses!!) Everything is a subclass of owl:Thing Search for class Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Classes Tab: Class Editor Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Classes Tab: Class Editor Class annotations (for class metadata) Class name and documentation Properties “available” to Class Disjoints widget Conditions Widget Class-specific tools (find usage etc) Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Create a Class Hierarchy Start with your empty ontology Click the “Create Class” button (this is above the class hierarchy) A new class will be created as a subclass of owl:Thing Type in a new name “DomainConcept” over the default (return updates the hierarchy) Create another class called “Pizza” using the same method You will notice that Pizza has been created as a subclass of DomainConcept as this was the class selected when the button was pressed. You can also right-click any class and select “Create Class” Create two more subclasses of DomainConcept “PizzaTopping” and “PizzaBase”. Any mistakes, use the “Delete Class” button next to “Create Class” Create subclasses of PizzaTopping: CheeseTopping, VegetableTopping and MeatTopping Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Save Your Work OWL = easy to make mistakes – save regularly Select File  Save A dialog (as shown) will pop up Select a file using a file selector by clicking the button on the top right You will notice that 2 files are created .pprj – the project file this just stores information about the GUI and the workspace .owl – the OWL file this is where your ontology is stored in RDF/OWL format Select OK Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Create an odd PizzaTopping Start with your existing ontology Create a subclass of VegetableTopping called “MeatyVegetableTopping” You will notice that the Conditions Widget has VegetableTopping listed – this means it is an asserted superclass of MeatyVegetableTopping Add MeatTopping as another parent of MeatyVegetableTopping using the “Add Named Class” button on the conditions widget MeatyVegetableTopping can now be seen underneath both parents in the asserted class hierarchy We have asserted that MeatyVegetableTopping has 2 parents Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Reasoning We’ve just created a class that doesn’t really make sense – what is a Meaty Vegetable Topping? We’d like to be able to check the logical consistency of our model Later we’d also like to make automatic inferences about the subsumption hierarchy. A process known as classifying ie Moving classes around in the hierarchy based on their logical definition Generic software capable of these tasks are known as reasoners (although you may hear them being referred to as Classifiers) RACER is a reasoner Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Running Racer Run racer.exe from wherever it was installed A cmd window will open and two “service enabled” messages will appear in the ouput Racer is now ready for use as an http server using a standard interface called DIG NB. Alternative DIG reasoners like FaCT can also be used Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Accessing the Reasoner Classify taxonomy (and check consistency) Compute inferred types (for individuals) Just check consistency (for efficiency) Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Reasoning about our Pizzas Start with your existing ontology Classify your ontology We could just use the “Check Consistency” button but we’ll get into the habit of doing a full classification as we’ll be doing this later The reasoner dialog will pop up while the reasoner works When the reasoner has finished, press OK You will see an inferred hierarchy appear, which will show any movement of classes in the hierarchy If the reasoner has inferred anything about our model, this is reported in the reasoner dialog and in a seperate results window. Not much appears to have happened – why has the reasoner not picked up on this odd class? Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Disjointness OWL assumes that classes overlap MeatTopping VegetableTopping = individual This means an individual could be both a MeatTopping and a VegetableTopping at the same time We want to state this is not the case Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Disjointness If we state that classes are disjoint MeatTopping VegetableTopping = individual This means an individual cannot be both a MeatTopping and a VegetableTopping at the same time We must do this explicitly in the interface Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

ClassesTab: Disjoints Widget Add siblings as disjoint Add new disjoint Remove disjoint siblings List of disjoint classes Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Make Classes Disjoint Close the inferred hierarchy Select the Pizza class The disjoints widget is currently empty Click the “Add all siblings…” button The “Add siblings to disjoints dialog pops up Select the “Mutually between all siblings” option and OK PizzaTopping and PizzaBase appear in the disjoints widget Select the PizzaTopping class Pizza and PizzaBase are already in the disjoints widget Note that the same applies for PizzaBase Add disjoints between subclasses of PizzaTopping Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Running the Reasoner again Start with your existing ontology Classify your ontology You will see MeatyVegetableTopping highlighted in red in both hierarchies – this highlights that a class is inconsistent You will also see messages in both the reasoner dialog and a results window appear at the bottom of the screen which describes the results of the reasoner MeatyVegetableTopping turns out to be inconsistent Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Why is MeatyVegetableTopping inconsistent? We are asserting that a MeatyVegetableTopping is a subclass of two classes we have stated are disjoint The disjoint means nothing can be a MeatTopping and a VegetableTopping at the same time This means that the class of MeatyVegetableTopping can never contain any individuals The class is therefore inconsistent This is what we expect! It can be useful to create classes we expect to be inconsistent to “test” your model – often we refer to these classes as “probes” – generally it is a good idea to document them as such to avoid later confusion Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Create More Sensible PizzaToppings Start with your existing ontology Create subclasses of CheeseTopping: MozzarellaTopping, ParmesanTopping Make these subclasses all disjoint from one another Create subclasses of VegetableTopping and make them disjoint: TomatoTopping, MushroomTopping Save to another file using File  Save As… Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester What have we got? We’ve created a tree of disjoint classes Disjoints are inherited down the tree eg something that is a TomatoTopping cannot be a Pizza because its superclass, PizzaTopping, is disjoint from Pizza You should now be able to select every class (except DomainConcept) and see its siblings in the disjoints widget Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester What are we missing? This is not a semantically rich model Apart from “is kind of” and “is not kind of”, we currently don’t have any other information of interest We want to say more about Pizza individuals, such as their relationship with other individuals We can do this with properties Pizza PizzaTopping = individual Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Properties Tab Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Properties Tab: Property Browser Properties can be in a hierarchy Search for property SuperProperties of the current selected Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Properties Tab: Property Browser Delete Property New Object Property: Associates an individual to another individual not used today: - New Datatype Property (String, int etc) - New Annotation Properties for metadata - New SubProperty – ie create “under” the current selection Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Create a Property Start with your existing ontology Switch to the Properties tab There are currently no properties, so the list is blank Create a new Object property using the button in the property browser Call the new Property “hasTopping” Create another Object Property called “hasBase” Save under a new filename Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Associating Properties with Classes We now have two properties we want to use to describe Pizza individuals. To do this, we must go back to the Pizza class and add some further information This comes in the form of Restrictions (which are a type of Condition) Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

ClassesTab: Conditions Widget Conditions asserted by the ontology engineer Add different types of condition Definition of the class (later) Description Conditions inherited from superclasses Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Conditions Types Create Restriction (next) Add Named Superclass Create Class Expression Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Create a Restriction Start with your existing ontology Switch to the OWL Classes tab Select Pizza Notice that the conditions widget only contains one item, DomainConcept with a Class icon. Superclasses show up in the conditions widget in this way Click the “Create Restriction” button A dialog pops up that we will investigate in a minute Select “hasBase” from the Restricted Property pane Leave the Restriction type as “someValuesFrom” Type “PizzaBase” in the Filler expression editor Click OK A restriction has been added to the Conditions widget Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester What does this mean? We have created a restriction:  hasBase PizzaBase on Class Pizza as a necessary condition hasBase Pizza PizzaBase hasBase hasBase hasBase “If an individual is a member of this class, it is necessary that it has at least one hasBase relationship with an individual from the class PizzaBase” “Every individual of the Pizza class must have at least one base from the class PizzaBase” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester What does this mean? We have created a restriction:  hasBase PizzaBase on Class Pizza as a necessary condition Pizza PizzaBase hasBase “There can be no individual, that is a member of this class, that does not have at least one hasBase relationship with an individual from the class PizzaBase” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Restrictions Popup Restriction Type Restricted Property Filler Expression Syntax check Expression Construct Palette Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Restriction Types  Existential, someValuesFrom “Some”, “At least one”  Universal, allValuesFrom “Only”  hasValue “equals x”  Cardinality “Exactly n”  Max Cardinality “At most n”  Min Cardinality “At least n” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Another Existential Restriction Start with your existing ontology Make sure Pizza is selected Create a new Existential (SomeValuesFrom) Restriction with the hasTopping property and a filler of PizzaTopping When entering the filler, you have 2 shortcut methods rather than typing the entire classname: 1) enter a partial name and use Tab to autocomplete 2) use the select Class button on the editor palette Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Create a Universal Restriction Start with your existing ontology Create 2 disjoint subclasses of PizzaBase called “ThinAndCrispy” and “DeepPan” Create a subclass of Pizza called “RealItalianPizza” Create a new Universal (AllValuesFrom) Restriction on RealItalianPizza with the hasBase property and a filler of ThinAndCrispy Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester What does this mean? We have created a restriction:  hasBase ThinAndCrispy on Class RealItalianPizza as a necessary condition RealItalianPizza ThinAndCrispy hasBase hasBase hasBase hasBase “If an individual is a member of this class, it is necessary that it must only have a hasBase relationship with an individual from the class ThinAndCrispy” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester What does this mean? We have created a restriction:  hasBase ThinAndCrispy on Class RealItalianPizza as a necessary condition DeepPan RealItalianPizza hasBase ThinAndCrispy hasBase hasBase hasBase hasBase “No individual of the RealItalianPizza class can have a base from a class other than ThinAndCrispy” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Universal Warning: Trivial Satisfaction If we had not already inherited:  hasBase PizzaBase from Class Pizza the following could hold RealItalianPizza hasBase ThinAndCrispy Trivially satisfied by this individual hasBase hasBase hasBase “If an individual is a member of this class, it is necessary that it must only have a hasBase relationship with an individual from the class ThinAndCrispy, or no hasBase relationship at all” Universal Restrictions by themselves do not state “at least one” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

Protege-OWL tutorial, © 2005 Univ. of Manchester Summary You should now be able to: identify components of the Protégé-OWL Interface create Primitive Classes create Properties create some basic Restrictions on a Class using Existential and Universal qualifiers Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

More exercises: Create a MargheritaPizza Start with your existing ontology Create a subclass of Pizza called NamedPizza Create a subclass of NamedPizza called MargheritaPizza Create a restriction to say that: “Every MargheritaPizza must have at least one topping from TomatoTopping” Create another restriction to say that: “Every MargheritaPizza must have at least one topping from MozzarellaTopping” Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005

More exercises: Create other pizzas Start with your existing ontology Add more topping ingredients as subclasses of PizzaTopping Use the hierarchy, but be aware of disjoints Create more subclasses of NamedPizza Menus available at the front Create a restrictions on these pizzas to describe their ingredients Save this for the next session Protege-OWL tutorial, © 2005 Univ. of Manchester 1st Feb 2005