22
Presented by the CO-ODE and HyOntUse projects Funded by Protege Tutorial Part One adapted by Julien Tane from The original Tutorial can be found at: http://www.cs.man.ac.uk/~horrocks/teaching/cs646/

Protege Tutorial Part One - uni-kassel.de · Protege Tutorial Part One ... Used in this tutorial Populating the model Toplevel functionality Extensions (visualisation) ClassesTab:

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

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:

Presented by the CO­ODE 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:

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:

Protégé OWL plugin: Tabs

Used in this tutorial

Populating the model

Top­level 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:

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:

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:

ClassesTab: Class EditorClass annotations (for class metadata)

Class name and documentation

Properties “available” to 

Class

Disjoints widget

Conditions Widget

Class­specific 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:

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 right­click 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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

Restrictions Popup

Restriction TypeRestricted Property

Filler Expression

Syntax checkExpression

Construct

Palette