protégé

59
Version 4.0 beta

Upload: norina

Post on 21-Jan-2016

77 views

Category:

Documents


0 download

DESCRIPTION

Protégé. Version 4.0 beta. Protégé. Free, open-source ontology editor and knowledge-base framework Based on Java, is extensible, and provides a plug-and-play environment Supported by a strong community of developers and academic, government and corporate users. Protégé Version 4.0 beta. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Protégé

Version 4.0 beta

Page 2: Protégé

Free, open-source ontology editor and knowledge-base framework

Based on Java, is extensible, and provides a plug-and-play environment

Supported by a strong community of developers and academic, government and corporate users

Page 3: Protégé

Pure OWL Framework Supports both OWL1.1 and OWL 2.0 Direct connection with OWL Reasoners

◦ Pellet◦ FaCT++

Page 5: Protégé
Page 6: Protégé

With Protégé 4.0 beta

Page 7: Protégé

Classes◦ Sets that contain individuals◦ Thing

Class representing the set containing all individuals All classes are subclasses of Thing

Properties◦ Binary relations between two individuals (Object

Property) or one individual and a datatype (Datatype Property)

Individuals◦ Represent objects within the Ontology (members

of classes)

Page 8: Protégé

OWL does not use the Unique Name Assumption (UNA)◦ This means that different names may refer to the

same individual◦ E.g. the names “Matt” and “Matthew” may refer

to the same individual (or they may not) Cardinality restrictions rely on ‘counting’

distinct individuals◦ Therefore it is important to specify that either

“Matt” and “Matthew” are the same individual, or that they are different individuals

Page 9: Protégé

OWL Classes are assumed to ‘overlap’◦ Individuals of a class A can also be individuals of

class B◦ Therefore one cannot assume that an individual is

not a member of a particular class simply because it has not been asserted to be a member of that class

To ‘separate’ a group of classes◦ One must make them disjoint from one another◦ If A is disjoint from B, then an individual of class A

cannot also be an individual of class B

Page 10: Protégé

Open World Assumption Close World Assumption

The information contained within the ontology is incomplete

It is assumed there can always be more information

Something does not hold unless it is explicitly stated

E.g. The information on the Semantic Web

The information contained within the ontology is complete

It is assumed the information available is everything

Something does not hold by not been stated

E.g. The information within a Database

Page 11: Protégé
Page 12: Protégé

Make all sibling classes disjoint from each other

Pizza PizzaBase PizzaTopping

Page 13: Protégé

Using the Tools->“Create class Hierarchy…”

Select PizzaBase as root class Add classes◦ ThinAndCrispyBase◦ DeepPanBase

Page 14: Protégé

Using the Tools->“Create class Hierarchy…”

CheeseTopping◦ MozzarellaTopping◦ ParmezanTopping

MeatTopping◦ HamTopping◦ PepperoniTopping◦ SalamiTopping◦ SpicyBeefTopping

SeafoodTopping◦ AnchovyTopping◦ TunaTopping

VegetableTopping◦ OliveTopping◦ OnionTopping◦ PepperTopping◦ TomatoTopping

Meaning: All individuals that are members of the class TomatoTopping are members of the class VegetableTopping and members of the class PizzaTopping…

Page 15: Protégé

Object Properties◦ Relationships between two individuals◦ Correspond to relationships in UML

Datatype Properties◦ Relationships between an individual and data

values◦ Correspond to attributes in UML

Page 16: Protégé

Domain and Range◦ Properties link individuals from the domain to

individuals or datatypes from the range Characteristics

◦ Specify the meaning of properties Restrictions

◦ Explained latter Super Properties

◦ Properties can be further refined as sub-properties inheriting the domain, range, characteristics and restrictions

Page 17: Protégé

Functional (single valued properties)◦ There can be at most one individual (range) that

is related to the domain individual via the property.

◦ e.g. A person only has one mother. Inverse Functional

◦ The inverse property is functional (which does not mean that the property is functional).

Page 18: Protégé

Transitive: P(A,B) and P(B,C) -> P(A,C)◦ If a property P is transitive, and the property relates individual

A to individual B, and also individual B to individual C, ◦ Then we can infer that individual A is related to individual C via

property P.◦ Notes

If a property is transitive then its inverse property should also be transitive

If a property is transitive then it cannot be functional.

◦ e.g. An ancestor of a person’s father is also his ancestor. Symmetric: P(A,B) -> P(B,A)

◦ If a property P is symmetric, and the property relates individual A to individual B

◦ Then individual B is also related to individual A via property P.◦ e.g. Two sibling persons are siblings with each other.

