Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
In The Name Of Allah
Instructor: Dr.Ghasem-Aghaie
Presentation: Mohammad Sadegh Salehi
Ontology Development in
Protégé
Protégé – Winter 2014
 Session 1: Ontology And OWL Basics,
 Syntatic Web,
 Problem of Syntatic Web,
 Semantic Web,
 O...
Ontology and OWL
Protégé – Winter 2014
Hard Work using the Syntactic Web…
Find images of Tim Bray and Alan Rector…
Tim Bray
Sun
Microsystem...
Protégé – Winter 2014
Impossible (?) using the Syntactic Web…
Complex queries involving background knowledge
 Find infor...
Protégé – Winter 2014
What is the Problem?
Consider a typical web page:
Markup consists of:
Rendering information
(e.g., f...
Protégé – Winter 2014
What is the Problem?
WWW2002
The eleventh international world wide web conference
Sheraton waikiki h...
Protégé – Winter 2014
What is the Problem?

      
  ...
Protégé – Winter 2014
What is the Problem?
Solution: XML markup with “meaningful” tags?
<name>  ...
Protégé – Winter 2014
What is the Problem?
But What About… Machine sees…
<>
    ...
Protégé – Winter 2014
Need to Add “Semantics”
Use Ontologies to specify meaning of
annotations
 Ontologies provide a voc...
Protégé – Winter 2014
Our Domain
Pizzas have been used in Manchester
tutorials for years,
Tutorial developed by BioHealt...
Protégé – Winter 2014
Pizzas…
are fun
are internationally known
are highly compositional
are limited in scope
are fai...
Protégé – Winter 2014
Pizzas Ontology …
Pizza
Pizza Topping Pizza_base
Vegetarian
Pizza Vegetable
Topping
Margareta
Pizza
...
Protégé – Winter 2014
 Is the Web Ontology Language…
 is a standard – Web Ontology Language
 comes in 3 flavours (lite,...
Protégé – Winter 2014
OWL helps us …
 Describe something, rather than just name it.
 Class (BlueThing) does not mean any...
Protégé – Winter 2014
OWL is a syntax independent language that has
several common representations
 – Abstract Syntax
 ...
Protégé – Winter 2014
One of the clearer human-readable syntaxes
OWL Syntax: Abstract Syntax
Class(SpicyPizza complete
an...
Protégé – Winter 2014
OWL Constructs
Person Country
= class (concept)
Animal
= individual (instance)
Belgium
Paraguay
Chin...
Protégé & Protégé-OWL
Protégé – Winter 2014
 Developed by Stanford Medical Informatics,
 Has a large user community (approx 300k),
 Free, ope...
Protégé – Winter 2014
 Based on Java, is extensible,
 Provides a plug-and-play environment
 Supported by a strong commu...
Protégé – Winter 2014
Keep in mind that Protégé is...
 ...not a programming language.
 ...only a tool. It will not prev...
Protégé – Winter 2014
 Create a new ontology from scratch
 Download and extend an existing ontology
 Export ontologies ...
Protégé – Winter 2014
 Homepage
 http://protege.stanford.edu/
 Download
 http://protege.stanford.edu/download/protege/...
Protégé – Winter 2014
Protégé Overview
Protégé – Winter 2014
Classes in OWL
Classes: ‟OWL classes are interpreted as sets.”
Primitive Classes: ‟Classes that on...
Protégé – Winter 2014
Classes in Protégé
 All classes are subclasses of Thing
 Classes overlap by default!
 Can use too...
Protégé – Winter 2014
Properties in OWL
 Object Properties
 Relationships between two individuals
 Correspond to relati...
Protégé – Winter 2014
Properties in Protégé
Object or data type
Properties can have
Subproperties
Inverse properties
Protégé – Winter 2014
Protégé Tabs
Protégé tabs
Protégé – Winter 2014
Protégé OWL plugin: Tabs
Used in this tutorial
Changing the GUI
Populating the
model
Top-level
funct...
Protégé – Winter 2014
Classes Tab
Protégé – Winter 2014
ClassesTab: Asserted Class Hierarchy
Subsumption hierarchy (superclass/subclass)
Structure as assert...
Protégé – Winter 2014
ClassesTab: Class Editor
Protégé – Winter 2014
ClassesTab: Class Editor
Class annotations (for class metadata)
Class name and documentation
Propert...
Protégé – Winter 2014
Create Classes
1. Click the “Create Class” button
(this is above the class hierarchy)
A new class wi...
Protégé – Winter 2014
Concept: Disjointness
All classes could potentially overlap
Pizza Ice Cream
= individual
This mean...
Protégé – Winter 2014
Concept: Disjointness
If we state that classes are disjoint
This means an individual cannot be bot...
Protégé – Winter 2014
Concept: Disjointness
Add siblings as disjoint
Add new disjoint Remove disjoint siblings
List of dis...
Protégé – Winter 2014
Classes
Create Pizza Ontology classes
 Pizza
 PizzaBase
 PizzaTopping
Protégé – Winter 2014
Classes
Pizza Toppings classes
Using the Tools->“Create class Hierarchy…”
 CheeseTopping
◦ Mozzarel...
Protégé – Winter 2014
Creating Properties
Properties can be in a hierarchy
Search for property
Create property
Protégé – Winter 2014
Creating Properties
There can be at most one individual (range)
that is related to the domain indivi...
Protégé – Winter 2014
Properties in Protégé
Protégé – Winter 2014
Restrictions
Definition
 A restriction describes an anonymous
(unnamed) class
◦ The set of subclass...
Protégé – Winter 2014
Restrictions
Add restrictions
 Specify that Pizza only has one PizzaBase
◦ Add a cardinality restri...
With Protégé 4.3
Using a Reasoner
Protégé – Winter 2014
Reasoner - Definition
 A piece of software able to infer logical
consequences from a set of asserte...
Protégé – Winter 2014
Reasoner -Used for
 Consistency checking
◦ Test whether a class could have instances
 Classificati...
Protégé – Winter 2014
Reasoner- Protégé 4.3 support
 Built-in support
◦ Pellet (http://clarkparsia.com/pellet)
◦ FaCT ++(...
Protégé – Winter 2014
Reasoner - Pellet vs FaCT++
FaCT++Pellet
 Open-source Java OWL DL
reasoner
 Support expressivity o...
Protégé – Winter 2014
 http://protegewiki.stanford.edu/index.php/Protege4UserDocs
 Pizzas and other ontologies are avail...
Protégé – Winter 2014
Pizzas…
Most often it is not the domain expert that formalises
their knowledge
Because of the comp...
Protégé – Winter 2014
Ontology in Linguistics
Concept
Form
/ Symbol
Referent
“semiotic
triangle”
activates Relates to
“Tan...
Protégé – Winter 2014
Datatype Properties
Add datatype properties
 Create a hasCalorificContentValue datatype property wi...
Protégé – Winter 2014
Datatype Properties
Protégé – Winter 2014
Object Properties
Protégé – Winter 2014
Object Properties
Create some Object Properties
 isIngredientOf
◦ isToppingOf
◦ isBaseOf
 hasIngre...
Protégé – Winter 2014
Structure of an Ontology
Ontologies typically have two distinct components: Terminology
Names for i...
Ontology development in protégé-آنتولوژی در پروتوغه
Upcoming SlideShare
Loading in …5
×

Ontology development in protégé-آنتولوژی در پروتوغه

1,822 views

Published on

آنتولوژی در پروتوغه

Published in: Engineering

Ontology development in protégé-آنتولوژی در پروتوغه

  1. 1. In The Name Of Allah
  2. 2. Instructor: Dr.Ghasem-Aghaie Presentation: Mohammad Sadegh Salehi Ontology Development in Protégé
  3. 3. Protégé – Winter 2014  Session 1: Ontology And OWL Basics,  Syntatic Web,  Problem of Syntatic Web,  Semantic Web,  Ontology and Pizza Example,  OWL,  Session 2: Protégé & Protégé-OWL,  What is Protégé?  Protégé and OWL,  Pizza in Protégé , Agenda
  4. 4. Ontology and OWL
  5. 5. Protégé – Winter 2014 Hard Work using the Syntactic Web… Find images of Tim Bray and Alan Rector… Tim Bray Sun Microsystems Rev. Alan M. Gates, Associate Rector of the Church of the Holy Spirit, Lake Forest, Illinois Prof Alan Rector, University of Manchester, Medical Informatics Group
  6. 6. Protégé – Winter 2014 Impossible (?) using the Syntactic Web… Complex queries involving background knowledge  Find information about “animals that use sonar but are not either bats or dolphins”, e.g., Barn owl Locating information in data repositories  Travel enquiries  Prices of goods and services Finding and using “web services”  Book me a holiday next weekend somewhere warm, not too far away, and where they speak French or English
  7. 7. Protégé – Winter 2014 What is the Problem? Consider a typical web page: Markup consists of: Rendering information (e.g., font size and colour) Hyper-links to related content Semantic content is accessible to humans but not (easily) to computers…
  8. 8. Protégé – Winter 2014 What is the Problem? WWW2002 The eleventh international world wide web conference Sheraton waikiki hotel Honolulu, hawaii, USA 7-11 may 2002 1 location 5 days learn interact Registered participants coming from australia, canada, chile denmark, france, germany, ghana, hong kong, india, ireland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switzerland, the united kingdom, the united states, vietnam, zaire Register now On the 7 May Honolulu will provide the backdrop of the eleventh international world wide web conference. This prestigious event … Speakers confirmed Tim berners-lee Tim is the well known inventor of the Web, … Ian Foster Ian is the pioneer of the Grid, the next generation internet … What information can we see…
  9. 9. Protégé – Winter 2014 What is the Problem?                                                        … What information can a machine see…
  10. 10. Protégé – Winter 2014 What is the Problem? Solution: XML markup with “meaningful” tags? <name>     </name> <location>     </location> <date>  </date> <slogan>     </slogan> <participants>          </participants> <introduction>           … </introduction> <speaker> </speaker> <bio>       </bio>…
  11. 11. Protégé – Winter 2014 What is the Problem? But What About… Machine sees… <>      </> <>     </> <>  </> <>     </> <>                   </> <>            …  </> <> </> <>        </> <> </> <>        </>
  12. 12. Protégé – Winter 2014 Need to Add “Semantics” Use Ontologies to specify meaning of annotations  Ontologies provide a vocabulary of terms  New terms can be formed by combining existing ones  Meaning (semantics) of such terms is formall specified  Can also specify relationships between terms in
  13. 13. Protégé – Winter 2014 Our Domain Pizzas have been used in Manchester tutorials for years, Tutorial developed by BioHealth Informatics Group in Manchester,
  14. 14. Protégé – Winter 2014 Pizzas… are fun are internationally known are highly compositional are limited in scope are fairly uncontroversial
  15. 15. Protégé – Winter 2014 Pizzas Ontology … Pizza Pizza Topping Pizza_base Vegetarian Pizza Vegetable Topping Margareta Pizza Tomato Topping Cheese Topping Spicy Beef Pizza Mozzarella Topping Deep Dish base Regular base
  16. 16. Protégé – Winter 2014  Is the Web Ontology Language…  is a standard – Web Ontology Language  comes in 3 flavours (lite, DL and full)  we are using OWL DL (Description Logic)  DL = decidable fragment of First Order Logic (FOL)  Is used for capturing knowledge in a machine understandable way Review of OWL
  17. 17. Protégé – Winter 2014 OWL helps us …  Describe something, rather than just name it.  Class (BlueThing) does not mean anything  Class (BlueThing complete owl:Thing restriction (hasColour someValuesFrom (Blue)))
  18. 18. Protégé – Winter 2014 OWL is a syntax independent language that has several common representations  – Abstract Syntax  – N3  – RDF/XML OWL Syntax
  19. 19. Protégé – Winter 2014 One of the clearer human-readable syntaxes OWL Syntax: Abstract Syntax Class(SpicyPizza complete annotation(rdfs:label "PizzaTemperada"@pt) annotation(rdfs:comment "Any pizza that has a spicy topping is a SpicyPizza"@en) Pizza restriction(hasTopping someValuesFrom(SpicyTopping)) )
  20. 20. Protégé – Winter 2014 OWL Constructs Person Country = class (concept) Animal = individual (instance) Belgium Paraguay China Latvia Elvis Hai Holger Kylie S.Claus Rudolph Flipper = property (relationship)
  21. 21. Protégé & Protégé-OWL
  22. 22. Protégé – Winter 2014  Developed by Stanford Medical Informatics,  Has a large user community (approx 300k),  Free, open source ontology editor and knowledge-base framework. What is Protégé?
  23. 23. Protégé – Winter 2014  Based on Java, is extensible,  Provides a plug-and-play environment  Supported by a strong community of developers and academic, government and corporate users What is Protégé?(Cont.)
  24. 24. Protégé – Winter 2014 Keep in mind that Protégé is...  ...not a programming language.  ...only a tool. It will not prevent you from making mistakes.  Notice that we will be referring to Protégé 4.3 in this and the following hands-on exercise. What is Protégé?(Cont.)
  25. 25. Protégé – Winter 2014  Create a new ontology from scratch  Download and extend an existing ontology  Export ontologies in a variety of formats  OWL  RDF  XML Schema What can you do with Protégé?
  26. 26. Protégé – Winter 2014  Homepage  http://protege.stanford.edu/  Download  http://protege.stanford.edu/download/protege/4.3/installanywh ere/  Documentation  http://protegewiki.stanford.edu/index.php/Protege4UserDocs  Plugins  http://code.google.com/p/co-ode-owl- plugins/downloads/list?can=3 Get Protégé
  27. 27. Protégé – Winter 2014 Protégé Overview
  28. 28. Protégé – Winter 2014 Classes in OWL Classes: ‟OWL classes are interpreted as sets.” Primitive Classes: ‟Classes that only have necessary conditions”; Example: Animal, Cat… Defined Classes: ‟A class that has at least one necessary and sufficient condition”; Example: All things that are biped and lack feathers.
  29. 29. Protégé – Winter 2014 Classes in Protégé  All classes are subclasses of Thing  Classes overlap by default!  Can use tools menu to create class hierarchies
  30. 30. Protégé – Winter 2014 Properties in OWL  Object Properties  Relationships between two individuals  Correspond to relationships in UML  Examples: is_part_of, is_kissing  Datatype Properties  Relationships between an individual and data values  Correspond to attributes in UML  Examples: has_DateValue, has StringValue
  31. 31. Protégé – Winter 2014 Properties in Protégé Object or data type Properties can have Subproperties Inverse properties
  32. 32. Protégé – Winter 2014 Protégé Tabs Protégé tabs
  33. 33. Protégé – Winter 2014 Protégé OWL plugin: Tabs Used in this tutorial Changing the GUI Populating the model Top-level functionality Extensions (visualisation)
  34. 34. Protégé – Winter 2014 Classes Tab
  35. 35. Protégé – Winter 2014 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
  36. 36. Protégé – Winter 2014 ClassesTab: Class Editor
  37. 37. Protégé – Winter 2014 ClassesTab: Class Editor Class annotations (for class metadata) Class name and documentation Properties “available” to Class Disjoints widget Conditions Widget Class-specific tools (find usage etc)
  38. 38. Protégé – Winter 2014 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:Thing 2. Type in a new name “DomainConcept” over the default (return updates the hierarchy) 3. Req. for later labs: document your class using the rdfs:comment field 4. Create another class called “Pizza” using the same method You 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
  39. 39. Protégé – Winter 2014 Concept: Disjointness All classes could potentially overlap Pizza Ice Cream = individual This means an individual could be both a Pizza and a IceCream at the same time.
  40. 40. Protégé – Winter 2014 Concept: Disjointness If we state that classes are disjoint This means an individual cannot be both a Pizza and a Ice Cream at the same time We must do this explicitly in the interface Pizza Ice Cream = individual
  41. 41. Protégé – Winter 2014 Concept: Disjointness Add siblings as disjoint Add new disjoint Remove disjoint siblings List of disjoint classes
  42. 42. Protégé – Winter 2014 Classes Create Pizza Ontology classes  Pizza  PizzaBase  PizzaTopping
  43. 43. Protégé – Winter 2014 Classes Pizza Toppings classes 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…
  44. 44. Protégé – Winter 2014 Creating Properties Properties can be in a hierarchy Search for property Create property
  45. 45. Protégé – Winter 2014 Creating Properties There can be at most one individual (range) that is related to the domain individual via the property: “hasMother” The inverse property is functional: “hasMother → hasChild” 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: “hasAncestor” P(A,B) -> P(B,A) If a property P is symmetric, and the property relates individual A to individual B : “hasSibling”
  46. 46. Protégé – Winter 2014 Properties in Protégé
  47. 47. Protégé – Winter 2014 Restrictions Definition  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
  48. 48. Protégé – Winter 2014 Restrictions Add restrictions  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”
  49. 49. With Protégé 4.3 Using a Reasoner
  50. 50. Protégé – Winter 2014 Reasoner - Definition  A piece of software able to infer logical consequences from a set of asserted facts or axioms
  51. 51. Protégé – Winter 2014 Reasoner -Used for  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
  52. 52. Protégé – Winter 2014 Reasoner- Protégé 4.3 support  Built-in support ◦ Pellet (http://clarkparsia.com/pellet) ◦ FaCT ++(http://owl.man.ac.uk/factplusplus/)  Connection to external reasoners through a DIG interface
  53. 53. Protégé – Winter 2014 Reasoner - Pellet vs FaCT++ FaCT++Pellet  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
  54. 54. Protégé – Winter 2014  http://protegewiki.stanford.edu/index.php/Protege4UserDocs  Pizzas and other ontologies are available from:  www.co-ode.org/ontologies/  W3C Documentation  http://www.w3.org/2001/sw/BestPractices/  Ian Horrocks, Sean Bechhofer:  http://www.cs.man.ac.uk/~horrocks/Slides/Innsbruck-tutorial/  Practical Guide To Building OWL Ontologies Using Prot´eg´e 4 and CO-ODE Tools, Mathew Horridge, Edition 1.2, 2009,university of manchester Refrences
  55. 55. Protégé – Winter 2014 Pizzas… Most often it is not the domain expert that formalises their knowledge Because of the complexity of the modelling task it is normally a specialist “knowledge engineer”  Hopefully, as tools get easier to use, this will change Having access to experts is critical for most domains Luckily, we are all experts in Pizzas, so we just need some material to verify our knowledge…
  56. 56. Protégé – Winter 2014 Ontology in Linguistics Concept Form / Symbol Referent “semiotic triangle” activates Relates to “Tank“ [Ogden, Richards, 1923] Stands for “a concept, is the mediator that relates the symbol to its object” John F Sowa
  57. 57. Protégé – Winter 2014 Datatype Properties Add datatype properties  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
  58. 58. Protégé – Winter 2014 Datatype Properties
  59. 59. Protégé – Winter 2014 Object Properties
  60. 60. Protégé – Winter 2014 Object Properties Create some Object Properties  isIngredientOf ◦ isToppingOf ◦ isBaseOf  hasIngredient ◦ hasTopping ◦ hasBase Pizza Ingredients Ingredients that make up the Pizza
  61. 61. Protégé – Winter 2014 Structure of an Ontology Ontologies typically have two distinct components: Terminology Names for important concepts in the domain  Elephant is a concept whose members are a kind of animal  Herbivore is a concept whose members are exactly those animals who eat only plants or parts of plants  Adult_Elephant is a concept whose members are exactly those elephants whose age is > 20 years Background knowledge/constraints on the domain: Axioms  Adult_Elephants weigh at least 2,000 kg  All Elephants are either African_Elephants or Indian_Elephants  No individual can be both a Herbivore and a Carnivore

×