Ontologies, OWL and Prot égé Duncan Hull The University of Manchester, UK http://www. manchester .ac. uk   Semantic Technologies Tuesday 22nd September 2009
Learning Objectives Understand some of the Web Ontology Language (OWL) and it’s explicit semantics Learn some of the principles of modelling using Description Logic ontologies and reasoning Gain hands-on introductory experience with ontology development using Protégé-OWL tools Learn how to take advantage of inferencing capabilites to build robust, reusable models Review where OWL fits in with related technology and why you might want to use it This tutorial normally takes 1-2 days (10 exercises), we can only scratch the surface of OWL and Protégé in a 90 minute session (~2 exercises)  http://bit.ly/owl-tutorial  11th/12th November, MAN Short summary of the class
Course Contents Why   would you want to use OWL?  - The Web Ontology Language What  is an OWL ontology? Where  does OWL fit with related technology? - W3C standards: XML, RDF and SPARQL - Relational Databases - Linked Data Who  is responsible for OWL? When  was OWL created? How  can you use OWL? - Tutorial Session Minor modifications to slides:  http://www.slideshare.net/dullhunk
Where I’m coming from… Trained as a Biologist Scientific, technical publishing  and software engineering PhD Computer Science (OWL+Web Services) 2007 Now integrating and mining public biochemical  data on the web Tamiflu ChEBI:7799   http://www.sbml.org   It’s all John’s fault!
Why  would you want to use OWL?
Why? Your data is  important  and you’re prepared to  invest  resources to precisely define the meaning in a way that computers can “understand” and  infer  additional information Image via   http://www.flickr.com/photos/dullhunk/639163558/
Why would you bother doing that? 1. Semantic Integration of Big Data “ The Web is Agreement” 2. Better Search and Querying “ Google is great but…” 3. Artificial Intelligence (A.I.) “ A more knowledgeable web…” 4. Some examples… 5. Standardisation
Why? No. 1 Semantic Integration Big Data: Lots of scenarios involve integrating data from multiple different sources: In some cases, data integration is easier and quicker where semantics are  agreed  in advance (rather than cleaning it up afterwards) CC-image via  http://en.wikipedia.org/wiki/File:Datawarehouse.png   stuff
Why? The Web is Agreement http://thewebisagreement.com/  OWL ontologies can be used to express  agreement  about the meaning of data on the Web  Between: Human-human, human-machine, and machine-machine Paul Downey
Why? No. 2 Better search   is great but search engines could be  much better , for example: Complex queries involving background knowledge: “ Find information about animals that use sonar  but are neither bats or dolphins”  (answer: barn owl) Finding and using web services: “ Book me a holiday next weekend somewhere warm, not too far away and where they speak french or english” Usually impossible to do using the syntactic web search, need semantic search Image via http://en.wikipedia.org/wiki/File:Tyto_alba_close_up.jpg
Why? No. 3 A.I. Artificial Intelligence was/is a key  motivation behind the semantic web E.g. “A new form of Web content that is meaningful to computers will unleash a revolution of new possibilities” - Tim Berners-Lee  et al  , Scientific American, 2001
Why? no. 3: A.I. 2001: A Semantic Odyssey? Realising the complete vision is (probably) too hard for now but we can make a start… People have already started to build semantic web s  (plural) rather than a monolithic semantic web, lets have a look at some of them… HAL 9000 Semantic Web? I'm sorry, Dave. I'm afraid I can't do that.
Why? no. 4: Some examples: Large biomedical terminologies  using OWL National Cancer Institute Thesaurus   http://cancer.gov   The NCI Thesaurus provides definitions, synonyms, and other information on nearly 10,000 cancers and related diseases Contains 50,000 concepts managed by up to 20 people, provides terminology for applications like the cancer image database.
Why? no. 4. Some examples “ SNOMED CT® is a clinical terminology - the Systematised Nomenclature of Medicine Clinical Terms. It is a common computerised language that will be used by all computers in the NHS to facilitate communications between healthcare professionals in clear and unambiguous terms.” 373,731 classes and over 1 million terms NHS version extended to 542,380 classes Large ontology classified in < 4 hours Reasoner finds inconsistencies: e.g. 180 missing subclasses Periocular_dermatitis subClassOf Disease_of_face
Why? 4. More examples Pharmaceutical, biotechnology, drug discovery etc… ChEBI:  Ch emical  E ntities of  B iological  I nterest http://www.ebi.ac.uk/chebi   “ freely available dictionary of ‘small’ chemical compounds” (e.g. many drugs) using OWL Currently contains ~500,000 small molecules, OWL is used to automate curation of the database and check quality
Why no.5 : Standardisation There are plenty of different ontology languages: … OWL is the only one that  is a W3C standard… Large and active community of developers and users around the world Choice of tools to handle OWL Interoperability etc
Why? Summary Biomedical applications Healthcare and Life Sciences Lots of terminology Big data Gigabytes / Terabytes of data Manual curation not possible Scientific applications (W3C HCLSIG) Precision and  Accuracy are important http://www.w3.org/2001/sw/hcls/   “ Biology is just  naming things”
What  is an OWL ontology?
What is an OWL ontology? “An ontology is a  formal representation  of a set of  concepts  within a domain and the  relationships  between those concepts. It is used to  reason  about the properties of that domain.” http://en.wikipedia.org/wiki/Ontology_(information_science)
What? Pizza ontology We’re going to use Pizzas in this tutorial… We could use more realistic examples but they require a specialist knowledge of:  Biochemistry Cancer Medicine etc … Whereas we are all “experts” on Pizza, Pizzas are the “Hello world” of ontologies http://www.co-ode.org/ontologies/pizza/   Pizza from  http://www.flickr.com/photos/roadsidepictures/1544645159/
Pizza Margherita Pizza Vegetarian Pizza Spicy Beef Pizza What? A simple pizza ontology hasTopping (Object property) hasBase (Object property) subclassOf Pizza (A class in  asserted hierarchy) Pizza Topping Vegetable topping Tomato topping Mozzarella topping Cheese topping Pizza_base Deep dish base Regular base
What? Object properties Things you can say about properties:  some ,  only ,  min ,  max  and  exactly some  means  at least one  of the toppings is a CheeseTopping only  means  all  of the toppings are CheeseTopping min ,  max  and  exactly  are self-explanatory
What? Object properties More things you can say about properties Symmetric  e.g.  touches  (or  spouse ) PizzaTopping  touches  PizzaBase implies PizzaBase  touches  PizzaTopping Transitive   e.g.  subClassOf Pizza  subClassOf  Food  CheeseyPizza  subClassOf  Pizza implies CheeseyPizza  subClassOf  Food These are important for reasoning
What? Structure of ontology Classes and properties:  Terminology  (TBox)  Instances: Assertions   (ABox) TBox is a similar to a database schema e.g. Pizza  hasBase  PizzaBase VegetarianPizza  hasTopping  Vegetables   e.t.c. Abox is similar to data (instances) in a database ThisPizza  is-an-instance-of  CajunPizza America  is-an-instance-of  Country Fred  is-an-instance-of  DogLover ABox + TBox combined called a “knowledgebase”
What? Logic and Reasoning A key feature of OWL is  reasoning (aka classification) , with a Description Logic (DL) reasoner  (a bit like a source code compiler).  There are four basic tasks a reasoner can perform: Subsumption : check that knowledge is correct Equivalence : check for minimal redundancy Consistency : check for contradictions Instantiation : is  a  an instance of  b ?  The reasoner infers new information from your  asserted class hierarchy  and builds a new  inferred class hierarchy  based on your definitions Automates classification that might otherwise be done manually
What? OWL Subsumption Check knowledge is “correct” E.g. Fiorentina should be a  subclass of VegetarianPizza? If inferred hierarchy is  inconsistent with intuition then this indicates an error (in your model)
What? OWL equivalence Similar to subsumption, a reasoner will tell you when two classes are equivalent e.g. BoringPizza  is equivalent to a  MargheritaPizza PizzaTopping  is equivalent to  PizzaBase ?
What? OWL Consistency  Consistency: check that no contradictory statements have been made:  in Protégé these are  highlighted in red Cheese  and  Vegetable  are disjoint classes (can’t be both) CheeseyVegetable  is a subclass of  Cheese CheeseyVegetable  is a subclass of  Vegetable
What? OWL instantiation Check for instances of a class E.g. Show me all the instances of  CheeseyPizza Important for querying (not covered here)
Where  does OWL fit  with related technology?
Where does OWL fit? “An ontology is a  formal representation  of a set of  concepts  within a domain and the  relationships  between those concepts. It is used to  reason  about the properties of that domain.” http://en.wikipedia.org/wiki/Ontology_(information_science)   Sounds a little bit like:  RDF and RDF Schema Relational Databases XML Schema etc? also Linked data
Where does OWL fit?  The Semantic Web: Will it all end in tiers? Unicode + URIs + namespaces RDF/XML OWL/XML e.t.c. OWL 2.0 explicit semantics syntaxes OWL builds on top of standards you already know  or have just learned about at the XML summer school SPARQL-DL To be done SPARQL Previous tutorial
Where? Relational databases Some key differences between OWL and Relational Databases (DBMS) Open World Semantics Rejecting updates Use of schema to answer queries There are more differences, see Reference [6] “Ontologies and the semantic web” at the end for more details
Where? Open World Open World Assumption: missing information is treated as  unknown  rather than  false c.f. Databases which make closed world assumption In a social networking website, missing information  (who all your friends are) is often treated as false:  e.g. “ You have NO friends ” (loser!) This is a subtle but important distinction On  http://network.nature.com/people/duncan
Where? Rejecting updates Unlike DBMS, ontology tools typically don't reject updates that result in the ontology becoming inconsistent, they just warn. You’ll see this in the exercises…
Where? Query answering In OWL, the schema plays a much more important role and is actively considered at query time (but discarded with DBMS) - this makes it possible to answer conceptual queries e.g. Pizza from  http://www.flickr.com/photos/roadsidepictures/1544645159/   Is any Pizza that  hasTopping Cheese  necessarily a  CheeseyPizza?
Where? OWL and Linked Data Use URIs to identify things that you expose to the Web as resources.  YES, everything important has a URI Use HTTP URIs so that people can locate and look up (dereference) these things.  YES, but don’t have to Provide useful information about the resource when its URI is dereferenced.  YES, but don’t have to Include links to other, related URIs in the exposed data as a means of improving information discovery on the Web.  YES, but again this is optional Returning to the linked data session… http://www.co-ode.org/ontologies/pizza/   for an example of owl and linked data
Who  is responsible for OWL?
Who? OWL is managed by a Working Group at the W3C http://www.w3.org/2007/OWL/   A large group of people chaired by :  http://web.comlab.ox.ac.uk/ian.horrocks/   http://sciencecommons.org/about/whoweare/ruttenberg/   Ian Horrocks, The University of Oxford  Alan Ruttenberg, Science Commons
Who? Every year developers and users of OWL gather at  OWLED  ( OWL   E xperiences and  D irections) 	http://www.webont.org/owled/   5th International Workshop on 23-24th October 2008, Chantilly, Virginia, USA Co-located with the 8th International Semantic Web Conference (ISWC) 25-29th October  http://iswc2009.semanticweb.org/   Washington, DC, USA.
When  was OWL created?
When? OWL 1.0 a recommendation in 2004 http://www.w3.org/2004/OWL/ http://www.w3.org/TR/owl-semantics/   OWL 2.0 a candidate recommendation in 2009 http://www.w3.org/TR/owl2-profiles/   See “OWL 2.0: The next step for OWL” in the references at the end… Compare that to XML 1.0 which was a recommendation in 1998…
When? But ontologies generally are much older than that… CC picture from http://en.wikipedia.org/wiki/File:Sanzio_01_Plato_Aristotle.jpg   A Aristotle Οντολογία Linguistics Natural Language Processing (NLP) Philosophy Data mining Text mining
How  can you use OWL?
How? Protégé  Protégé is a free, Open Source ontology editor http://protege.stanford.edu/ http: //protege . stanford .edu/download/protege/4.0/installanywhere/ Protégé research & development has been led by  Professor Mark Musen   Stanford University, USA Professor Alan Rector   University of Manchester, UK Protégé supports latest version of OWL (OWL 2.0) and  uses the OWL-API  http://owlapi.sourceforge.net/   Mark Musen Alan Rector
How? Hands-on tutorial See tutorial slides at the end Don’t worry if you can’t complete all the exercises, there is one exercise too many, just in case.
Acknowledgements John Chelsom and Lauren Wood Information Management Group (IMG) and Bio-Health Informatics Group (BHIG) at The University of Manchester: Alan Rector, Matthew Horridge, Simon Jupp, Nick Drummond, Robert Stevens, Holger Knublauch, Georgina Moulton, Chris Wroe, Ulrike Sattler, Ian Horrocks, Bijan Parsia, Sean Bechhofer, Carole Goble and many others Currently funded by  www.bbsrc.ac.uk   as part of REFINE project  www.nactem.ac.uk/refine  devised by Douglas Kell and Sophia Ananiadou substantial parts of this tutorial and slides have been developed by the  http://www.co-ode.org/  project with funding from  www.jisc.ac.uk
Any questions? Thank you for your attention
How? Protégé tutorial ex. 2 Start Protégé Click on “Open OWL Ontology” Open the exercise 2 ontology: select “pizza-ex2.owl” from the exercise folder (exercise 1 of building this ontology has been done for you to save time) Explore the “asserted class hierarchy” by clicking on the classes in the “classes” tab  Add some new subclasses by selecting MeatTopping and then pressing  “Add Subclass” button  (top left button  in asserted classes hierarchy)
How? Protégé tutorial, ex. 2 cont. Note that the MeatyVegetableTopping has been asserted to be a subclass of both Meat and Vegetable (see “Superclasses” in the “Description” pane on right hand side. Is this inconsistent?)  Click on the “Inferred class hierarchy” and note that it should be empty (apart from a single class called “Thing”) On the “Reasoner” menu, select a reasoner (there are different reasoners available but “FaCT++” is easiest to use for this exercise) Now select “Classify” from the same menu, this will run the reasoner. What is the result? Save the result, (note the different available syntaxes for saving ontologies)
How? Protégé tutorial ex. 2 cont. To make sure toppings can not be both meat and vegetable at the same time you need to add  disjoint axioms  to explicitly state the disjunction. Select one of your top level concepts (e.g. Pizza) and press ctrl-J (windows) or cmd-j (mac) to make Pizza disjoint from all its sibling classes Note that the “Description” pane lists all classes Pizza is now disjoint with (e.g PizzaBase etc) Repeat this for the MeatTopping level of the ontology Run the reasoner, is MeatyVegetableTopping now inconsistent as expected?
How? Protégé tutorial ex. 4 Exercise 3 has been skipped, close your current ontology and the solution “pizza-ex3.owl” to start ex. 4 Exercise 4 is included here for keen students (and anyone wanting to do some homework) In order to describe our classes more fully we need properties which relate members of a class. We can then add restrictions on the class to state how the properties are used. At this stage we are creating  Primitive Classes , which only have  Necessary Conditions . These are conditions that  must  be satisfied by all members of this class Select the “Object Properties” called hasTopping (this is a relation between two classes).  Back in the classes tab, create a new subClass of Pizza called NamedPizza Create a new subClass of NamedPizza called MargheritaPizza
How? Protégé ex. 4 continued Create restrictions on MargheritaPizza: In the “Description” pane under “Superclasses” click on the “+” button to add a restriction Type “hasTopping some MozzarellaTopping” (This says that it is necessary condition for a MargheritaPizza, to  have at least one Topping that is a MozzarellaTopping) Repeat this process to state that this kind of pizza also “hasTopping some TomatoTopping” Run the reasoner to check for consistency
References 1. Protégé is a free, open source ontology editor and knowledge-base framework that is available from  http://protege.standord.edu   The version you have been using in this tutorial is Protégé 4.x  2. The CO-ODE project  http://www.co-ode.org   has lots more useful material on ontologies. For example, a complete finished version of the Pizza and other ontologies are available from  http://www.co-ode.org/ontologies/   3. Matthew Horridge (2004) Protégé OWL Tutorial. This is a comprehensive guide to OWL, more complete than this tutorial and available from  http://owl.cs.manchester.ac.uk/tutorials/protegeowltutorial/   see some more examples at  http://owl.cs.manchester.ac.uk/2009/07/sssw  and software  http://owl.cs.manchester.ac.uk   4. Alan Rector, Nick Drummond, Matthew Horridge, Jeremy Rogers, Holger Knublauch, Robert Stevens, Hai Wang, Chris Wroe (2004) OWL Pizzas: Practical Experience of Teaching OWL-DL: Common Errors and Common Patterns In Proc. of European Conference on Knowledge Acquistion (EKAW'04), Vol. 3257 (2004), pp. 63-81.  http://www.co-ode.org/resources/papers/ekaw2004.pdf   gives an overview of common errors and pitfalls (with solutions) to building ontologies in OWL using pizzas as an example 5. Ian Horrocks (2003) From SHIQ and RDF to OWL: the making of a Web Ontology Language Journal of Web Semantics: Science, Services and Agents on the World Wide Web, Vol. 1, No. 1. (December 2003), pp. 7-26. (this paper gives a readable overview of the relationship between RDF and OWL with some history on the development and integration of the two languages) A free version of this paper is available from  http://www.comlab.ox.ac.uk/people/ian.horrocks/Publications/download/2003/HoPH03a.pdf   Ian Horrocks (2008) Ontologies and the semantic web. Commun. ACM, Vol. 51, No. 12, pp. 58-67.  http://www.comlab.ox.ac.uk/people/ian.horrocks/Publications/download/2008/Horr08a.pdf  gives an nice overview of the differences between OWL and relational databases  7. These and other papers relating to OWL, Ontologies and Protégé are available in citeulike tagged as “xml summer school” at  http://www.citeulike.org/tag/xml-summer-school