Page 19: Protégé

Antisymmetric: P(A,B) -> ∼P(B,A)

◦ If a property P is antisymmetric, and the property relates individual A to individual B then individual B cannot be related to individual A via property P

◦ e.g. If a person is parent of its child, then its child never can be a parent of that person.

Reflexive: P(A,A)

◦ A property P is said to be reflexive when the property must relate individual A to itself

◦ e.g. A Person always knows herself. Irreflexive

◦ If a property P is irreflexive, it can be described as a property that relates an individual A to individual B, where individual A and individual B are not the same.

◦ e.g. A Person cannot be father of himself.

Page 20: Protégé
Page 21: Protégé

Domain◦ Classes of Individuals

Range◦ Classes of Individuals

Characteristics that can be applied◦ Functional◦ Inversed Functional◦ Transitive◦ Symmetric◦ Antisymmetric◦ Reflexive◦ Irreflexive

Inverted Properties◦ If some property links

individual A to individual B then its inverse property will link individual B to individual A

◦ E.g. hasIngredient versus isIngredientOf

Page 22: Protégé

Pizza Ingredients Ingredients that make up the Pizza

hasIngredient◦ hasTopping◦ hasBase

isIngredientOf◦ isToppingOf◦ isBaseOf

Page 23: Protégé

Domain & Ranges Property Characteristics

Maintain hasIngredient domain and range as Thing◦ Since hasIngredient is to

be set as transitive◦ Thus the domain and

range must be compatible Specify the range for

hasTopping to PizzaTopping

Specify the range for hasBase to PizzaBase

Make isIngredientOf properties inverse of hasIngredient

Make the hasIngredient property transitive◦ A ingredient of an

ingredient, is also an ingredient of a Pizza

Make the hasBase property functional◦ A Pizza has only one base

Page 24: Protégé
Page 25: Protégé

Domain◦ Classes of Individuals

