[go: up one dir, main page]

0% found this document useful (0 votes)
14 views40 pages

Protege Tutorial

Uploaded by

Gayathri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views40 pages

Protege Tutorial

Uploaded by

Gayathri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Protégé Tutorial

Fabio Papacchini
Protégé – What and Where
What is Protégé? (from their webpage)
A free, open-source ontology editor and framework for building
intelligent systems
Protégé is supported by a strong community of academic,
government, and corporate users, who use Protégé to build
knowledge-based solutions in areas as diverse as biomedicine,
e-commerce, and organisational modelling.
Where to get it: http://protege.stanford.edu/
Useful resources
I http:
//mowl-power.cs.man.ac.uk/protegeowltutorial/
resources/ProtegeOWLTutorialP4_v1_3.pdf
NOTE: the manual is for version 4, but the current version is 5.1
I http://protegewiki.stanford.edu/wiki/Main_Page
Protégé – What and Where (cont’d)

Specifically, Protégé is
I a java-based application (multi-platform)
I thought for a variety of people (more than 300 thousands users)
I a GUI to help the editing of ontologies
creation, modification, reasoning, debugging, . . .
Syntax – DL, OWL, Manchester

Protégé uses the Manchester syntax

DL OWL Manchester

> owl:Thing owl:Thing


⊥ owl:Nothing owl:Nothing
Concept name Class Class
Role name Object property Object property
¬C ObjectComplementOf(C) not C
CtD ObjectUnionOf(C D) C or D
CuD ObjectIntersectionOf(C D) C and D
∃r .C ObjectSomeValuesFrom(r C) r some C
∀r .C ObjectAllValuesFrom(r C) r only C
(≥ n r .C) ObjectMinCardinality(n r C) r min n C
(≤ n r .C) ObjectMaxCardinality(n r C) r max n C
(= n r .C) ObjectExactCardinality(n r C) r exactly n C

https://www.w3.org/TR/owl2-manchester-syntax/
Syntax – DL, OWL, Manchester – Example
DL
Person u ∃hasGender .Male
(= 2 hasWheel.FrontWheel) u (= 2 hasWheel.RearWheel)
OWL (omitting “Object” for succinctness)
IntersectionOf(Person SomeValuesFrom(hasGender Male))
IntersectionOf(ExactCardinality(2 hasWheel FrontWheel)
ExactCardinality(2 hasWheel RearWheel))
Manchester
Person and (hasGender some Male)
(hasWheel exactly 2 FrontWheel) and (hasWheel exactly 2
RearWheel)
Convention
I concept names begin with an uppercase letter
I role names begin with a lowercase letter
I CamelBack notation for both concept and role names
An Ontology about Video Games

Assume we want to build an ontology about video games as follows.

self-standing modifiers relations definable


- Game - Genre hasDifficulty MultiPlatform
- NamedGame - SinglePlayer hasPlatform PuzzleGame
- LoL - MultiPlayer hasGenre HardGame
- Chess - Puzzle NormalGame
- Sudoku - RolePlayGame EasyGame
- WoW - Online LinuxGame
- Platform - Difficulty WindowsGame
- Windows - Hard MacOSXGame
- MacOSX - Normal ...
- Linux - Easy
Adding Classes
Make sure to have the “Classes” tab open
Window → Tabs → Classes

Add Subclass
Adding Classes
Make sure to have the “Classes” tab open
Window → Tabs → Classes

Add Sibling
Delete Class
Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .
Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .
Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .
Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .
Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .

Axioms involving “Game”


Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .

Description of the class “Game”


Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .

Game v >
Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .

Game u ValuePartition v ⊥
Game u Genre v ⊥
Game u Platform v ⊥
Adding Class Hierarchies
It allows us to speed up the process of adding classes.
Tools → Create class hierarchy. . .

Delete axiom

Edit axiom
What Now?

What we have. . .
I all non-definable classes
I an initial class hierarchy
I basic (among siblings) disjoint axioms

What we need to add. . .


I object properties
I relations between classes
I definable classes
Object Properties (Domain and Range)
Make sure to have the “Object Properties” tab open
Window → Tabs → Object Properties

∃hasPlatform.> v Game
Object Properties (Domain and Range)
Make sure to have the “Object Properties” tab open
Window → Tabs → Object Properties

Autocompletion using “tab”


Object Properties (Domain and Range)
Make sure to have the “Object Properties” tab open
Window → Tabs → Object Properties

> v ∀hasPlatform.Platform
Adding Axioms

Which axioms?
I only axioms of the following forms
I A v C (necessary condition for A)
I A ≡ C (sufficient and necessary condition for A – definition)
I for each subclass of NamedGame we need to insert axioms
expressing something like
I Chess can be installed on any platform
I League of Legends is an online game
I DifficultyValuePartition need to be properly defined
(i.e., its values can only be Hard, Normal, or Easy)
I adding definable classes
A v C – Example

I Natural language specification


Chess can be installed on any platform
I Rephrase the specification using the ontology vocabulary
Chess has platform Windows, has platform MacOSX, and
has platform Linux
I Write it in description logic syntax (optional)
Chess v ∃hasPlatform.WindowsPlatform
Chess v ∃hasPlatform.MacOSXPlatform
Chess v ∃hasPlatform.LinuxPlatform
I Write it in Manchester syntax (the right-hand side is enough)
hasPlatform some WindowsPlatform
hasPlatform some MacOSXPlatform
hasPlatform some LinuxPlatform
Adding Axioms to the Class “Chess”
Adding Axioms to the Class “Chess”
Adding Axioms to the Class “Chess”
Improving DifficultyValuePartition Definition

What needs to be done?


I add DifficultyValuePartition ≡ Hard t Normal t Easy
Note that Hard, Normal and Easy are already disjoint
I add domain and range of hasDifficulty
I make hasDifficulty functional
Improving DifficultyValuePartition Definition (cont’d)
Improving DifficultyValuePartition Definition (cont’d)
Improving DifficultyValuePartition Definition (cont’d)
Improving DifficultyValuePartition Definition (cont’d)
Adding Definable Class “MultiPlayerGame”
Adding Definable Class “MultiPlayerGame”
Adding Definable Class “MultiPlayerGame”

MultiPlayerGame ≡ Game u ∃hasGenre.MultiPlayer


Reasoning

Protégé can be used for reasoning tasks such as classification

I configure the reasoner


Reasoner → Configure. . . (for this tutorial, check everything
under Class inferences and Object property inferences)
I select a reasoner
for example, Reasoner → HermiT (other reasoners can be
added, which one to use depends on several factors such
as the expressivity of the ontology)
I finally, Reasoner → Start reasoner
Reasoning Example
Reasoning Example

Inferred
Reasoning – Visually (Asserted)
Reasoning – Visually (Inferred)
Resources Summary

Download from http://protege.stanford.edu/

Guide, Slides, Wiki


I Official Tutorial (for version 4, small differences here and there)
http:
//mowl-power.cs.man.ac.uk/protegeowltutorial/
resources/ProtegeOWLTutorialP4_v1_3.pdf
I Wiki
http://protegewiki.stanford.edu/wiki/Main_Page
I extended version of this presentation at the module site
http://cgi.csc.liv.ac.uk/˜frank/teaching/
comp08/comp321.html

Game Ontology http://cgi.csc.liv.ac.uk/˜frank/


teaching/comp08/videogame.owl

You might also like