Académique Documents
Professionnel Documents
Culture Documents
O p e n G A LE N
Overview
Pizzas Card Sorting
Protg Introduction
Subsumption Creating a Class Hierarchy
Consistency
Disjointness Relationships & Properties Restrictions Polyhierarchies - Issues
Our Domain
Pizzas have been used in Manchester tutorials for years. Pizzas were selected as a domain for several reasons:
They are fun They are internationally known They are highly compositional They have a natural limit to their scope They are fairly neutral
Although arguments still break out over representation Even pizzas can do this - its an inevitable part of knowledge modelling ARGUING IS NOT BAD!
Reference Materials
Having references to validate decisions, and act as provenance can be useful for maintaining an ontology Mistakes, omissions and intentions can be more easily traced if a reference can be made
When building, we highly recommend documenting your model as you go keeping provenance information is a good way of doing this
We have provided you with a pizza menu and several cards with ingredients on
Our Ontology
When building an ontology we need an application in mind ontologies should not be built for the sake of it Keep the application in mind when creating concepts this should help you scope the project The PizzaFinder application has been developed so that you can plug your ontology in at the end of the day and see it in action
Let us know your ideas for extending the application
Our Application
www.co-ode.org/downloads/pizzafinder/
Copyright 2005, The University of Manchester
Ambiguity
words not concepts
Missing Knowledge
What is peperonata?
competency questions
What are we likely to want to ask our ontology? bear the application in mind
OWL Constructs
Person
Elvis Holger Paraguay Kylie S.Claus Latvia
Country
Belgium
Class (concept)
China
Hai
Flipper
Animal
Rudolph
N-ary relationships can be modelled with workarounds in OWL, but this design pattern will not be discussed today
Is a knowledge modelling environment
core is based on Frames (object oriented) modelling
has an open architecture that allows other modelling languages to be built on top
supports development of plugins to allow backend / interface extensions now supports OWL through the Protg-OWL plugin
Protg-OWL
Class Hierarchy
Subsumption hierarchy Structure as asserted by the ontology engineer
Subsumption
Superclass/subclass relationship, isa All members of a subclass can be inferred to be members of its superclasses
A B A subsumes B A is a superclass of B B is a subclass of A All members of B are also members of A
Class Editor
Class annotations (for class metadata) Class name and documentation
Disjoints widget
If you are borrowing a laptop, please take a note of the number on the top cover
Please save all files to: My Documents\ontologies Because you will be needing your work again tomorrow
3. Select OK
Consistency Checking
Weve just created a class that doesnt really make sense
What is a MeatyVegetableTopping?
Wed like to be able to check the logical consistency of our model This is one of the tasks that can be done automatically by software known as a Reasoner Being able to use a reasoner is one of the main advantages of using a logic-based formalism such as OWL (and why we are using OWL-DL)
Copyright 2005, The University of Manchester
Reasoners
Reasoners are used to infer information that is not explicitly contained within the ontology
Reasoners can be used at runtime in applications as a querying mechanism (esp useful for smaller ontologies) We will use one during development as an ontology compiler. A well designed ontology can be compiled to check its meaning is that intended
These reasoners typically set up a service running locally or on a remote server Protg-OWL can only connect to reasoners over an http:// connection
When the reasoner has finished, 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 separate results window inconsistent classes turn red moved classes turn blue
Copyright 2005, The University of Manchester
Disjointness
= 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
Disjointness
= 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
Other Inconsistencies?
Your ontology is likely to have several classes with multiple parents We call this a tangle As we have seen, a class cannot have 2 disjoint parents it will be inconsistent To remove other inconsistencies you will have to be careful about where your disjoints are remove disjoints between multiple parents by hand This is obviously an awkward thing to manage we will later show you how to manage your tangle to simplify these issues
You should now be able to select every class and see its siblings in the disjoints widget (if it has any)
Pizza
PizzaTopping
= individual
Relationships in OWL
In OWL-DL, relationships can only be formed between Individuals or between an Individual and a data value.
(In OWL-Full, Classes can be related, but this cannot be reasoned with)
Relationships are formed along Properties We can restrict how these Properties are used:
Globally by stating things about the Property itself
Or locally by restricting their use for a given Class
OWL Properties
Object Property relates Individuals
Creating Properties
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
Creating Properties
We tend to name properties using camelNotation with a lowercase letter to begin We often create properties using 2 standard naming patterns:
has (eg hasColour) isOf (eg isTeacherOf) or other suffixes (eg In To)
Conditions Widget
Conditions asserted by the ontology engineer Add different types of condition
Definition of the class (later) Description of the class Conditions inherited from superclasses
Copyright 2005, The University of Manchester
Conditions Types
Logical (Anonymous) Classes
Create Restriction (next) Create Class Expression Add Named Superclass
Creating Restrictions
Restricted Property
Restriction Type
Filler Expression
Syntax check
Pizza
PizzaBase
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
Copyright 2005, The University of Manchester
Pizza
PizzaBase
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
Why?
We have created a restriction: hasBase PizzaBase on Class Pizza as a necessary condition
Each Restriction or Class Expression describes the set of all individuals that satisfy the condition
PizzaBase
Each necessary condition on a class is a superclass of that class ie The restriction hasBase PizzaBase is a superclass of Pizza As Pizza is a subclass of the restriction, all Pizzas must satisfy the restriction that they have at least one base from PizzaBase
Copyright 2005, The University of Manchester
Restriction Types
Existential, someValuesFrom Universal, allValuesFrom hasValue Cardinality Max Cardinality Min Cardinality Some, At least one Only equals x Exactly n At most n At least n
Primitive Classes
All classes in our ontology so far are Primitive We describe primitive pizzas Primitive Class = only Necessary Conditions They are marked as plain orange circles in the class hierarchy
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 CheeseyPizza We need to be able to give them multiple parents in a principled way We could just assert multiple parents like we did with MeatyVegetableTopping (without disjoints)
BUT
Copyright 2005, The University of Manchester
Asserted Polyhierarchies
We believe asserting polyhierarchies is bad
Difficult to maintain
Adding new classes becomes difficult because all subclasses may need to be updated Extracting from a graph is harder than from a tree
Summary
You should now be able to: extract Knowledge (and act as an expert) identify components of the Protg-OWL Interface