OWL-XML-Summer-School-09

  • 1.
    Ontologies, OWL andProt égé Duncan Hull The University of Manchester, UK http://www. manchester .ac. uk Semantic Technologies Tuesday 22nd September 2009
  • 2.
    Learning Objectives Understandsome of the Web Ontology Language (OWL) and it’s explicit semantics Learn some of the principles of modelling using Description Logic ontologies and reasoning Gain hands-on introductory experience with ontology development using Protégé-OWL tools Learn how to take advantage of inferencing capabilites to build robust, reusable models Review where OWL fits in with related technology and why you might want to use it This tutorial normally takes 1-2 days (10 exercises), we can only scratch the surface of OWL and Protégé in a 90 minute session (~2 exercises) http://bit.ly/owl-tutorial 11th/12th November, MAN Short summary of the class
  • 3.
    Course Contents Why would you want to use OWL? - The Web Ontology Language What is an OWL ontology? Where does OWL fit with related technology? - W3C standards: XML, RDF and SPARQL - Relational Databases - Linked Data Who is responsible for OWL? When was OWL created? How can you use OWL? - Tutorial Session Minor modifications to slides: http://www.slideshare.net/dullhunk
  • 4.
    Where I’m comingfrom… Trained as a Biologist Scientific, technical publishing and software engineering PhD Computer Science (OWL+Web Services) 2007 Now integrating and mining public biochemical data on the web Tamiflu ChEBI:7799 http://www.sbml.org It’s all John’s fault!
  • 5.
    Why wouldyou want to use OWL?
  • 6.
    Why? Your datais important and you’re prepared to invest resources to precisely define the meaning in a way that computers can “understand” and infer additional information Image via http://www.flickr.com/photos/dullhunk/639163558/
  • 7.
    Why would youbother doing that? 1. Semantic Integration of Big Data “ The Web is Agreement” 2. Better Search and Querying “ Google is great but…” 3. Artificial Intelligence (A.I.) “ A more knowledgeable web…” 4. Some examples… 5. Standardisation
  • 8.
    Why? No. 1Semantic Integration Big Data: Lots of scenarios involve integrating data from multiple different sources: In some cases, data integration is easier and quicker where semantics are agreed in advance (rather than cleaning it up afterwards) CC-image via http://en.wikipedia.org/wiki/File:Datawarehouse.png stuff
  • 9.
    Why? The Webis Agreement http://thewebisagreement.com/ OWL ontologies can be used to express agreement about the meaning of data on the Web Between: Human-human, human-machine, and machine-machine Paul Downey
  • 10.
    Why? No. 2Better search is great but search engines could be much better , for example: Complex queries involving background knowledge: “ Find information about animals that use sonar but are neither bats or dolphins” (answer: barn owl) Finding and using web services: “ Book me a holiday next weekend somewhere warm, not too far away and where they speak french or english” Usually impossible to do using the syntactic web search, need semantic search Image via http://en.wikipedia.org/wiki/File:Tyto_alba_close_up.jpg
  • 11.
    Why? No. 3A.I. Artificial Intelligence was/is a key motivation behind the semantic web E.g. “A new form of Web content that is meaningful to computers will unleash a revolution of new possibilities” - Tim Berners-Lee et al , Scientific American, 2001
  • 12.
    Why? no. 3:A.I. 2001: A Semantic Odyssey? Realising the complete vision is (probably) too hard for now but we can make a start… People have already started to build semantic web s (plural) rather than a monolithic semantic web, lets have a look at some of them… HAL 9000 Semantic Web? I'm sorry, Dave. I'm afraid I can't do that.
  • 13.
    Why? no. 4:Some examples: Large biomedical terminologies using OWL National Cancer Institute Thesaurus http://cancer.gov The NCI Thesaurus provides definitions, synonyms, and other information on nearly 10,000 cancers and related diseases Contains 50,000 concepts managed by up to 20 people, provides terminology for applications like the cancer image database.
  • 14.
    Why? no. 4.Some examples “ SNOMED CT® is a clinical terminology - the Systematised Nomenclature of Medicine Clinical Terms. It is a common computerised language that will be used by all computers in the NHS to facilitate communications between healthcare professionals in clear and unambiguous terms.” 373,731 classes and over 1 million terms NHS version extended to 542,380 classes Large ontology classified in < 4 hours Reasoner finds inconsistencies: e.g. 180 missing subclasses Periocular_dermatitis subClassOf Disease_of_face
  • 15.
    Why? 4. Moreexamples Pharmaceutical, biotechnology, drug discovery etc… ChEBI: Ch emical E ntities of B iological I nterest http://www.ebi.ac.uk/chebi “ freely available dictionary of ‘small’ chemical compounds” (e.g. many drugs) using OWL Currently contains ~500,000 small molecules, OWL is used to automate curation of the database and check quality
  • 16.
    Why no.5 :Standardisation There are plenty of different ontology languages: … OWL is the only one that is a W3C standard… Large and active community of developers and users around the world Choice of tools to handle OWL Interoperability etc
  • 17.
    Why? Summary Biomedicalapplications Healthcare and Life Sciences Lots of terminology Big data Gigabytes / Terabytes of data Manual curation not possible Scientific applications (W3C HCLSIG) Precision and Accuracy are important http://www.w3.org/2001/sw/hcls/ “ Biology is just naming things”
  • 18.
    What isan OWL ontology?
  • 19.
    What is anOWL ontology? “An ontology is a formal representation of a set of concepts within a domain and the relationships between those concepts. It is used to reason about the properties of that domain.” http://en.wikipedia.org/wiki/Ontology_(information_science)
  • 20.
    What? Pizza ontologyWe’re going to use Pizzas in this tutorial… We could use more realistic examples but they require a specialist knowledge of: Biochemistry Cancer Medicine etc … Whereas we are all “experts” on Pizza, Pizzas are the “Hello world” of ontologies http://www.co-ode.org/ontologies/pizza/ Pizza from http://www.flickr.com/photos/roadsidepictures/1544645159/
  • 21.
    Pizza Margherita PizzaVegetarian Pizza Spicy Beef Pizza What? A simple pizza ontology hasTopping (Object property) hasBase (Object property) subclassOf Pizza (A class in asserted hierarchy) Pizza Topping Vegetable topping Tomato topping Mozzarella topping Cheese topping Pizza_base Deep dish base Regular base
  • 22.
    What? Object propertiesThings you can say about properties: some , only , min , max and exactly some means at least one of the toppings is a CheeseTopping only means all of the toppings are CheeseTopping min , max and exactly are self-explanatory
  • 23.
    What? Object propertiesMore things you can say about properties Symmetric e.g. touches (or spouse ) PizzaTopping touches PizzaBase implies PizzaBase touches PizzaTopping Transitive e.g. subClassOf Pizza subClassOf Food CheeseyPizza subClassOf Pizza implies CheeseyPizza subClassOf Food These are important for reasoning
  • 24.
    What? Structure ofontology Classes and properties: Terminology (TBox) Instances: Assertions (ABox) TBox is a similar to a database schema e.g. Pizza hasBase PizzaBase VegetarianPizza hasTopping Vegetables e.t.c. Abox is similar to data (instances) in a database ThisPizza is-an-instance-of CajunPizza America is-an-instance-of Country Fred is-an-instance-of DogLover ABox + TBox combined called a “knowledgebase”
  • 25.
    What? Logic andReasoning A key feature of OWL is reasoning (aka classification) , with a Description Logic (DL) reasoner (a bit like a source code compiler). There are four basic tasks a reasoner can perform: Subsumption : check that knowledge is correct Equivalence : check for minimal redundancy Consistency : check for contradictions Instantiation : is a an instance of b ? The reasoner infers new information from your asserted class hierarchy and builds a new inferred class hierarchy based on your definitions Automates classification that might otherwise be done manually
  • 26.
    What? OWL SubsumptionCheck knowledge is “correct” E.g. Fiorentina should be a subclass of VegetarianPizza? If inferred hierarchy is inconsistent with intuition then this indicates an error (in your model)
  • 27.
    What? OWL equivalenceSimilar to subsumption, a reasoner will tell you when two classes are equivalent e.g. BoringPizza is equivalent to a MargheritaPizza PizzaTopping is equivalent to PizzaBase ?
  • 28.
    What? OWL Consistency Consistency: check that no contradictory statements have been made: in Protégé these are highlighted in red Cheese and Vegetable are disjoint classes (can’t be both) CheeseyVegetable is a subclass of Cheese CheeseyVegetable is a subclass of Vegetable
  • 29.
    What? OWL instantiationCheck for instances of a class E.g. Show me all the instances of CheeseyPizza Important for querying (not covered here)
  • 30.
    Where doesOWL fit with related technology?
  • 31.
    Where does OWLfit? “An ontology is a formal representation of a set of concepts within a domain and the relationships between those concepts. It is used to reason about the properties of that domain.” http://en.wikipedia.org/wiki/Ontology_(information_science) Sounds a little bit like: RDF and RDF Schema Relational Databases XML Schema etc? also Linked data
  • 32.
    Where does OWLfit? The Semantic Web: Will it all end in tiers? Unicode + URIs + namespaces RDF/XML OWL/XML e.t.c. OWL 2.0 explicit semantics syntaxes OWL builds on top of standards you already know or have just learned about at the XML summer school SPARQL-DL To be done SPARQL Previous tutorial
  • 33.
    Where? Relational databasesSome key differences between OWL and Relational Databases (DBMS) Open World Semantics Rejecting updates Use of schema to answer queries There are more differences, see Reference [6] “Ontologies and the semantic web” at the end for more details
  • 34.
    Where? Open WorldOpen World Assumption: missing information is treated as unknown rather than false c.f. Databases which make closed world assumption In a social networking website, missing information (who all your friends are) is often treated as false: e.g. “ You have NO friends ” (loser!) This is a subtle but important distinction On http://network.nature.com/people/duncan
  • 35.
    Where? Rejecting updatesUnlike DBMS, ontology tools typically don't reject updates that result in the ontology becoming inconsistent, they just warn. You’ll see this in the exercises…
  • 36.
    Where? Query answeringIn OWL, the schema plays a much more important role and is actively considered at query time (but discarded with DBMS) - this makes it possible to answer conceptual queries e.g. Pizza from http://www.flickr.com/photos/roadsidepictures/1544645159/ Is any Pizza that hasTopping Cheese necessarily a CheeseyPizza?
  • 37.
    Where? OWL andLinked Data Use URIs to identify things that you expose to the Web as resources. YES, everything important has a URI Use HTTP URIs so that people can locate and look up (dereference) these things. YES, but don’t have to Provide useful information about the resource when its URI is dereferenced. YES, but don’t have to Include links to other, related URIs in the exposed data as a means of improving information discovery on the Web. YES, but again this is optional Returning to the linked data session… http://www.co-ode.org/ontologies/pizza/ for an example of owl and linked data
  • 38.
    Who isresponsible for OWL?
  • 39.
    Who? OWL ismanaged by a Working Group at the W3C http://www.w3.org/2007/OWL/ A large group of people chaired by : http://web.comlab.ox.ac.uk/ian.horrocks/ http://sciencecommons.org/about/whoweare/ruttenberg/ Ian Horrocks, The University of Oxford Alan Ruttenberg, Science Commons
  • 40.
    Who? Every yeardevelopers and users of OWL gather at OWLED ( OWL E xperiences and D irections) http://www.webont.org/owled/ 5th International Workshop on 23-24th October 2008, Chantilly, Virginia, USA Co-located with the 8th International Semantic Web Conference (ISWC) 25-29th October http://iswc2009.semanticweb.org/ Washington, DC, USA.
  • 41.
    When wasOWL created?
  • 42.
    When? OWL 1.0a recommendation in 2004 http://www.w3.org/2004/OWL/ http://www.w3.org/TR/owl-semantics/ OWL 2.0 a candidate recommendation in 2009 http://www.w3.org/TR/owl2-profiles/ See “OWL 2.0: The next step for OWL” in the references at the end… Compare that to XML 1.0 which was a recommendation in 1998…
  • 43.
    When? But ontologiesgenerally are much older than that… CC picture from http://en.wikipedia.org/wiki/File:Sanzio_01_Plato_Aristotle.jpg A Aristotle Οντολογία Linguistics Natural Language Processing (NLP) Philosophy Data mining Text mining
  • 44.
    How canyou use OWL?
  • 45.
    How? Protégé Protégé is a free, Open Source ontology editor http://protege.stanford.edu/ http: //protege . stanford .edu/download/protege/4.0/installanywhere/ Protégé research & development has been led by Professor Mark Musen Stanford University, USA Professor Alan Rector University of Manchester, UK Protégé supports latest version of OWL (OWL 2.0) and uses the OWL-API http://owlapi.sourceforge.net/ Mark Musen Alan Rector
  • 46.
    How? Hands-on tutorialSee tutorial slides at the end Don’t worry if you can’t complete all the exercises, there is one exercise too many, just in case.
  • 47.
    Acknowledgements John Chelsomand Lauren Wood Information Management Group (IMG) and Bio-Health Informatics Group (BHIG) at The University of Manchester: Alan Rector, Matthew Horridge, Simon Jupp, Nick Drummond, Robert Stevens, Holger Knublauch, Georgina Moulton, Chris Wroe, Ulrike Sattler, Ian Horrocks, Bijan Parsia, Sean Bechhofer, Carole Goble and many others Currently funded by www.bbsrc.ac.uk as part of REFINE project www.nactem.ac.uk/refine devised by Douglas Kell and Sophia Ananiadou substantial parts of this tutorial and slides have been developed by the http://www.co-ode.org/ project with funding from www.jisc.ac.uk
  • 48.
    Any questions? Thankyou for your attention
  • 49.
    How? Protégé tutorialex. 2 Start Protégé Click on “Open OWL Ontology” Open the exercise 2 ontology: select “pizza-ex2.owl” from the exercise folder (exercise 1 of building this ontology has been done for you to save time) Explore the “asserted class hierarchy” by clicking on the classes in the “classes” tab Add some new subclasses by selecting MeatTopping and then pressing “Add Subclass” button (top left button in asserted classes hierarchy)
  • 50.
    How? Protégé tutorial,ex. 2 cont. Note that the MeatyVegetableTopping has been asserted to be a subclass of both Meat and Vegetable (see “Superclasses” in the “Description” pane on right hand side. Is this inconsistent?) Click on the “Inferred class hierarchy” and note that it should be empty (apart from a single class called “Thing”) On the “Reasoner” menu, select a reasoner (there are different reasoners available but “FaCT++” is easiest to use for this exercise) Now select “Classify” from the same menu, this will run the reasoner. What is the result? Save the result, (note the different available syntaxes for saving ontologies)
  • 51.
    How? Protégé tutorialex. 2 cont. To make sure toppings can not be both meat and vegetable at the same time you need to add disjoint axioms to explicitly state the disjunction. Select one of your top level concepts (e.g. Pizza) and press ctrl-J (windows) or cmd-j (mac) to make Pizza disjoint from all its sibling classes Note that the “Description” pane lists all classes Pizza is now disjoint with (e.g PizzaBase etc) Repeat this for the MeatTopping level of the ontology Run the reasoner, is MeatyVegetableTopping now inconsistent as expected?
  • 52.
    How? Protégé tutorialex. 4 Exercise 3 has been skipped, close your current ontology and the solution “pizza-ex3.owl” to start ex. 4 Exercise 4 is included here for keen students (and anyone wanting to do some homework) In order to describe our classes more fully we need properties which relate members of a class. We can then add restrictions on the class to state how the properties are used. At this stage we are creating Primitive Classes , which only have Necessary Conditions . These are conditions that must be satisfied by all members of this class Select the “Object Properties” called hasTopping (this is a relation between two classes). Back in the classes tab, create a new subClass of Pizza called NamedPizza Create a new subClass of NamedPizza called MargheritaPizza
  • 53.
    How? Protégé ex.4 continued Create restrictions on MargheritaPizza: In the “Description” pane under “Superclasses” click on the “+” button to add a restriction Type “hasTopping some MozzarellaTopping” (This says that it is necessary condition for a MargheritaPizza, to have at least one Topping that is a MozzarellaTopping) Repeat this process to state that this kind of pizza also “hasTopping some TomatoTopping” Run the reasoner to check for consistency
  • 54.
    References 1. Protégéis a free, open source ontology editor and knowledge-base framework that is available from http://protege.standord.edu The version you have been using in this tutorial is Protégé 4.x 2. The CO-ODE project http://www.co-ode.org has lots more useful material on ontologies. For example, a complete finished version of the Pizza and other ontologies are available from http://www.co-ode.org/ontologies/ 3. Matthew Horridge (2004) Protégé OWL Tutorial. This is a comprehensive guide to OWL, more complete than this tutorial and available from http://owl.cs.manchester.ac.uk/tutorials/protegeowltutorial/ see some more examples at http://owl.cs.manchester.ac.uk/2009/07/sssw and software http://owl.cs.manchester.ac.uk 4. Alan Rector, Nick Drummond, Matthew Horridge, Jeremy Rogers, Holger Knublauch, Robert Stevens, Hai Wang, Chris Wroe (2004) OWL Pizzas: Practical Experience of Teaching OWL-DL: Common Errors and Common Patterns In Proc. of European Conference on Knowledge Acquistion (EKAW'04), Vol. 3257 (2004), pp. 63-81. http://www.co-ode.org/resources/papers/ekaw2004.pdf gives an overview of common errors and pitfalls (with solutions) to building ontologies in OWL using pizzas as an example 5. Ian Horrocks (2003) From SHIQ and RDF to OWL: the making of a Web Ontology Language Journal of Web Semantics: Science, Services and Agents on the World Wide Web, Vol. 1, No. 1. (December 2003), pp. 7-26. (this paper gives a readable overview of the relationship between RDF and OWL with some history on the development and integration of the two languages) A free version of this paper is available from http://www.comlab.ox.ac.uk/people/ian.horrocks/Publications/download/2003/HoPH03a.pdf Ian Horrocks (2008) Ontologies and the semantic web. Commun. ACM, Vol. 51, No. 12, pp. 58-67. http://www.comlab.ox.ac.uk/people/ian.horrocks/Publications/download/2008/Horr08a.pdf gives an nice overview of the differences between OWL and relational databases 7. These and other papers relating to OWL, Ontologies and Protégé are available in citeulike tagged as “xml summer school” at http://www.citeulike.org/tag/xml-summer-school