Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial...
Transcript of Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial...
![Page 1: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/1.jpg)
Presented by the COODE and HyOntUse projects
Funded by
Protege Tutorial Part Oneadapted by
Julien Tanefrom
The original Tutorial can be found at:http://www.cs.man.ac.uk/~horrocks/teaching/cs646/
![Page 2: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/2.jpg)
Protégé OWL plugin
Protégé tabs
![Page 3: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/3.jpg)
Protégé OWL plugin: Tabs
Used in this tutorial
Populating the model
Toplevel functionality
Extensions (visualisation)
![Page 4: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/4.jpg)
ClassesTab: 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
![Page 5: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/5.jpg)
ClassesTab: Class Editor
![Page 6: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/6.jpg)
ClassesTab: Class EditorClass annotations (for class metadata)
Class name and documentation
Properties “available” to
Class
Disjoints widget
Conditions Widget
Classspecific tools (find usage etc)
![Page 7: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/7.jpg)
Create Classes
1)Click the “Create Class” button (this is above the class hierarchy)A new class will be created as a subclass of owl:Thing2)Type in a new name “DomainConcept” over the default(return updates the hierarchy)3) Comment your classes using the rdf:comment field4)Create another class called “Pizza” using the same methodYou 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 rightclick any class and select “Create Class”5)Create two more subclasses of DomainConcept called “PizzaTopping” and “PizzaBase”.Any mistakes, use the “Delete Class” button next to “Create Class”
Start with your empty ontology
![Page 8: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/8.jpg)
Disjointness
● OWL assumes that classes overlap
Pizza PizzaTopping
= individual
• This means an individual could be both a Pizza and a PizzaTopping at the same time
• We want to state this is not the case
![Page 9: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/9.jpg)
Disjointness
● If we state that classes are disjoint
• This means an individual cannot be both a Pizza and a PizzaTopping at the same time
• We must do this explicitly in the interface
Pizza PizzaTopping
= individual
![Page 10: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/10.jpg)
ClassesTab: Disjoints WidgetAdd siblings as disjoint
Add new disjoint Remove disjoint siblings
List of disjoint classes
![Page 11: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/11.jpg)
Make Classes Disjoint
1. Select the Pizza class You will notice that the disjoints widget is empty
2. lick the “Add all siblings…” buttonThe “Add siblings to disjoints dialog pops up
3. Select the “Mutually between all siblings” option and OKPizzaTopping and PizzaBase appear in the disjoints widget
4. Select the PizzaTopping classPizza and PizzaBase are already in the disjoints widget
5. Note that the same applies for PizzaBase
Start with your existing ontology
![Page 12: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/12.jpg)
What have we got?
● We’ve created a tree of disjoint classes• Disjoints are inherited down the tree
egsomething 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
![Page 13: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/13.jpg)
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
![Page 14: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/14.jpg)
Properties Tab
![Page 15: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/15.jpg)
Properties Tab: Property Browser
Properties can be in a hierarchy
Search for property
SuperProperties of the current selected
![Page 16: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/16.jpg)
Create a Property
1. Switch to the Properties tab There are currently no properties, so the list is blank
2. Create a new Object property using the button in the property browser3. Call the new Property “hasTopping”4. Create another Object Property called “hasBase”5. Save under a new filename
Start with your existing ontology
![Page 17: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/17.jpg)
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)
![Page 18: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/18.jpg)
ClassesTab: Conditions WidgetConditions asserted by the ontology engineer
Definition of the class (later)
Description of the class
Conditions inherited from superclasses
Add different types of condition
![Page 19: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/19.jpg)
Create a Restriction
1) Switch to the OWL Classes tab2) 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
3) Click the “Create Restriction” buttonA dialog pops up that we will investigate in a minute
4) Select “hasBase” from the Restricted Property pane5) Leave the Restriction type as “someValuesFrom”6) Type “PizzaBase” in the Filler expression editor7) Click OK
A restriction has been added to the Conditions widget
Start with your existing ontology
![Page 20: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/20.jpg)
What does this mean?
● We have created a restriction: ∃ hasBase PizzaBaseon Class Pizza as a necessary condition
• “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”
Pizza PizzaBasehasBase
hasBase
hasBase
hasBase
• “Every individual of the Pizza class must have at least one base from the class PizzaBase”
![Page 21: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/21.jpg)
What does this mean?
● We have created a restriction: ∃ hasBase PizzaBaseon Class Pizza as a necessary condition
Pizza PizzaBasehasBase
hasBase
hasBase
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”
![Page 22: Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:](https://reader036.fdocuments.net/reader036/viewer/2022062415/5fd3bc1ffbb9e66cf53d8e95/html5/thumbnails/22.jpg)
Restrictions Popup
Restriction TypeRestricted Property
Filler Expression
Syntax checkExpression
Construct
Palette