Range◦ XML Schema Datatype value (

http://www.w3.org/TR/xmlschema-2/)◦ RDF literal◦ XML literal

Characteristics that can be applied◦ Functional

Cannot have Inverted Properties

Page 26: Protégé
Page 27: Protégé

Create a hasCalorificContentValue datatype property with integer as range

Create a hasBaseProperty for PizzaBase (domain)◦ Create a hasWidth datatype sub-property of

hasBaseProperty with integer as range◦ Create a hasThickness datatype sub-property of

hasBaseProperty with float as range Change characteristics to Functional of the

datatype properties◦ hasCalorificContentValue◦ hasWidth◦ hasThickness

Page 28: Protégé
Page 29: Protégé

Description Property Assertions

Type◦ Specifies the class(es)

which it is an instance Same Individuals

◦ Relation between two individuals which are “clones” of each other

Different Individuals◦ Relation between two

individuals independent individuals

Object Property Assertions◦ Specify relations over a

given object property Data Property

Assertions◦ Specify relations over a

given datatype property

Page 30: Protégé

Create a class called Country and populate it with some individuals◦ Italy, America, England, France, and Germany

Create example pizza individuals◦ “Example-Margherita” with calorific value of 263 (integer)◦ “QuattroFormaggio” with calorific value of 723 (integer)

Create a MozzarellaTopping individual

Page 31: Protégé

A restriction describes an anonymous (unnamed) class◦ The set of subclasses and individuals that satisfy

the given restriction Applies to

◦ Classes◦ Object Properties◦ Datatype Properties

Page 32: Protégé

Quantifier Restrictions◦ Effectively puts constraints on the relationships that the

individual participates in by Specifying that at least one kind (existential) of relationship must

exist, or e.g. Pizza hasTopping some TomatoTopping

Specifying the only kinds (universal) of relationships that can exist (if they exist) e.g. Pizza hasBase only PizzaBase

Cardinality Restrictions◦ Specify the number of relationships that an individual may

participate in for a given property◦ Comes in three flavors: Min, Max and Exact

Value Restrictions (covered latter)◦ Specifies a object property relation to a specific individual

Page 33: Protégé

Specify that Pizza only has one PizzaBase◦ Add a cardinality restriction to Pizza on hasBase to exactly one

PizzaBase◦ Add to the superclasses section “hasBase exactly 1 PizzaBase”

Specify that Pizza has at least one PizzaTopping◦ Add an existencial restriction to Pizza on hasTopping to

PizzaToppings◦ Add to the superclasses section “hasTopping some

PizzaTopping”

Create a value restriction to specify that MozzarellaTopping has Italy as its country of origin◦ Create hasCountryOfOrigin object property with Country as

range◦ Add to the superclass section “hasCountryOfOrigin value Italy”

Page 34: Protégé

Necessary Necessary & Sufficient

If an individual is a member of class A it must satisfy the conditions (necessary)

One-way implication Restrictions in the

“superclass” section Used for checking

Consistency!

If an individual is a member of the class A it must satisfy the conditions (necessary)

And if any individual satisfies these conditions then it must be a member of class A (sufficient)

Two-way implication Restrictions in the

“equivalent class” section Used for assertion

(Classification)!

Page 35: Protégé

A covering axiom consists of two parts◦ The class that is being ‘covered’

The class is equivalent to one of its subclasses◦ The classes that form the covering

All subclasses must be disjoint

Page 36: Protégé

Create a ValuePartition to represent the spiciness of pizza toppings◦ Create a subclass of Thing called “Spiciness”◦ Create three new classes (Hot, Medium, and Mild)

as subclasses of “Spiciness”◦ Make all subclasses disjoint

Create an object property called hasSpiciness with Spiciness as range

Create a Covering Axiom for Spiciness◦ Add to the “equivalent classes” section “Hot or

Medium or Mild”

Page 37: Protégé

Classes that are defined as the precisely listing of the individuals that are the members of the class◦ e.g. Days of the week (Monday, Tuesday,

Wednesday, Thursday, Friday, Saturday and Sunday)

Make Country an enumerated class◦ At the restriction to the equivalent class section◦ Add “{America, England, France, Germany,

Italy}”

Page 38: Protégé

Some of the common mistakes made when modelling have been enumerated

They include:◦ Misuse of property domain and range◦ Misunderstanding of intersections and other

constructs◦ Not understanding the Open World

Assumption◦ Misuse/lack of disjoints

See OWL Pizzas: Common errors & common patterns

http://www.co-ode.org/resources/papers/

Page 39: Protégé

With Protégé 4.0 beta

Page 40: Protégé

A piece of software able to infer logical consequences from a set of asserted facts or axioms

Page 41: Protégé

Consistency checking◦ Test whether a class could have instances

Classification◦ A classifier takes a class hierarchy and places a

class in the class hierarchy◦ Task of turning implicit definitions already present

in the hierarchy as explicit

Page 42: Protégé

Built-in support◦ Pellet (http://clarkparsia.com/pellet)◦ FaCT ++(http://owl.man.ac.uk/factplusplus/)

Connection to external reasoners through a DIG interface

Page 43: Protégé

Pellet FaCT++

Open-source Java OWL DL reasoner

Support expressivity of SROIQ(D)

Supports SWRL rules Available through AGPL

version 3 licence Latest version is 2.0.0

rc5 Support in Protégé for

1.5 version

New generation and C++ implementation of FaCT

Support expressivity of SROIQ(D)

No support for Rules Available through GNU

public license Latest version is 1.2.3 Support in Protégé for

1.2.3 version

Page 44: Protégé

Selecting…◦ Go to the “reasoner” menu and select “Pellet” as

your reasoner Running…

◦ In the same menu, click “Classify…”◦ or simply type Ctrl-R

Page 45: Protégé

Object Properties◦ Both isBaseOf and isToppingOf assume the range of its

inverted properties as their domain The domain of a property is the range of its inverted

property (and vice-versa)

Datatype Properties◦ Both hasWidth and hasThickness inherit the

hasBaseProperty domain

Individuals◦ Individual “MozarellaTopping_1” inherits the object

property hasCountryOfOrigin with “Italy” as range

Page 46: Protégé

Add a Probe Class called ProbeInconsistentTopping which is a subclass of both CheeseTopping and VegetableTopping

Classify…◦ Inconsistency detected since subclasses of PizzaTopping are

Disjoint.

Remove the disjoint statement between CheeseTopping and VegetableTopping to see what happens

Classify…◦ Consistent!

Remember to add disjoint statement at the end and remove Probe Class

Page 47: Protégé

Create a subclass of Pizza called “NamedPizza” Create Margherita, Americana, American hot

and Soho pizzas as subclasses of named pizza◦ Margherita Pizza with toppings Mozzarella and Tomato

(add to the “superclasses” section “hasTopping some TomatoTopping”)

◦ AmericanaPizza with toppings Mozzarella, Tomato and Pepperoni

◦ AmericanHotPizza with toppings Mozzarella, Tomato, Pepperoni and Pepper

◦ SohoPizza with toppings Mozzarella, Tomato, Olive and Parmesan

Make named pizzas disjoint

Page 48: Protégé

Create a cheesy pizza class for pizzas with cheese topping◦ Create a subclass of Pizza called “CheesyPizza”◦ Add to the “equivalent classes” section “Pizza and

hasTopping some CheeseTopping” Classify…

◦ AmericanPizza, AmericanHotPizza, MargheritaPizza and SohoPizza are now subclasses of CheesyPizza.

Page 49: Protégé

Create a vegetarian pizza that only has cheese and vegetable toppings◦ Create a subclass of Pizza called

“VegetarianPizza”◦ Add to the “equivalent classes” section “Pizza and

hasTopping only (CheeseTopping or VegetableTopping)”

Classify…◦ Why aren’t MargheritaPizza and SohoPizza

classified as VegetarianPizza?

Page 50: Protégé

Remember “Open World Assumption”◦ We have stated that Margherita pizza has

toppings that are kinds of mozzarella and also kinds of tomato,

◦ but we did not explicitly say that a margherita pizza only has these kinds of toppings,

◦ it is assumed that a margherita pizza could have other toppings…

Solution Add a Closure Axiom for all the Existential Axioms

Page 51: Protégé

Change MargheritaPizza, AmericanaPizza, AmericanHotPizza and SohoPizza to specify the toppings as mandatory◦ Add to the “equivalent classes” section◦ MargheritaPizza

“hasTopping only (MozzarellaTopping or TomatoTopping)”◦ AmericanaPizza

“hasTopping only (MozzarellaTopping or TomatoTopping or PepperoniTopping)”

◦ AmericanHotPizza “hasTopping only (MozzarellaTopping or TomatoTopping or

PepperoniTopping or PepperTopping)”◦ SohoPizza

“hasTopping only (ParmezanTopping or MozzarellaTopping or TomatoTopping or OliveTopping)”

Classify…◦ MargheritaPizza and SohoPizza are now classified as Vegetarian

Pizzas

Page 52: Protégé
Page 53: Protégé

Create non-vegetarian pizza◦ Create a subclass of Pizza called

“NonVegetarianPizza”◦ Make it disjoint from VegetarianPizza◦ Add to the “equivalent classes” section “Pizza and

not VegetarianPizza”◦ Make sure all pizza toppings and named pizzas

are disjoint Classify…

◦ AmericanHotPizza and AmericanaPizza are now non-vegetarian pizzas

Page 54: Protégé

Create a unclosed pizza with Mozzarella topping◦ Create a subclass of “NamedPizza” called

“UnclosedPizza”◦ Add to the “superclasses” section “Pizza and

hasTopping some MozzarellaTopping” Classify…

◦ UnclosedPizza is neither classified as a vegetarian pizza or non-vegetarian pizza

◦ Why? Remember “Open World Assumption”

◦ No assumption can be made since unclosed pizza may or may not have other toppings

Page 55: Protégé

Create an Interesting Pizza that has at least three toppings◦ Create a subclass of Pizza called

“InterestingPizza”◦ Add to the “equivalent classes” section “Pizza and

hasTopping min 3” Classify…

◦ AmericanaPizza, AmericanHotPizza and SohoPizza are now subclasses of InterestingPizza

Page 56: Protégé

Remove all disjoint conditions from Pizza Topping subclasses

Classify…◦ Why AmericanaPizza, AmericanHotPizza and

SohoPizza stop being classified as Interesting Pizzas?

Remember “Open World Assumption”◦ Since the pizza toppings stop being disjoint no

assumption can be made for 3 different kinds of toppings

Page 57: Protégé

Create a high calorie Pizza that has a calorific value higher than or equal to 400◦ Create a “HighCaloriePizza” as subclass of Pizza◦ Add to the “equivalent classes” section “”

Create a low calorie Pizza that has a calorific value lower than 400◦ Create a “LowCaloriePizza” as subclass of Pizza◦ Add to the “equivalent classes” section “”

Classify…

Page 58: Protégé

Create a Italian Topping for toppings with Italy as country of origin◦ Create Italian Topping class as subclass of Pizza

Topping◦ Add to the “equivalent class” section

“PizzaTopping and hasCountryOfOrigin Italy” Check that Mozzarella Topping is from Italy Classify…

◦ Mozzarella Topping is now an Italian Topping

Page 59: Protégé

Create a individual topping from Italy◦ Create a new individual called “ItalianTopping_1”

of class Pizza Topping◦ Specify the “hasCountryOfOrigin” property to

“Italy” Classify…

◦ “ItalianTopping_1” is now a member of class Italian Topping