You are on page 1of 199

A Practical

Introduction to
Ontologies & OWL
In association with:

The CO-ODE and HyOntUse projects


(www.co-ode.org)

Protégé
(protege.stanford.edu)

Advanced Knowledge Technologies


(www.aktors.org)

NorthWest Institute for Bio-Health Informatics


(www.nibhi.man.ac.uk)

funded by:
Semantic Mining Network of Excellence
http://www.semanticmining.org

The Joint Information Systems Council


(www.jisc.ac.uk)

The Engineering and Physical Sciences Research Council


(www.epsrc.ac.uk)
Info
Document version v.4

Document date 5th July 2005

Nick Drummond
Compiled By
www.cs.man.ac.uk/~drummond/

All materials (this document, slides,


www.co-ode.org/resources/tutorials/intro/
exercises) available at

Tutorial details available at www.co-ode.org/events/tutorials/escience02/

Copyright
Material published by The University of Manchester for this event is copyright The
University of Manchester and may not be reproduced without permission. Copyright exists
in all other original material published by staff of The University of Manchester and may
belong to the author or to The University of Manchester depending on the circumstances
of publication.

All Material © 2005, The University of Manchester


Contents

Introduction 5

Program 6
Day 1 6
Day 2 7

Course Slides 8
Introduction to Ontologies 8
OWL Overview 24
Hands On: Protégé-OWL part 1 44
Knowledge Acquisition 73
Ontology Engineering 83
Hands On: Protégé-OWL part 2 100
Formal Modelling Issues 119
Ontology Applications 140
COHSE 150
Instance Store 163
Intelligent Curation Using Ontologies 163
Discussion Topics 178

Appendices 179
Appendix A: Terminology 180
Appendix B: Syntax 181
Appendix C: Resources 183
Appendix D: Application Overviews 184
Manchester Pizza Finder overview 184
COHSE overview 185
Instance Store overview 186
Intelligent Curation through ontologies 187
Appendix E: Hands On: Protégé-OWL part 3 188

Acknowledgements 199
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Introduction
The University of Manchester, Bio-Health Informatics and Information Management Group
together with Advanced Knowledge Technologies (AKT) from Southampton University
welcome you to this two day tutorial and workshop.

With several years experience in teaching OWL and its predecessors to various audiences,
we are now providing a program that will take steps through ontology principles,
knowledge acquisition and modelling, quality, right through to the beginnings of ontology
driven applications.

The major goal of this tutorial is to provide the attendees with both the theoretical
foundations of ontology design and hands-on experience in the construction of ontologies
as well as an understanding of how this technology can be applied to various problem
domains. In particular, attendees will:

• Learn the basic principles of OWL based ontologies using styles developed at
Manchester and in the Semantic Web Best Practice Working Party
• Gain hands-on experience with ontology development using the Protégé-OWL tools
• Learn how to use the expressive power of OWL and to take advantage of its
inferencing capabilities to build robust, reusable models
• Learn several knowledge acquisition techniques and use them to model a subject
domain
• Be introduced to the skills needed to participate in the growing community of
users/developers of OWL
• Be exposed to real examples of ontology driven applications, and understand some
of the architectures that may be employed to solve domain problems

5
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Program: Day 1
10:00 Registration & Coffee

10:30 Participants Introductions

10:45 Introduction to Ontologies

Alan Rector

• Motivation
• Simple Ontology Application examples

11:30 Break

11:45 OWL overview

Matthew Horridge

• "Ontology" Languages
• Ontology Paradigms
• OWL Constructs

12:30 Lunch

13:30 Hands On: Protégé-OWL tutorial part 1

Nick Drummond, Matthew Horridge

• Tool overview
• Constructing a taxonomy
• Disjointness & Introduction to the Reasoner
• Primitive Classes
• Conditions & Restrictions

15:45 Break

16:00 Ontology Engineering

Jeremy Rogers

• How to start
• Naming & Metadata
• Issues of Scope and Complexity

16:30 Discussion and Q&A

17:00 Finish

6
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Program: Day 2
09:00 Coffee

09:30 Knowledge Acquisition

Robert Stevens

• Ontology Lifecycle
• Elicitation Techniques
• Laddering

10:00 Hands On: Protégé-OWL tutorial part 2

Nick Drummond, Matthew Horridge

10:45 • Defined Classes


break • Using the reasoner to build more complex hierarchies
• Class Expressions
• Open World Assumption

12:00 Formal Modelling Practice

Alan Rector

• Why Classify?
• Untangling Ontologies

12:45 Lunch

13:45 Ontology Applications

Sean Bechhofer, Daniele Turi, Matthew Horridge

• General themes / Architectures


• Case Study: COHSE
• Case Study: OWL Instance Store
• Simple Example: Pizza Finder application architecture

14:45 Break

15:00 Discussion and Q&A

• Suggested Topics
• Course Feedback

15:30 Finish for those that need to leave - Open discussion for those that wish to stay.

7
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Introduction
Alan Rector

8
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

A Practical
Introduction to
Ontologies & OWL
Alan Rector

O p enG A LEN

BioHealth
Informatics
Group 1 Copyright © 2005 Univ. of Manchester

Speakers
►Alan Rector – Medical Informatics
►Robert Stevens - BioInformatics
►Sean Bechhofer – OntoGrid, COHSE
►Matthew Horridge – CO-ODE
►Nick Drummond – CO-ODE
►Jeremy Rogers - OpenGALEN
►Daniele Turi – IMG, Instance Store
►Katy Wolstencroft – Phosphabase, mygrid

2 Copyright © 2005 Univ. of Manchester

9
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Overview (day 1)

►Introduction and Motivation


►plus example app

►OWL Language Overview


►The Web Ontology Language and constructs

►Hands On: Protégé-OWL 1


►Constructing a taxonomy and introduction to reasoning

►Knowledge acquisition
►Elicitation methodologies

►Q&A

3 Copyright © 2005 Univ. of Manchester

Overview (day 2)
►Ontology Engineering
►Hands On: Protégé-OWL 2
►Using a reasoner for computing a classification

►Formal Modelling Issues


►Why classify?
►Untangling

►Applications
►Architecture and case studies

►Q&A, Open Discussion


►Feedback

4 Copyright © 2005 Univ. of Manchester

10
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

The Car

5 Copyright © 2005 Univ. of Manchester

The Car

Automobile

Voiture
Coche

Araba

6 Copyright © 2005 Univ. of Manchester

11
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Hard Work using the


Syntactic Web…
Find images of Peter Patel-Schneider, Frank van
Harmelen and Alan Rector…

Rev. Alan M.
Gates,
Associate
Rector of the
Church of the
Holy Spirit, Lake
Forest, Illinois

7 Copyright © 2005 Univ. of Manchester

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
► Results of human genome experiments

► Finding and using “web services”


► Visualise surface interactions between two proteins

► Delegating complex tasks to web “agents”


► Book me a holiday next weekend somewhere warm, not too far
away, and where they speak French or English

8 Copyright © 2005 Univ. of Manchester

12
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

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…

9 Copyright © 2005 Univ. of Manchester

What information can we


see…
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 7th 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 …

10 Copyright © 2005 Univ. of Manchester

13
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

What information can a


machine see…

11 Copyright © 2005 Univ. of Manchester

Solution: XML markup with


“meaningful” tags?
<name>
</name>
<location>
</location>
<date> </date>
<slogan> </slogan>
<participants>

</participants>
< introduction>

</introduction>
<speaker> </speaker>
<bio> </ bio>…
12 Copyright © 2005 Univ. of Manchester

14
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

But What About…

<conf>
</conf>
<place>
</place>
<date> </date>
<slogan> </slogan>
<participants>

</participants>
<introduction>
</introduction>
<speaker> </speaker>
<bio> …

13 Copyright © 2005 Univ. of Manchester

Machine sees…

< >
</ >
< >
</ >
< > </ >
< > </ >
< >

</ >
< >

</ >
< > </ >
< > </ >
< > </ >
< > </ >

14 Copyright © 2005 Univ. of Manchester

15
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Need to Add “Semantics”

► External agreement on meaning of annotations


► E.g., Dublin Core
►Agree on the meaning of a set of annotation tags
► Problems with this approach
►Inflexible
►Limited number of things can be expressed

► 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 formally specified
► Can also specify relationships between terms in multiple
ontologies

15 Copyright © 2005 Univ. of Manchester

Ontology: Origins and


History
Ontology in Philosophy
a philosophical discipline—a branch of philosophy that
deals with the nature and the organisation of reality

► Science of Being (Aristotle, Metaphysics, IV, 1)

► Tries to answer the questions:

What characterizes being?

Eventually, what is being?

16 Copyright © 2005 Univ. of Manchester

16
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontology in Linguistics

Concept

Relates to
activates

Form Referent
Stands for

“Tank“
[Ogden, Richards, 1923]
?
17 Copyright © 2005 Univ. of Manchester

Ontology in Computer
Science
► An ontology is an engineering artifact:
► It is constituted by a specific vocabulary used to describe a certain
reality, plus
► a set of explicit assumptions regarding the intended meaning of the
vocabulary.

► Thus, an ontology describes a formal specification of a certain


domain:
► Shared understanding of a domain of interest
► Frmal and machine manipulable model of a domain of interest

“An explicit specification of a conceptualisation” [Gruber93]

18 Copyright © 2005 Univ. of Manchester

17
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Structure of an Ontology

Ontologies typically have two distinct components:


► 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 greater than 20 years
► Background knowledge/constraints on the domain
► 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

19 Copyright © 2005 Univ. of Manchester

[Mike Uschold, Boeing Corp]

A semantic continuum

Pump: “a device for (pump has


moving a gas or liquid (superclasses (…))
from one place or
container to another”
Shared Semantics Semantics
human Text hardwired; processed and
consensus descriptions used at runtime used at runtime

Implicit Informal Formal Formal


(explicit) (for humans) (for machines)

Further to the right


• Less ambiguity
• Better inter-operation
• More robust – less hardwiring
• More difficult
20 Copyright © 2005 Univ. of Manchester

18
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

A simple ontology: Pizzas

Pizza Pizza
Topping Pizza_base

Vegetarian Vegetable Deep


Pizza topping dish base
Cheese
topping Regular
Margherita Tomato
topping base
Pizza
Spicy Beef Mozzarella
Pizza topping
21 Copyright © 2005 Univ. of Manchester

Ontology Design and


Deployment
► Given key role of ontologies in the Semantic Web,
it will be essential to provide tools and services to
help users:
► Design and maintain high quality ontologies, e.g.:
►Meaningful — all named classes can have instances
►Correct — captured intuitions of domain experts
►Minimally redundant — no unintended synonyms
►Richly axiomatised — (sufficiently) detailed descriptions
► Store (large numbers) of instances of ontology classes, e.g.:
Annotations from web pages
► Answer queries over ontology classes and instances, e.g.:
►Find more general/specific classes
►Retrieve annotations/pages matching a given description
► Integrate and align multiple ontologies

22 Copyright © 2005 Univ. of Manchester

19
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Example Ontology

23 Copyright © 2005 Univ. of Manchester

Many languages use “object


oriented” model based on:
► Objects/Instances/Individuals
► Elements of the domain of discourse
► Equivalent to constants in FOL
► Types/Classes/Concepts
► Sets of objects sharing certain characteristics
► Equivalent to unary predicates in FOL
► Relations/Properties/Roles
► Sets of pairs (tuples) of objects
► Equivalent to binary predicates in FOL
► Such languages are/can be:
► Well understood
► Formally specified
► (Relatively) easy to use
► Amenable to machine processing
24 Copyright © 2005 Univ. of Manchester

20
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Aside: Set Based Model Theory


Many logics (including standard First Order Logic) use a model theory based on
Zermelo-Frankel set theory
The domain of discourse (i.e., the part of the world being modelled) is
represented as a set (often refered as ∆)
Objects in the world are interpreted as elements of ∆
Classes/concepts (unary predicates) are subsets of ∆
Properties/roles (binary predicates) are subsets of ∆ £ ∆ (i.e., ∆2)
Ternary predicates are subsets of ∆2 etc.
The sub-class relationship between classes can be interpreted as set inclusion
Doesn’t work for RDF, because in RDF a class (set) can be a member (element)
of another class (set)
In Z-F set theory, elements of classes are atomic (no structure)

25 Copyright © 2005 Univ. of Manchester

Why it’s hard (1)

► Clash of intuitions
► Subject Matter Experts motivated by custom & practice
►Prototypes & Generalities
► Logicians motivated by logic & computational tractability
►Definitions and Universals

► Transparency & predictability vs


Rigour & Completeness
► Neophytes (you?) caught in the muddled middle

26 Copyright © 2005 Univ. of Manchester

21
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Why it’s hard (2)

► Conflation of Models
► Meaning: Correctness of Classification & retrieval
► Indexing: Task of discovery, search, or finding
► Use: Task of data entry, decision support, …
► Acquisition: Task of capturing knowledge

► Assuring quality & managing change


► Quality assurance: Criteria for whether it is ‘correct’
► Evolution Coping with change
► Regression testing Controlling changes & maintaining
Quality

27 Copyright © 2005 Univ. of Manchester

Why its hard (3)

► Confusion of terminology and usage


► Religious wars over words and assumptions

► The intersection of
► Linguistics
► Cognitive science
► Software engineering
► Philosophy
► Human Factors

► A jumble of syntaxes

28 Copyright © 2005 Univ. of Manchester

22
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Vocabulary

► “Class” ≈ “Concept” ≈ “Category” ≈ “Type”


► “Instance” ≈ “Individual”
► “Entity” ≈ “object”, Class or individual
► “Property” ≈ “Slot” ≈ “Relation” ≈ “Relationtype” ≈
“Attribute” ≈ Semantic link type” ≈ “Role”
► but be careful about “role”
►Means “property” in DL-speak
►Means “role played” in most ontologies
►E.g. “doctor_role”, “student role” …

29 Copyright © 2005 Univ. of Manchester

An Ontology should be just


the Beginning
Declare Databases
Ontologies structure

Knowledge
bases
The
Provide
domain “Semantic
description Web”

Software
agents Problem-
solving
methods Domain-
independent
applications
30 Copyright © 2005 Univ. of Manchester

23
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

OWL Overview
Matthew Horridge

24
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

An Introduction to RDF(S) and a Quick


Tour of OWL

BioHealth
Open GALEN Informatics
Group

1 Ontology Tutorial

Ontology

- Borrowed from philosophy - the study of “The nature of


being”

- “A specification of a conceptualisation” [Gruber]

- In general, an ontology provides a mechanism to


capture information about the objects and the
relationships that hold between them in some domain
of interest.

2 Ontology Tutorial

25
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

RDF - Resource Description


Framework
- RDF is a graphical language used for representing
information about resources on the web. It is a basic
ontology language.

- Resources are described in terms of properties and


property values using RDF statements.

- Statements are represented as triples, consisting of a


subject, predicate and object. [S, P, O]

3 Ontology Tutorial

RDF Example

hasColleague
Nick Matthew

- Subject: Nick

- Predicate: hasColleague

- Object: Matthew

4 Ontology Tutorial

26
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Naming Resources In RDF

- RDF uses URIs - Unique Resource Identifiers to


identify resources.

Actually, to be more precise RDF uses URIRefs to identify


resources.

A URIRef consists of a URI and an optional Fragment


Identifier separated from the URI by the hash symbol #.

http://www.co-ode.org/people#hasColleague
coode:hasColleague

5 Ontology Tutorial

Vocabularies
- A set of URIRefs is known as a vocabulary

- The RDF Vocabulary - The set of URIRefs used in


descibing the RDF concepts e.g. rdf:Property,
rdf:Resource, rdf:type.

- The RDFS Vocabulary - The set of URIRefs used in


describing the RDF Schema langauge e.g.
rdfs:Class, rdfs:domain

- The ‘Pizza Ontology’ Vocabulary - pz:hasTopping,


pz:Pizza, pz:VegetarianPizza

6 Ontology Tutorial

27
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Linking Statements

- The subject of one statement may be the object of


another statement.

- A set of linked statements (triples) forms an RDF


Graph.

7 Ontology Tutorial

An RDF Graph Example

"Matthew Horridge"

http://www.co-ode.org/people#hasName

http://www.co-ode.org/people#mh

http://www.co-ode.org/people#hasColleague

http://www.co-ode.org/people#hasHomePage

http://www.co-ode.org/people#nd

http://www.cs.man.ac.uk/~horridgm
http://www.co-ode.org/people#hasName

"Nick Drummond"

8 Ontology Tutorial

28
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

RDF Serialisation
RDF/XML
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:coode="http://www.co-ode.org/people#"
xml:base="http://www.co-ode.org/people">
<rdf:Description rdf:ID="mh">
<coode:hasHomepage rdf:resource="http://www.cs.man.ac.uk/~horridgm"/>
<coode:hasName>Matthew Horridge</coode:hasName>
</rdf:Description>
<rdf:Description rdf:ID="nd">
<coode:hasName>Nick Drummond</coode:hasName>
<coode:hasColleage rdf:resource="#mh"/>
</rdf:Description>
</rdf:RDF>

<?xml version="1.0"?>
<rdf:RDF
xmlns:coode="http://www.co-ode.org/people#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xml:base="file:/Users/matthewhorridge/Desktop/Test.rdf">
<rdf:Description rdf:about="http://www.co-ode.org/people#nd">
<coode:hasName>Nick Drummond</coode:hasName>
<coode:hasColleage>
<rdf:Description rdf:about="http://www.co-ode.org/people#mh">
<coode:hasName>Matthew Horridge</coode:hasName>
<coode:hasHomepage rdf:resource="http://www.cs.man.ac.uk/~horridgm"/>
</rdf:Description>
</coode:hasColleage>
</rdf:Description>
</rdf:RDF>
9 Ontology Tutorial

Editing RDF(S)

- IsaViz RDF Editor

- Protege-OWL in RDF(S) mode


<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns="http://www.owl-ontologies.com/unnamed.owl#"
xml:base="http://www.owl-ontologies.com/unnamed.rdf">
<rdfs:Class rdf:ID="Person"/>
<rdf:Property rdf:ID="hasFather"/>
<Person rdf:ID="Matthew">
<hasFather>
<?xml version="1.0"?>
<Person rdf:ID="Peter"/>
<rdf:RDF
</hasFather>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
</Person>
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
</rdf:RDF>
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns="http://www.owl-ontologies.com/unnamed.owl#"
xml:base="http://www.owl-ontologies.com/unnamed.rdf">
<rdfs:Class rdf:ID="Person"/>
<rdf:Property rdf:ID="hasFather"/>
<Person rdf:ID="Matthew">
<hasFather>
<Person rdf:ID="Peter"/>
</hasFather>
</Person>
10
</rdf:RDF> Ontology Tutorial

29
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

RDF Schema (RDFS) - The RDF


Vocabulary Description Language

- RDF Schema ‘semantically extends’ RDF to enable us


to talk about classes of resources, and the properties
that will be used with them.

- It does this by giving special meaning to certain rdf


properties and resources.

- RDF Schema provides the means to describe


application specific RDF vocabularies.

11 Ontology Tutorial

Describing Classes with RDFS


- To describe classes we can use built in RDF Schema
resources:

- rdfs:Class

- rdfs:subClassOf

- These are used in conjunction with the rdf:type


property.
rdfs:subClassOf coode:Person

coode:Man
rdf:type rdf:type
rdfs:Class

coode:Matthew

12 Ontology Tutorial

30
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Describing Properties with RDF(S)


- RDF Schema allows us to describe properties.
(Properties are instances of the class rdf:Property!)

- We can specify a domain using rdfs:domain.

- We can specify a range using rdfs:range.

coode:Person

rdf:type
rdfs:Class

rdf:Property rdfs:domain
rdfs:range

rdf:type
coode:hasColleage

13 Ontology Tutorial

Other RDFS Built-In Properties

- rdfs:subPropertyOf

- rdfs:comment

- rdfs:label

- rdfs:seeAlso

- rdfs:isDefinedBy

14 Ontology Tutorial

31
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

RDF(S) Summary

- RDF - The Resource Description Framework allows us


to describe resources by specifying their properties and
property values.

- RDF Statements are triples of the form [Subject,


Predicate, Object]

- A set of RDF triples forms an RDF Graph

- RDF Schema semantically extends RDF by providing a


means to describe RDF Vocabularies.

15 Ontology Tutorial

RDF(S) Summary

- RDF and RDF Schema provide basic capabilities for


describing vocabularies that describe resources.

However, certain other capabilities are desirable e.g.:

Cardinality constraints, specifying that properties are


transitive, specifying inverse properties, specifying the
‘local’ range and/or cardinality for property when used
with a given class, the ability to describe new classes by
combining existing classes (using intersections and
unions), negation (using ‘not’).

16 Ontology Tutorial

32
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

OWL

- Latest standard in ontology languages from the World


Wide Web Consortium (W3C).

- Built on top of RDF (OWL semantically extends RDF


(S)), and based on its predecessor language DAML
+OIL.

- OWL has a rich set of modelling constructors.

- Three ‘species’: OWL-Lite, OWL-DL and OWL-Full.

17 Ontology Tutorial

The “Layer Cake”

4RUST

0ROOF
$IGITAL3IGNATURE

,OGIC

/NTOLOGY6OCABULARY

2$& 2$&3CHEMA

8-, .3 8-,3CHEMA

5NICODE 52)

18 Ontology Tutorial

33
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Components of an OWL Ontology

- Individuals
Italy
Nick England

hasColl
- Properties
u ntr
y USA

ea
Co
s In

gu
- Classes live

e
Country
Matthew h as
Pe
t

Pet
Person Fluffy
Fido

19 Ontology Tutorial

Reasoning

- For ontologies that fall into the scope of OWL-DL, we


can use a reasoner to infer information that isn’t
explicitly represented in an ontology. Standard
‘reasoning services’ are:

- Subsumption testing

- Equivalence testing

- Consistency testing

- Instantiation testing

20 Ontology Tutorial

34
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

The Three Species of OWL

- OWL-Full - No restrictions on how/where language


constructs can be used. The union of OWL and RDF
(S). OWL-Full is not decidable.

- OWL-DL - Restricted version of OWL-Full.


Corresponds to a description logic. Certain restrictions
on how/where language constructs can be used in
order to guarantee decidability.

- OWL-Lite - A subset of OWL-DL. The simplest and


easiest to implement of the three species.

21 Ontology Tutorial

OWL Classes

- OWL is an ontology language that is primarily designed


to describe and define classes. Classes are therefore
the basic building blocks of an OWL ontology.

- OWL supports six main ways of describing classes -


The simplest of these is a Named Class. The other
types are: Intersection classes, Union classes,
Complement classes, Restrictions, Enumerated
classes.

22 Ontology Tutorial

35
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Named Classes

Professor
Person

23 Ontology Tutorial

Intersection Classes

- Intersection Classes are formed by combining two or


more classes with the intersection (AND) operator.

In description logics (and in


Protege-OWL) we use the
intersection symbol !)
Human ! Female

Human Female

24 Ontology Tutorial

36
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Union Classes

- Union Classes are formed using the union (OR)


operator with two or more classes.

In description logics (and in


Protege-OWL) we use the
union symbol "

JavaProgrammer " CProgrammer

JavaProgrammer CProgrammer
25 Ontology Tutorial

Complement Classes

- A complement class is specified by negating another


class. It will contain the individuals that are not in the
negated class.
In Description Logics
(and in Protege-OWL)
the negation symbol ¬
is used.

¬ Professor ! Woman

Woman Professor
26 Ontology Tutorial

37
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Restrictions

- Restrictions describe a class of individuals based on


the type and possibly number of relationships that they
participate in.

- Restrictions can be grouped into three main categories:

- Quantifier Restrictions (Existential , Universal )

- Cardinality Restrictions (Min !, Equal =, Max ")

- Has Value Restriction (#)

27 Ontology Tutorial

Existential Restrictions

- The most common type of restriction we will use is an


existential restriction, which has the symbol
(backwards E).

- The existential restriction means ‘some values from’, or


at least one.

- An existential restriction describes the class of


individuals that have at least one kind of relationship
along a specified property to an individual that is a
member of a specified class.

28 Ontology Tutorial

38
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Existential Restrictions

hasColleague

hasColleague

has
Co lleag
ue

hasC
olleague

hasColleague Lecturer Lecturer

29 Ontology Tutorial

Universal Restrictions

- Universal - (upside down A) all values from , or


only. For a given property, all the individuals
must be members of a specified class.

30 Ontology Tutorial

39
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Universal Restrictions

UE
EAG
#O LL
AS

H
! hasColleague

has
Co lleag
ue

hasC
olleague

hasColleague Professor Professor

31 Ontology Tutorial

Other Restrictions
- Cardinality Restrictions - For a given property,
cardinality restrictions allow us to talk about the number
of relationships that a class of individuals participate in.

- Has Value Restrictions - Allow us to specify that class


of individuals that participate in a specified relationship
with a specific individual.

32 Ontology Tutorial

40
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

hasValue Restriction Example

HAS#OLLEAGUE

HAS#OLL
EAGUE

E
HAS#OLLEAGU

hasColleague # Matthew Person

33 Ontology Tutorial

Enumeration Classes

- An enumeration class is specified by explicitly and


exhaustively listing the individuals that are members of
the enumeration class.
To specify an enumerated
3PAIN class, the individuals that are
members of the class are listed
'ERMANY
inside curly brackets {...}
&RANCE
)TALY
{Spain Germany France Italy}

HolidayDestinations

34 Ontology Tutorial

41
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Properties

- There are two main categories of properties: Object


properties and datatype properties.

- Object properties link individuals to individuals.

- Datatype properties link individuals to datatype values


(e.g. integers, floats, strings).

- Object properties my have an inverse property e.g. the


inverse of worksFor might be employs.

- Properties can have as specified domain and range.

35 Ontology Tutorial

Property Characteristics
- We can specify certain property characteristics.

- Functional - For a given individual, the property


takes only one value.

- Inverse functional - The inverse of the property is


functional.

- Symmetric - If a property links A to B then it can be


inferred that it links B to A.

- Transitive - If a property links A to B and B to C then


it can be inferred that it links A to C.

36 Ontology Tutorial

42
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

OWL Summary
- OWL is the latest standard in ontology languages.

- It is layered on top of RDF and RDFS, and has a rich


set of constructs.

- There are three species of OWL: OWL-Lite, OWL-DL


and OWL-Full.

- We can perform automated reasoning over ontologies


that are written in OWL-Lite and OWL-DL.

37 Ontology Tutorial

More Information

- W3C OWL Web Site

- http://www.w3.org/2004/OWL/

- CO-ODE Web Site

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

- Protege-OWL Web Site

- http://protege.stanford.edu/plugins/owl

38 Ontology Tutorial

43
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Protégé-OWL part 1
Nick Drummond
Matthew Horridge

44
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

A Practical Introduction to
Ontologies & OWL
Session 1: Primitive Classes in OWL

Nick Drummond & Matthew Horridge

O p enG A LEN

BioHealth
Informatics
Group

Overview

► Pizzas – Card Sorting


► Protégé Introduction
► Subsumption
► Creating a Class Hierarchy
► Consistency
► Disjointness
► Relationships & Properties
► Restrictions
► Polyhierarchies - Issues

Copyright © 2005, The University of Manchester

45
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Our Domain

► Pizzas have been used in Manchester tutorials for


years.
► Pizzas were selected as a domain for several reasons:
► They are fun
► They are internationally known
► They are highly compositional
► They have a natural limit to their scope
► They are fairly neutral
► Although arguments still break out over representation
► Even pizzas can do this - its an inevitable part of knowledge modelling
► ARGUING IS NOT BAD!

Copyright © 2005, The University of Manchester

You are the Expert

► Most often it is not the domain expert that formalises


their knowledge – because of the complexity of the
modelling 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…

Copyright © 2005, The University of Manchester

46
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Reference Materials

► Having references to validate decisions, and act as


provenance can be useful for maintaining an ontology
► Mistakes, omissions and intentions can be more easily
traced if a reference can be made
► When building, we highly recommend documenting your model as you go –
keeping provenance information is a good way of doing this

► We have provided you with a pizza menu and several


cards with ingredients on

Copyright © 2005, The University of Manchester

Our Ontology

► When building an ontology we need an application in mind –


ontologies should not be built for the sake of it
► Keep the application in mind when creating concepts – this
should help you scope the project

► The PizzaFinder application has been developed so that you can


plug your ontology in at the end of the day and see it in action

Let us know your ideas for extending the application

Copyright © 2005, The University of Manchester

47
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Our Application

www.co-ode.org/downloads/pizzafinder/
Copyright © 2005, The University of Manchester

Exercise 1: Card Sorting

Copyright © 2005, The University of Manchester

48
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Card Sorting - Issues

► different viewpoints
► Tomato – Vegetable or Fruit?
► culinary vs biological

► Ambiguity
► words not concepts
► Missing Knowledge
► What is peperonata?
► multiple classifications (2+ parents)
► lots of missing categories (superclasses?)
► competency questions
► What are we likely to want to “ask” our ontology?
► bear the application in mind

Copyright © 2005, The University of Manchester

OWL Constructs

_in
Person lives Country
Elvis Belgium
Holger lives_in
Paraguay
Kylie
Class (concept)
Latvia
S.Claus China
Hai
lives_in
Individual (instance)
ha
s_
pe
ha

et

arrow = relationship
s_

Flipper
has_p
pe
t

label = Property
Animal
Rudolph

Copyright © 2005, The University of Manchester

49
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

OWL Constructs:
Classes
Eg Mammal, Tree, Person, Building, Fluid, Company
► Classes are sets of Individuals
► aka “Type”, “Concept”, “Category”
► Membership of a Class is dependent on its logical description, not its
name
► Classes do not have to be named – they can be logical expressions – eg
things that have colour Blue
► A Class should be described such that it is possible for it to contain
Individuals (unless the intention is to represent the empty class)
► Classes that cannot possibly contain any Individuals are said to be
inconsistent

Copyright © 2005, The University of Manchester

OWL Constructs:
Properties
Eg hasPart, isInhabitedBy, isNextTo, occursBefore
► Properties are used to relate Individuals
► We often say that Individuals are related along a given property
► Relationships in OWL are binary:
Subject Æ predicate Æ Object
Individual a Æ hasProperty Æ Individual b
nick_drummond Æ givesTutorial Æ Manchester_ProtegeOWL_tutorial_29_June_2005

► N-ary relationships can be modelled with workarounds in OWL, but this


design pattern will not be discussed today

Copyright © 2005, The University of Manchester

50
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

OWL Constructs:
Individuals
Eg me, you, this tutorial, this room
► Individuals are the objects in the domain
► aka “Instance”, “Object”
► Individuals may be (and are likely to be) a member of multiple Classes

Copyright © 2005, The University of Manchester


► Is a knowledge modelling environment
► Is free, open source software
► Is developed by Stanford Medical Informatics
► Has a large user community (approx 30k)

Copyright © 2005, The University of Manchester

51
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester


► core is based on Frames (object oriented) modelling
► has an open architecture that allows other modelling
languages to be built on top
► supports development of plugins to allow backend /
interface extensions
► now supports OWL through the Protégé-OWL plugin

So let’s have a look…

Copyright © 2005, The University of Manchester

Protégé-OWL

Copyright © 2005, The University of Manchester

52
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Class Hierarchy
Subsumption hierarchy
Structure as asserted by the ontology engineer

owl:Thing is the root class

Copyright © 2005, The University of Manchester

Subsumption

► Superclass/subclass relationship, “isa”


► All members of a subclass can be inferred to be members of its
superclasses
owl:Thing: superclass of all OWL Classes
A
• A subsumes B
B • A is a superclass of B
• B is a subclass of A
• All members of B are also
members of A

Copyright © 2005, The University of Manchester

53
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

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)

Copyright © 2005, The University of Manchester

Exercise 2: Create Class


Hierarchy
Before you start:
► If you are borrowing a laptop, please take a note of the
number on the top cover
► Please save all files to:
My Documents\ontologies
► Because you will be needing your work again
tomorrow

Copyright © 2005, The University of Manchester

54
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Exercise 2: Create Class


Hierarchy
► You will notice that we use naming conventions for our
ontology entities
► Typically, we use CamelNotation with a starting capital
for Classes
► Use whatever conventions you like
► It is helpful to be consistent – especially when trying to
find things in your ontology

Copyright © 2005, The University of Manchester

Saving OWL Files

OWL = easy to make mistakes = save regularly


1. Select File Æ Save Project As
A dialog (as shown) will pop up

2. Select a file directly by clicking the button on the top right


You will notice that 2 files are created
.pprj – the project file
this just stores information about the GUI
and the workspace
.owl – the OWL file
this is where your ontology is stored in
RDF/OWL format

3. Select OK

Copyright © 2005, The University of Manchester

55
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Loading OWL files

1. If you only have an OWL


file:
- FileÆ New Project
- Select OWL Files as the type
- Tick Create from existing sources
- Next to select the .owl file

2. If you’ve got a valid project file*:


- File Æ Open Project
- select the .pprj file

* ie one created on this version of Protégé - the s/w gets updated once every few
days, so don’t count on it unless you’ve created it recently– safest to build from
the .owl file if in doubt

Copyright © 2005, The University of Manchester

Consistency Checking

► We’ve just created a class that doesn’t really make sense


► What is a MeatyVegetableTopping?

► We’d like to be able to check the logical consistency of our


model

► This is one of the tasks that can be done automatically by


software known as a Reasoner

► Being able to use a reasoner is one of the main advantages


of using a logic-based formalism such as OWL (and why we
are using OWL-DL)

Copyright © 2005, The University of Manchester

56
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Reasoners

► Reasoners are used to infer information that is not explicitly contained


within the ontology
► You may also hear them being referred to as Classifiers
► Standard reasoner services are:
► Consistency Checking
► Subsumption Checking
► Equivalence Checking
► Instantiation Checking

► Reasoners can be used at runtime in applications as a querying


mechanism (esp useful for smaller ontologies)
► We will use one during development as an ontology “compiler”. A well
designed ontology can be compiled to check its meaning is that intended

Copyright © 2005, The University of Manchester

Reasoners and Protégé

► Protégé-OWL supports the use of reasoners implementing the


DIG interface
► This means that the reasoner you choose is independent of the
ontology editor, so you can choose the implementation you want
depending on your needs (eg some may be more optimised for
speed/memory, others may have more features)
► These reasoners typically set up a service running locally or on a
remote server – Protégé-OWL can only connect to reasoners
over an http:// connection

Copyright © 2005, The University of Manchester

57
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Accessing the Reasoner

Classify taxonomy
(and check consistency)

Compute inferred types


(for individuals)

Just check consistency


(for efficiency)

Copyright © 2005, The University of Manchester

Reasoning about our Pizzas

► When we classify an ontology we could just use the “Check


Consistency” button but we’ll get into the habit of doing a full
classification as we’ll be doing this later

► The reasoner dialog will pop up while the


reasoner works

► When the reasoner has finished, you will see an inferred


hierarchy appear, which will show any movement of classes in
the hierarchy

► If the reasoner has inferred anything about our model, this is


reported in the reasoner dialog and in a separate results window

► inconsistent classes turn red


► moved classes turn blue

Copyright © 2005, The University of Manchester

58
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Disjointness

► OWL assumes that classes overlap

MeatTopping VegetableTopping

= individual

► This means an individual could be both a MeatTopping and a


VegetableTopping at the same time
► We want to state this is not the case

Copyright © 2005, The University of Manchester

Disjointness

► If we state that classes are disjoint

MeatTopping VegetableTopping

= individual

► This means an individual cannot be both a MeatTopping and


a VegetableTopping at the same time
► We must do this explicitly in the interface

Copyright © 2005, The University of Manchester

59
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

ClassesTab: Disjoints
Widget
Add siblings as disjoint
Add new disjoint Remove disjoint siblings

List of disjoint classes

Copyright © 2005, The University of Manchester

Exercise 3: Add Disjoints

► Run a reasoner locally on your machine


► Your reasoner may be found at…

Copyright © 2005, The University of Manchester

60
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Why is MeatyVegetableTopping
Inconsistent?

► We have asserted that a MeatyVegetableTopping is a subclass of


two classes we have stated are disjoint

► The disjoint means nothing can be a MeatTopping and a


VegetableTopping at the same time
► This means that MeatyVegetableTopping can never contain any
individuals

► The class is therefore inconsistent


► This is what we expect!

► It can be useful to create classes we expect to be inconsistent to


“test” your model – often we refer to these classes as “probes” –
generally it is a good idea to document them as such to avoid later
confusion
Copyright © 2005, The University of Manchester

Other Inconsistencies?

► Your ontology is likely to have several classes with multiple


parents
► We call this a tangle
► As we have seen, a class cannot have 2 disjoint parents – it will
be inconsistent
► To remove other inconsistencies you will have to be careful about
where your disjoints are – remove disjoints between multiple
parents by hand

► This is obviously an awkward thing to manage – we will later


show you how to manage your tangle to simplify these issues

Copyright © 2005, The University of Manchester

61
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

What have we got?

► We’ve created a tangled graph (not a tree – multiple parents) of


mostly disjoint classes

► Disjoints are inherited down the subsumption hierarchy


eg something 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 and see its siblings
in the disjoints widget (if it has any)

Copyright © 2005, The University of Manchester

What are we missing?

► This is not a semantically rich model


► Apart from “is kind of” (subsumption) and “is not kind of” (disjoint),
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

Pizza PizzaTopping

= individual

Copyright © 2005, The University of Manchester

62
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Relationships in OWL

► In OWL-DL, relationships can only be formed between


Individuals or between an Individual and a data value.
(In OWL-Full, Classes can be related, but this cannot be reasoned with)

► Relationships are formed along Properties


► We can restrict how these Properties are used:
► Globally – by stating things about the Property itself
► Or locally – by restricting their use for a given Class

Copyright © 2005, The University of Manchester

OWL Properties

► Object Property – relates Individuals


► Datatype Property – relates Individuals to data (int,
string, float etc)
► Annotation Property – for attaching metadata to
classes, individuals or properties

Copyright © 2005, The University of Manchester

63
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Properties Tab: Property


Browser
Note that Properties can be in a
hierarchy, although we are not going
to be using this feature today

Copyright © 2005, The University of Manchester

Creating Properties

Delete Property

New Object Property:


Associates an individual to another individual

not used today:


- New Datatype Property (String, int etc)
- New Annotation Properties for metadata

- New SubProperty – ie create “under” the


current selection

Copyright © 2005, The University of Manchester

64
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Creating Properties

► We tend to name properties using camelNotation with a lowercase letter


to begin

► We often create properties using 2 standard naming patterns:


► has… (eg hasColour)
► is…Of (eg isTeacherOf) or other suffixes (eg …In …To)
► This has several advantages:
► It is easier to find properties
► It is easier for tools to generate a more readable form
(see tooltips on the classes in the hierarchy later)
► Inverses properties typically follow this pattern
eg hasPart, isPartOf

► Our example hasBase fits into this


(we will not create the inverse in this tutorial)

Copyright © 2005, The University of Manchester

Associating Properties with


Classes
► We now have a property 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
► We create Restrictions using the Conditions widget

► Conditions can be any kind of Class – you have already added Named
superclasses in the Conditions Widget. Restrictions are a type of
Anonymous Class

Copyright © 2005, The University of Manchester

65
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Conditions Widget

Conditions asserted by the ontology engineer


Add different types of condition

Definition
of the class
(later)

Description
of the class
Conditions inherited from superclasses

Copyright © 2005, The University of Manchester

Conditions Types
Logical (Anonymous) Classes
Create Restriction (next)
Create Class Expression Add Named Superclass

Copyright © 2005, The University of Manchester

66
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Creating Restrictions
Restricted Property

Restriction
Type

Filler
Expression

Expression
Syntax
Construct
check
Palette

Copyright © 2005, The University of Manchester

What does this mean?

► We have created a restriction: ∃ hasBase PizzaBase


on Class Pizza as a necessary condition
ase
hasB
Pizza ase PizzaBase
hasB
ase
hasB

hasB
ase

► “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”
► “Every individual of the Pizza class must have at least one base
from the class PizzaBase”

Copyright © 2005, The University of Manchester

67
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

What does this mean?

► We have created a restriction: ∃ hasBase PizzaBase


on Class Pizza as a necessary condition
ase
hasB
Pizza ase PizzaBase
hasB
ase
hasB

hasB
ase

► “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”

Copyright © 2005, The University of Manchester

Why?

► We have created a restriction: ∃ hasBase PizzaBase


on Class Pizza as a necessary condition
ha
sB

ase
hasB
a
se

ase PizzaBase
hasB
∃ hasBase
PizzaBase ase
hasB

hasB
ase

hasBas
e

► Each Restriction or Class Expression describes the set of all


individuals that satisfy the condition

Copyright © 2005, The University of Manchester

68
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Why? Necessary conditions

► We have created a restriction: ∃ hasBase PizzaBase


on Class Pizza as a necessary condition

ha
sB
ase
hasB

a
se
Pizza PizzaBase
ase
hasB
∃ hasBase
PizzaBase ase
hasB

hasB
ase

hasBas
e

► Each necessary condition on a class is a superclass of that class


► ie The restriction ∃ hasBase PizzaBase is a superclass of Pizza
► As Pizza is a subclass of the restriction, all Pizzas must satisfy
the restriction that they have at least one base from PizzaBase

Copyright © 2005, The University of Manchester

Exercise 4: Properties &


Restrictions

Copyright © 2005, The University of Manchester

69
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Restriction Types

∃ Existential, someValuesFrom “Some”, “At least one”

∀ Universal, allValuesFrom “Only”

∋ hasValue “equals x”

= Cardinality “Exactly n”

≤ Max Cardinality “At most n”

≥ Min Cardinality “At least n”

Copyright © 2005, The University of Manchester

Primitive Classes
► All classes in our ontology so far are Primitive
► We describe primitive pizzas
► Primitive Class = only Necessary Conditions
► They are marked as plain orange circles in the class hierarchy

We condone
building a
disjoint tree of
primitive
classes

Copyright © 2005, The University of Manchester

70
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Polyhierarchies
► By the end of this tutorial we intent to create a VegetarianPizza
► Some of our existing Pizzas should be types of VegetarianPizza
► However, they could also be types of SpicyPizza or
CheeseyPizza

► We need to be able to give them multiple parents in a principled


way
► We could just assert multiple parents like we did with
MeatyVegetableTopping (without disjoints)

BUT…
Copyright © 2005, The University of Manchester

Asserted Polyhierarchies
We believe asserting polyhierarchies is bad

► We lose some encapsulation of knowledge


► Why is this class a subclass of that one?
► Difficult to maintain
► Adding new classes becomes difficult because all subclasses may
need to be updated
► Extracting from a graph is harder than from a tree

let the reasoner do it!


Copyright © 2005, The University of Manchester

71
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Summary

You should now be able to:

► extract Knowledge (and act as an expert)


► identify components of the Protégé-OWL Interface
► create Primitive Classes
► create Properties
► create some basic Restrictions on a Class using
Existential qualifiers

Copyright © 2005, The University of Manchester

72
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Knowledge
Acquisition
Jeremy Rogers

73
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Informal Modelling

Jeremy Roberts

O p enG A LEN

BioHealth
Informatics
Group 1 Ontology Tutorial, © 2005 Univ. of Manchester

Steps in Developing an
Ontology
1. Establish the purpose
► Without purpose, no scope, requirements, evaluation,

2. Informal/Semiformal knowledge elicitation


► Collect the terms
► Organise terms informally
► Paraphrase and clarify terms to produce informal concept
definitions
► Diagram informally

3. Refine requirements & tests

2 Ontology Tutorial, © 2005 Univ. of Manchester

74
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Steps in Implementing an
Ontology
4. Implementation
► Paraphrase and comment at each stage before implementing
► Develop normalised schema and skeleton
► Implement prototype recording the intention as a paraphrase
► Keep track of what you meant to do so you can compare with what happens
► Implementing logic-based ontologies is programming
► Scale up a bit
► Check performance
► Populate
► Possibly with help of text mining and language technology

5. Evaluate & quality assure


► Against goals
► Include tests for evolution and change management
► Design regression tests and “probes”
6. Monitor use and evolve
► Process not product!

3 Ontology Tutorial, © 2005 Univ. of Manchester

Purpose & Scope of the


Animals Ontology

► To provide an ontology for an index of a


children’s book of animals including
► Where they live
► What they eat
►Carnivores, herbivores and omnivores
► How dangerous they are
► How big they are
► A bit of basic anatomy
►numbers of legs, wings, toes, etc.

4 Ontology Tutorial, © 2005 Univ. of Manchester

75
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Eliciting Knowledge

http://www.epistemics.co.uk/Notes/63-0-0.htm

► Most knowledge is in the heads of experts


► Experts have vast amounts of knowledge
► Experts have a lot of tacit knowledge
► They don't know all that they know and use
► Tacit knowledge is hard (impossible) to describe
► Experts are very busy and valuable people
► Each expert doesn't know everything

5 Ontology Tutorial, © 2005 Univ. of Manchester

…there are known knowns; there are things


we know we know. We also know there are
known unknowns; that is to say we know
there are some things we do not know. But
there are also unknown unknowns -- the ones
we don't know we don't know.

6 Ontology Tutorial, © 2005 Univ. of Manchester

76
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Elicitation Techniques

► Take experts off the job for short time periods


► Allow non-experts to understand the knowledge
► Focus on the essential knowledge
► Can capture tacit knowledge
► Allow knowledge to be collated from different experts
► Allow knowledge to be validated and maintained

7 Ontology Tutorial, © 2005 Univ. of Manchester

Types of technique (1)

► Protocol-generation techniques
include various types of interviews (unstructured,
semi-structured and structured), reporting techniques
(such as self-report and shadowing) and observational
techniques

► Protocol analysis techniques


are used with transcripts of interviews or other text-
based information to identify various types of
knowledge, such as goals, decisions, relationships
and attributes. This acts as a bridge between the use
of protocol-based techniques and knowledge
modelling techniques.

8 Ontology Tutorial, © 2005 Univ. of Manchester

77
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Types of technique (2)

► Hierarchy-generation techniques
such as laddering are used to build taxonomies or
other hierarchical structures such as goal trees and
decision networks.

► Matrix-based techniques
involve the construction of grids indicating such things
as problems encountered against possible solutions.
Important types include the use of frames for
representing the properties of concepts and the
repertory grid technique used to elicit, rate, analyse
and categorise the properties of concepts.

9 Ontology Tutorial, © 2005 Univ. of Manchester

Types of technique (3)

► Sorting techniques
are used for capturing the way people compare and
order concepts, and can lead to the revelation of
knowledge about classes, properties and priorities.

► Limited-information and constrained-processing tasks


are techniques that either limit the time and/or
information available to the expert when performing
tasks. For instance, the twenty-questions technique
provides an efficient way of accessing the key
information in a domain in a prioritised order.

10 Ontology Tutorial, © 2005 Univ. of Manchester

78
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Types of technique (4)

► Diagram-based techniques
include the generation and use of concept maps, state
transition networks, event diagrams and process
maps. The use of these is particularly important in
capturing the "what, how, when, who and why" of
tasks and events.

11 Ontology Tutorial, © 2005 Univ. of Manchester

Collect the concepts

► Card sorting is often the best way


► Write down each concept/idea on a card
► Organise them into piles
► Link the piles together
► Do it again, and again
► Works best in a small group

► In the lab we will provide you with some pre-printed cards and many
spare cards
►Work in pairs or triples

12 Ontology Tutorial, © 2005 Univ. of Manchester

79
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Example: Animals & Plants

► Dog „ Carnivore ► Dangerous


► Cat „ Plant ► Pet
► Cow ► Domestic Animal
„ Animal
► Person ► Farm animal
► Tree „ Fur ► Draft animal
► Grass „ Child ► Food animal
► Herbivore „ Parent ► Fish
► Male ► Carp
„ Mother
► Female ► Goldfish
„ Father

13 Ontology Tutorial, © 2005 Univ. of Manchester

Organise the concepts


Example: Animals & Plants

► Dog „ Carnivore ► Healthy


► Cat „ Plant ► Pet
► Cow ► Domestic Animal
„ Animal
► Person ► Farm animal
► Tree „ Fur ► Draft animal
► Grass „ Child ► Food animal
► Herbivore „ Parent ► Fish
► Male ► Carp
„ Mother
► Female ► Goldfish
„ Father

14 Ontology Tutorial, © 2005 Univ. of Manchester

80
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Extend the concepts


“Laddering”
► Take a group of things and ask what they have in common
► Then what other ‘siblings’ there might be
► e.g.
► Plant, Animal Æ Living Thing
►Might add Bacteria and Fungi but not now
► Cat, Dog, Cow, Person Æ Mammal
►Others might be Goat, Sheep, Horse, Rabbit,…
► Cow, Goat, Sheep, Horse Æ Hoofed animal (“Ungulate”)
►What others are there? Do they divide amongst themselves?
► Wild, Domestic Æ Demoestication
►What other states – “Feral” (domestic returned to wild)

Vocabulary note:
“Sibling” = “brother or sister”
15 Ontology Tutorial, © 2005 Univ. of Manchester

Choose Some Main Axes

► Add abstractions where needed


► e.g. “Living thing”
► identify relations
► e.g. “eats”, “owns”, “parent of”
► Identify definable things
► e.g. “child”, “parent”, “Mother”, “Father”
►Things where you can say clearly what it means
►Try to define a dog precisely – very difficult
►A “natural kind”

► make names explicit

16 Ontology Tutorial, © 2005 Univ. of Manchester

81
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Choose Some Main Axes


Add abstractions where needed; identify relations;
Identify definable things, make names explicit
► Living Thing ► Modifiers
„ Relations
► Animal „ eats
► domestic
►Mammal ► pet „ owns
►Cat ► Farmed
„ parent-of
►Dog ► Draft
►Cow ► Food „ …
►Person ► Wild „ Definable
►Fish ► Health „ Carinvore
►Carp ► healthy
„ Herbivore
►Goldfish ► sick
► Sex
„ Child
► Plant
►Tree ► Male „ Parent
►Grass
► Female „ Mother
► Age „ Father
►Fruit
► Adult
► Child
„ Food Animal
„ Draft Animal
17 Ontology Tutorial, © 2005 Univ. of Manchester

Self_standing_entities

►Things that can exist on there own nouns


►People, animals, houses, actions, processes, …
►Roughly nouns

►Modifiers
►Things that modify (“inhere”) in other things
►Roughly adjectives and adverbs

18 Ontology Tutorial, © 2005 Univ. of Manchester

82
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontology Engineering
Jeremy Rogers

83
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

From hype to practicality


In which Eeyore reviews Ontology Engineering

Dr2 Jeremy Rogers


Manchester University
Jeremy.e.rogers@manchester.ac.uk

O p en G A LEN

BioHealth
Ontology Tutorial, © 2005 Univ. of Manchester
Informatics
Group

Outline

► Where do I start?
► Top level ontologies

► The naming of things


► Metadata and provenance
► Mission creep
► Reasoning
► Process, not product
► Innate complexity

Ontology Tutorial, © 2005 Univ. of Manchester

84
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Top ontologies

SHZZ
BA

BEAR
DA DZZT

NINNER

Ontology Tutorial, © 2005 Univ. of Manchester

Top ontologies

SHOE
Brrrrr BADJOO DZZT

BOO TAKTOR
PLAY
DA
OSKA NO
NINNER TEDDY
OPA SHYA
JOO CAY ISKY PREE APA
DOW
Ontology Tutorial, © 2005 Univ. of Manchester

85
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Invasion of the
Philosophers
Previous efforts at ontology building have been conceived in
pragmatic terms, as an outgrowth of knowledge engineering or
artificial intelligence research or more generally as a project
deriving its motivation from the need to solve problems internal to
the development of computer systems.
ECOR, in contrast, looks beyond the realm of software artefacts,
starting out from the idea that the project of developing reference
ontologies can profit from the theories developed by philosophers
over 2500 years of ontological research.
Too many ontology builders have taken as their starting point
existing database systems or the conceptualizations used by the
practitioners within given domains, without sufficiently checking
whether these conceptualizations correspond with identifiable
entities and relations on the side of reality itself.

Ontology Tutorial, © 2005 Univ. of Manchester

Top level ontologies


CYC
SUMO
GUM
Mikrokosmos
Phenomenon
DomainCategory

ModifierConcept
SENSUS
Feature
Collection

State Selector
Aspect Role

Unit

Modality
DOLCE
Generalised
Structure
Process Generalised
Substance
Status
Level Of
Specification

OCHRE
Heat
Energy Substance

Chemical
Substance
Body
Substance
NAMED
Substance
BFO
Light

Sound
Tissue NAMED Body Substance
GALEN

Ontology Tutorial, © 2005 Univ. of Manchester

86
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Outline

►Where do I start?
►Top level ontologies

►The naming of things


►Metadata and provenance
►Mission creep
►Reasoning
►Process, not product
►Innate complexity

Ontology Tutorial, © 2005 Univ. of Manchester

Classes vs their Names

► Classes represent concepts not their names


► The class name can change, but still refer to the same
concept (e.g. First Disease = Measles)
► Synonym names for the same concept are not different
classes
► Class names usually given in singular (in English)
► Many arguments are about names not substance
► Are both concepts valid?
►Cough – sign or symptom?
► If so, may need new names – even if neologisms
►CoughSign, CoughSymptom

Ontology Tutorial, © 2005 Univ. of Manchester

87
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

When to introduce…
a new class?
►Subclasses of a class usually have
► Additional properties
► Additional restrictions
► Narrowed restrictions
► Closure axioms

►New classes
► Leaf nodes – new things
► New definitions – new RE-USABLE abstractions
► High level primitives
► Organisational principles

Ontology Tutorial, © 2005 Univ. of Manchester

When to introduce…
A new class or a property value?

How important is the distinction for the domain?

Ontology Tutorial, © 2005 Univ. of Manchester

88
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Outline

►Where do I start?
►Top level ontologies

►The naming of things


►Metadata and provenance
►Mission creep
►Reasoning
►Process, not product
►Innate complexity

Ontology Tutorial, © 2005 Univ. of Manchester

OWL Annotations

►Enable us to describe the class itself, e.g.


► Comments & Explanations
► Authorship
► Provenance –
► where it came from, previous versions, evidence, etc.
► what it is to be used for, scope, limitations, work arounds
► Editorial status
► External coding systems
► CUI/LUI, S-CT, MeSH, etc.
► Additional names
Ontology Tutorial, © 2005 Univ. of Manchester

89
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Outline

►Where do I start?
►Top level ontologies

►The naming of things


►Metadata and provenance
►Mission creep
►Reasoning
►Process, not product
►Innate complexity

Ontology Tutorial, © 2005 Univ. of Manchester

Ontology Engineering:
Mission Creep
►An ontology should not contain all the possible
information about the domain
► No need to specialize or generalize more than the application
requires
► No need to include all possible properties of a class
► Only the most salient properties
► Only the properties that the applications require

Ontology Tutorial, © 2005 Univ. of Manchester

90
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Limiting the Scope

►Ontology of wine, food, and their pairings probably


will not include
► Bottle size
► Label color
► My favorite food and wine

►An ontology of biological experiments will contain


► Biological organism
► Experimenter

►Is the class Experimenter a subclass of Biological


organism?

Ontology Tutorial, © 2005 Univ. of Manchester

Outline

►Where do I start?
►Top level ontologies

►The naming of things


►Metadata and provenance
►Mission creep
►Reasoning
►Process, not product
►Innate complexity

Ontology Tutorial, © 2005 Univ. of Manchester

91
A Prac ca n roduc on o On o og es & OWL © 2005 The Un vers y o Manches er

topClass
I Certain infectious and parasitic diseases
II Neoplasms
III Diseases of the blood and blood-forming organs and certain disorders involving the immune mechanism
IV Endocrine, nutritional and metabolic diseases
V Mental and behavioural disorders

Goodbye to
VI Diseases of the nervous system
VII Diseases of the eye and adnexa
VIII Diseases of the ear and mastoid process
IX Diseases of the circulatory systems
X Diseases of the respiratory system
XI Diseases of the digestive system
XII Diseases of the skin and subcutaneous tissue
XIII Diseases of the musculoskeletal system and connective tissue
XIV Diseases of the genitourinary system
XV Pregnancy, childbirth and the puerperium
XVI Certain conditions originating in the perinatal period
XVII Congenital malformations, deformations and chromosomal abnormalities
XVIII Symptoms, signs and abnormal clinical and laboratory findings, not elsewhere classified
XIX Injury, poisoning and certain other consequences of external causes
XX External causes of morbidity and mortality
V01-V99 Transport accidents

combinatorial explosions
V01-V09 Pedestrian injured in transport accident
V10-V19 Pedal cyclist injured in transport accident
V10 Pedal cyclist injured in collision with pedestrian or animal
V10.0 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident
V10.00 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident, while engaged in sports activity
V10.01 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident, while engaged in leisure activity
V10.02 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident, while working for an income
V10.03 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident, while engaged in other types of work
V10.04 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V10.08 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident, while engaged in other specified activities
V10.09 Pedal cyclist injured in collision with pedestrian or animal, driver, nontraffic accident, during unspecified activity
V10.1 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident
V10.10 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident, while engaged in sports activity
V10.11 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident, while engaged in leisure activity
V10.12 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident, while working for an income
V10.13 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident, while engaged in other types of work
V10.14 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V13 Pedal cyclist injured in collision with car, pick-up truck or van
V10.18 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident, while engaged in other specified activities
V10.19 Pedal cyclist injured in collision with pedestrian or animal, passenger, nontraffic accident, during unspecified activity V13.0 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident V15.2 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident
V10.2 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident V13.00 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident, while engaged in sports activity V15.20 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in sports activity
V10.20 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident, while engaged in sports activity
V13.01 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident, while engaged in leisure activity V15.21 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in leisure activity
V10.21 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident, while engaged in leisure activity
V10.22 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident, while working for an income V13.02 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident, while working for an income V15.22 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident, while working for an income
V10.23 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident, while engaged in other types of work V13.03 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident, while engaged in other types of work V15.23 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in other types of work
V10.24 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V13.04 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V15.24 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V10.28 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident, while engaged in other specified activities
V13.08 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident, while engaged in other specified activities V15.28 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in other specified activities
V10.29 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, nontraffic accident, during unspecified activity
V10.3 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting V13.09 Pedal cyclist injured in collision with car, pick-up truck or van, driver, nontraffic accident, during unspecified activity V15.29 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, nontraffic accident, during unspecified activity
V10.30 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting, while engaged in sports activity V13.1 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident V15.3 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting
V10.31 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting, while engaged in leisure activity
V13.10 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident, while engaged in sports activity V15.30 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting, while engaged in sports activity
V10.32 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting, while working for an income
V10.33 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting, while engaged in other types of work V13.11 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident, while engaged in leisure activity V15.31 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting, while engaged in leisure activity
V10.34 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting, while resting, sleeping, eating or engaging in other vital activities V13.12 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident, while working for an income V15.32 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting, while working for an income, while working for an income
V10.38 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting, while engaged in other specified activities V13.13 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident, while engaged in other types of work V15.33 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting, while engaged in other types of work
V10.39 Pedal cyclist injured in collision with pedestrian or animal, while boarding or alighting, during unspecified activity
V13.14 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V15.34 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting, while resting, sleeping, eating or engaging in other vital activities
V10.4 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident
V10.40 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident, while engaged in sports activity V13.18 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident, while engaged in other specified activities V15.38 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting, while engaged in other specified activities
V10.41 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident, while engaged in leisure activity V13.19 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, nontraffic accident, during unspecified activity V15.39 Pedal cyclist injured in collision with railway train or railway vehicle, while boarding or alighting, during unspecified activity
V10.42 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident, while working for an income
V13.2 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident V15.4 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident
V10.43 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident, while engaged in other types of work
V10.44 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident, while resting, sleeping, eating or engaging in other vital activities V13.20 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident, while engaged in sports activity V15.40 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident, while engaged in sports activity
V10.48 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident, while engaged in other specified activities V13.21 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident, while engaged in leisure activity V15.41 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident, while engaged in leisure activity
V10.49 Pedal cyclist injured in collision with pedestrian or animal, driver, traffic accident, during unspecified activity V13.22 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident, while working for an income V15.42 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident, while working for an income
V10.5 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident
V13.23 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident, while engaged in other types of work V15.43 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident, while engaged in other types of work
V10.50 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident, while engaged in sports activity
V10.51 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident, while engaged in leisure activity V13.24 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V15.44 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V10.52 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident, while working for an income V13.28 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident, while engaged in other specified activities V15.48 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident, while engaged in other specified activities
V10.53 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident, while engaged in other types of work
V13.29 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, nontraffic accident, during unspecified activity V15.49 Pedal cyclist injured in collision with railway train or railway vehicle, driver, traffic accident, during unspecified activity
V10.54 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V10.58 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident, while engaged in other specified activities V13.3 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting V15.5 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident
V10.59 Pedal cyclist injured in collision with pedestrian or animal, passenger, traffic accident, during unspecified activity V13.30 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting, while engaged in sports activity V15.50 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident, while engaged in sports activity
V10.9 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident V13.31 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting, while engaged in leisure activity V15.51 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident, while engaged in leisure activity
V10.90 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident, while engaged in sports activity
V13.32 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting, while working for an income V15.52 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident, while working for an income
V10.91 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident, while engaged in leisure activity
V10.92 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident, while working for an income V13.33 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting, while engaged in other types of work V15.53 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident, while engaged in other types of work
V10.93 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident, while engaged in other types of work V13.34 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting, while resting, sleeping, eating or engaging in other vital activities V15.54 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V10.94 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V13.38 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting, while engaged in other specified activities V15.58 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident, while engaged in other specified activities
V10.98 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident, while engaged in other specified activities
V10.99 Pedal cyclist injured in collision with pedestrian or animal, unspecified pedal cyclist, traffic accident, during unspecified activity V13.39 Pedal cyclist injured in collision with car, pick-up truck or van, while boarding or alighting, during unspecified activity V15.59 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, traffic accident, during unspecified activity
V11 Pedal cyclist injured in collision with other pedal cycle V13.4 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident V15.9 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident
V11.0 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident V13.40 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident, while engaged in sports activity V15.90 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident, while engaged in sports activity
V11.00 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident, while engaged in sports activity
V13.41 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident, while engaged in leisure activity V15.91 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident, while engaged in leisure activity
V11.01 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident, while engaged in leisure activity
V11.02 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident, while working for an income V13.42 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident, while working for an income V15.92 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident, while working for an income
V11.03 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident, while engaged in other types of work V13.43 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident, while engaged in other types of work V15.93 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident, while engaged in other types of work
V11.04 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V13.44 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident, while resting, sleeping, eating or engaging in other vital activities V15.94 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V11.08 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident, while engaged in other specified activities
V11.09 Pedal cyclist injured in collision with other pedal cycle, driver, nontraffic accident, during unspecified activity V13.48 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident, while engaged in other specified activities V15.98 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident, while engaged in other specified activities
V11.1 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident V13.49 Pedal cyclist injured in collision with car, pick-up truck or van, driver, traffic accident, during unspecified activity V15.99 Pedal cyclist injured in collision with railway train or railway vehicle, unspecified pedal cyclist, traffic accident, during unspecified activity
V11.10 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident, while engaged in sports activity V13.5 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident V16 Pedal cyclist injured in collision with other nonmotor vehicle
V11.11 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident, while engaged in leisure activity
V13.50 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident, while engaged in sports activity V16.0 Pedal cyclist injured in collision with other nonmotor vehicle, driver, nontraffic accident
V11.12 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident, while working for an income
V11.13 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident, while engaged in other types of work V13.51 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident, while engaged in leisure activity V16.00 Pedal cyclist injured in collision with other nonmotor vehicle, driver, nontraffic accident, while engaged in sports activity
V11.14 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V13.52 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident, while working for an income V16.01 Pedal cyclist injured in collision with other nonmotor vehicle, driver, nontraffic accident, while engaged in leisure activity
V11.18 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident, while engaged in other specified activities
V13.53 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident, while engaged in other types of work V16.02 Pedal cyclist injured in collision with other nonmotor vehicle, driver, nontraffic accident, while working for an income
V11.19 Pedal cyclist injured in collision with other pedal cycle, passenger, nontraffic accident, during unspecified activity
V11.2 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident V13.54 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident, while resting, sleeping, eating or engaging in other vital activities V16.03 Pedal cyclist injured in collision with other nonmotor vehicle, driver, nontraffic accident, while engaged in other types of work
V11.20 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident, while engaged in sports activity V13.58 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident, while engaged in other specified activities V16.04 Pedal cyclist injured in collision with other nonm
V11.21 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident, while engaged in leisure activity V13.59 Pedal cyclist injured in collision with car, pick-up truck or van, passenger, traffic accident, during unspecified activity
V11.22 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident, while working for an income
V13.9 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident
V11.23 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident, while engaged in other types of work
V11.24 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V13.90 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident, while engaged in sports activity
V11.28 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident, while engaged in other specified activities V13.91 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident, while engaged in leisure activity
V11.29 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, nontraffic accident, during unspecified activity
V13.92 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident, while working for an income
V11.3 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting
V11.30 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting, while engaged in sports activity V13.93 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident, while engaged in other types of work
V11.31 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting, while engaged in leisure activity V13.94 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V11.32 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting, while working for an income V13.98 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident, while engaged in other specified activities
V11.33 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting, while engaged in other types of work
V13.99 Pedal cyclist injured in collision with car, pick-up truck or van, unspecified pedal cyclist, traffic accident, during unspecified activity
V11.34 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting, while resting, sleeping, eating or engaging in other vital activities
V11.38 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting, while engaged in other specified activities V14 Pedal cyclist injured in collision with heavy transport vehicle or bus
V11.39 Pedal cyclist injured in collision with other pedal cycle, while boarding or alighting, during unspecified activity V14.0 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident
V11.4 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident
V14.00 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident, while engaged in sports activity
V11.40 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident, while engaged in sports activity
V11.41 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident, while engaged in leisure activity V14.01 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident, while engaged in leisure activity
V11.42 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident, while working for an income V14.02 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident, while working for an income
V11.43 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident, while engaged in other types of work V14.03 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident, while engaged in other types of work
V11.44 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V14.04 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V11.48 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident, while engaged in other specified activities
V11.49 Pedal cyclist injured in collision with other pedal cycle, driver, traffic accident, during unspecified activity V14.08 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident, while engaged in other specified activities
V11.5 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident V14.09 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, nontraffic accident, during unspecified activity
V11.50 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident, while engaged in sports activity
V14.1 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic accident
V11.51 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident, while engaged in leisure activity
V11.52 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident, while working for an income V14.10 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic accident, while engaged in sports activity
V11.53 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident, while engaged in other types of work V14.11 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic accident, while engaged in leisure activity
V11.54 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident, while resting, sleeping, eating or engaging in other vital activities V14.12 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic accident, while working for an income
V11.58 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident, while engaged in other specified activities
V14.13 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic accident, while engaged in other types of work
V11.59 Pedal cyclist injured in collision with other pedal cycle, passenger, traffic accident, during unspecified activity
V11.9 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident V14.14 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V11.90 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident, while engaged in sports activity V14.18 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic, while engaged in other specified activities accident
V11.91 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident, while engaged in leisure activity
V14.19 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, nontraffic, during unspecified activity accident
V11.92 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident, while working for an income
V11.93 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident, while engaged in other types of work V14.2 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident
V11.94 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident, while resting, sleeping, eating or engaging in other vital activities V14.20 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident, while engaged in sports activity
V11.98 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident, while engaged in other specified activities V14.21 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident, while engaged in leisure activity
V11.99 Pedal cyclist injured in collision with other pedal cycle, unspecified pedal cyclist, traffic accident, during unspecified activity
V14.22 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident, while working for an income
V12 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle
V12.0 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident V14.23 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident, while engaged in other types of work
V12.00 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident, while engaged in sports activity V14.24 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V12.01 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident, while engaged in leisure activity
V14.28 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident, while engaged in other specified activities
V12.02 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident, while working for an income
V12.03 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident, while engaged in other types of work V14.29 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, nontraffic accident, during unspecified activity
V12.04 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V14.3 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting
V12.08 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident, while engaged in other specified activities V14.30 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting, while engaged in sports activity
V12.09 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, nontraffic accident, during unspecified activity
V14.31 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting, while engaged in leisure activity
V12.1 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident
V12.10 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident, while engaged in sports activity V14.32 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting, while working for an income
V12.11 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident, while engaged in leisure activity V14.33 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting, while engaged in other types of work
V12.12 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident, while working for an income
V14.34 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting, while resting, sleeping, eating or engaging in other vital activities
V12.13 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident, while engaged in other types of work
V12.14 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities V14.38 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting, while engaged in other specified activities
V12.18 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident, while engaged in other specified activities V14.39 Pedal cyclist injured in collision with heavy transport vehicle or bus, while boarding or alighting, during unspecified activity
V12.19 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, nontraffic accident, during unspecified activity V14.4 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident
V12.2 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident
V14.40 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident, while engaged in sports activity
V12.20 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in sports activity
V12.21 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in leisure activity V14.41 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident, while engaged in leisure activity
V12.22 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident, while working for an income V14.42 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident, while working for an income
V12.23 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in other types of work
V14.43 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident, while engaged in other types of work
V12.24 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V12.28 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident, while engaged in other specified activities V14.44 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V12.29 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, nontraffic accident, during unspecified activity V14.48 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident, while engaged in other specified activities
V12.3 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting V14.49 Pedal cyclist injured in collision with heavy transport vehicle or bus, driver, traffic accident, during unspecified activity
V12.30 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting, while engaged in sports activity V14.5 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident
V12.31 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting, while engaged in leisure activity V14.50 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident, while engaged in sports activity
V12.32 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting, while working for an income V14.51 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident, while engaged in leisure activity
V12.33 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting, while engaged in other types of work V14.52 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident, while working for an income
V12.34 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting, while resting, sleeping, eating or engaging in other vital activities V14.53 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident, while engaged in other types of work
V12.38 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting, while engaged in other specified activities V14.54 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V12.39 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, while boarding or alighting, during unspecified activity V14.58 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident, while engaged in other specified activities
V12.4 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident V14.59 Pedal cyclist injured in collision with heavy transport vehicle or bus, passenger, traffic accident, during unspecified activity
V12.40 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident, while engaged in sports activity V14.9 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident
V12.41 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident, while engaged in leisure activity V14.90 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident, while engaged in sports activity
V12.42 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident, while working for an income V14.91 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident, while engaged in leisure activity
V12.43 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident, while engaged in other types of work V14.92 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident, while working for an income
V12.44 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident, while resting, sleeping, eating or engaging in other vital activities V14.93 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident, while engaged in other types of work
V12.48 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident, while engaged in other specified activities V14.94 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident, while resting, sleeping, eating or engaging in other vital activities
V12.49 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, driver, traffic accident, during unspecified activity V14.98 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident, while engaged in other specified activities
V12.5 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident V14.99 Pedal cyclist injured in collision with heavy transport vehicle or bus, unspecified pedal cyclist, traffic accident, during unspecified activity
V12.50 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident, while engaged in sports activity V15 Pedal cyclist injured in collision with railway train or railway vehicle
V12.51 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident, while engaged in leisure activity V15.0 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident
V12.52 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident, while working for an income V15.00 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident, while engaged in sports activity
V12.53 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident, while engaged in other types of work V15.01 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident, while engaged in leisure activity
V12.54 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident, while resting, sleeping, eating or engaging in other vital activities V15.02 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident, while working for an income
V12.58 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident, while engaged in other specified activities V15.03 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident, while engaged in other types of work
V12.59 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, passenger, traffic accident, during unspecified activity V15.04 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V12.9 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident V15.08 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident, while engaged in other specified activities
V12.90 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident, while engaged in sports activity V15.09 Pedal cyclist injured in collision with railway train or railway vehicle, driver, nontraffic accident, during unspecified activity
V12.91 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident, while engaged in leisure activity V15.1 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident
V12.92 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident, while working for an income V15.10 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident, while engaged in sports activity
V12.93 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident, while engaged in other types of work V15.11 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident, while engaged in leisure activity
V12.94 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident, while resting, sleeping, eating or engaging in other vital activities V15.12 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident, while working for an income
V12.98 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident, while engaged in other specified activities V15.13 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident, while engaged in other types of work
V12.99 Pedal cyclist injured in collision with two- or three-wheeled motor vehicle, unspecified pedal cyclist, traffic accident, during unspecified activity V15.14 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident, while resting, sleeping, eating or engaging in other vital activities
V15.18 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident, while engaged in other specified activities
V15.19 Pedal cyclist injured in collision with railway train or railway vehicle, passenger, nontraffic accident, during unspecified activity

Ontology Tutorial, © 2005 Univ. of Manchester

Ontologies:
Goodbye to picking lists…
S uc u ed Da a En y
F E H

Cyc ng Acc den

What you hit

Your Role

Activity

Location

On o ogy Tu o a © 2005 Un v o Manches e

92
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Reasoning and GIGO

► How do you classify things…


► If the ontology isn’t complete?

► How do you tell if the ontology isn’t complete?


► No gold standard
► Quality Assurance of ontologies?
►Philosophical purity
►Schema consistency
►Knowledge accuracy/completeness
►Operational utility

► Right answers for wrong reason?

Ontology Tutorial, © 2005 Univ. of Manchester

Outline

►Where do I start?
►Top level ontologies

►The naming of things


►Metadata and provenance
►Mission creep
►Reasoning
►Process, not product
►Innate complexity

Ontology Tutorial, © 2005 Univ. of Manchester

93
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Engineering ontologies:
A process not a product
Record Record
Problems Monitoring Changes

ASSESS
Identify
Conformance Use/Test cases
problems
Testing & exemplars

Provenance
Metadata
REVIEW PLAN
Documentation
Explore Decide
consequences amongst
alternatives

Specify Machine
Reference Solutions Readable
Implementations IMPLEMENT
solutions Human
Readable

Ontology Tutorial, © 2005 Univ. of Manchester

Outline

►Where do I start?
►Top level ontologies

►The naming of things


►Metadata and provenance
►Mission creep
►Reasoning
►Process, not product
►Innate complexity

Ontology Tutorial, © 2005 Univ. of Manchester

94
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontology Engineering:
Complexity Monsters
►Domain Complexity
►Artefactual Complexity
►Cognitive Complexity

Ontology Tutorial, © 2005 Univ. of Manchester

Domain Complexity

►E.g. the biomedical domain


► Very large and inherently complex
► Many different views & perspectives: Pain
► Subspecialties have no clear boundaries: Anatomy

►External or legacy KBs


► require obscure categories and properties

►Large ontologies with many axes of classification


► Inherently confusing to navigate

Ontology Tutorial, © 2005 Univ. of Manchester

95
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Artefactual Complexity

►Unreadable notations
(ClinicalSituation which <isCharacterisedBy (presence which isExistenceOf (ContractionProcess which
<isSpecificFunctionOf SphincterAniMuscle hasImmediateConsequence Pain hasIntentionality
(Intentionality which hasAbsoluteState involuntary) hasDuration (Duration which hasAbsoluteState
longTerm) hasTemporalPattern (TemporalPattern which hasAbsoluteState ongoing) >))
isCharacterisedBy (presence which isExistenceOf (UrgeToVoidUrineOrFaeces which hasProcessActivity
(ProcessActivity which hasQuantity (Level which hasMagnitude highLevel)))) isCharacterisedBy
(presence which isExistenceOf AbdominalStraining) >)

►Limitations in formalism Æ Workarounds

Ontology Tutorial, © 2005 Univ. of Manchester

Cognitive Complexity

►Natural Language can misdirect


►Formal ontologies require great precision
► Poor debugging tools

►Scale of task

Ontology Tutorial, © 2005 Univ. of Manchester

96
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

#1 Challenge for Ontology Engineering:

Hide the complexity


► Intermediate representations
► OWL is the “Assembly language” for ontology building
►The goal is to make it disappear in tools and environments

► Loosened constraints plus post-hoc normalisation


► Tools

Ontology Tutorial, © 2005 Univ. of Manchester

From this to this…

(SurgicalDeed which MAIN replacing


isCharacterisedBy (performance whichG ACTS_ON heart valve
isEnactmentOf (Dividing whichG <
HAS_ FEATURE induced arrest of heart
playsClinicalRole SurgicalRole
actsSpecificallyOn HeartValve
hasSubprocess (TemporalFeature which <
isSpecificImmediateConsequenceOf VolitionalAct
involves Heart
hasSpecificConsequence (BodyProcess which < (And back again)

isSpecificFunctionOf Heart
hasProcessActivity (ProcessActivity which
hasQuantity (Level which
hasMagnitude undetectedLevel)) >)
hasPathologicalStatus pathological >)>)))
Ontology Tutorial, © 2005 Univ. of Manchester

97
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Outline

►Where do I start?
►Top level ontologies

►The naming of things


►Metadata and provenance
►Mission creep
►Reasoning
►Process, not product
►Innate complexity
►The User
Ontology Tutorial, © 2005 Univ. of Manchester

Ontology Engineering:
Inter-rater variability 1 X X
Headcloth
Cloth X X X
Scarf X
Model Person X X X
Woman X X X X X
Adults X
Standing X X X X X
Background X X
Brown X X X X X
Blue X X X
Chemise X
Dress X X X X
Tunics X
Clothes X
Suitcase X X X X
Luggage X
Attache case X
Brass Instrument X X X
French Horn X
Horn X
Tuba X X

98
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontology Engineering:
Inter-rater variability 2
New codes added per Dr per year

READ CODE Practice A Practice B


Sore Throat Symptom 0.6 117
Visual Acuity 0.4 644
ECG General 2.2 300
Ovary/Broad Ligament Op 7.8 809
Specific Viral Infections 1.4 556
Alcohol Consumption 0 106
H/O Resp Disease 0 26
Full Blood Count 0 838
Ontology Tutorial, © 2005 Univ. of Manchester

Conclusion

► Ontologies are conceptualisation of domains for use on


computers TO DO SOME TASK(S)
► Always ask “What’s it for?”

► Perfection and completeness will seduce you


► Only build what’s useful

► Iterative process more important than static product


► In theory, classifiers make large ontologies possible
► In practice, field is full of confusions in language, notation,
assumptions & goals
► And your users won’t want to know about any of these

Ontology Tutorial, © 2005 Univ. of Manchester

99
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Protégé-OWL part 2
Nick Drummond
Matthew Horridge

100
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

A Practical Introduction to
Ontologies & OWL
Session 2: Defined Classes and Additional
Modelling Constructs in OWL

Nick Drummond & Matthew Horridge

O p enG A LEN

BioHealth
Informatics
Group

Overview
► Defined Classes
► Untangling
► Defining Vegetarian Pizzas
► Union Classes
► Universal Restrictions
► The Open World Assumption
► Closure

Copyright © 2005, The University of Manchester

101
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

CheeseyPizza
► A CheeseyPizza is any pizza that has some cheese
on it

► We would expect then, that some pizzas might be


named pizzas and cheesey pizzas (among other
things later on)

► We can use the reasoner to help us produce this


polyhierarchy without having to assert multiple
parents

Copyright © 2005, The University of Manchester

Creating a CheeseyPizza
► We normally create primitive classes and then migrate them to defined
classes
► All of our defined pizzas will be direct subclasses of Pizza
► So, we create a CheesyPizza Class (do not make it disjoint) and add a
restriction:
“Every CheeseyPizza must have at least one CheeseTopping”
► Classifying shows that we currently don’t have enough information to
do any classification

► We then move the conditions


from the Necessary block to
the Necessary & Sufficient
block which changes the
meaning

► And classify again…

Copyright © 2005, The University of Manchester

102
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Reasoner Classification
► The reasoner has been able to infer that anything that is a Pizza
that has at least one topping from CheeseTopping is a
CheeseyPizza

► The inferred hierarchy is


updated to reflect this and
moved classes are highlighted
in blue

Copyright © 2005, The University of Manchester

Why?
Necessary & Sufficient Conditions
► Each set of necessary & sufficient conditions is an Equivalent
Class
∃ hasTopping
Pizza CheeseTopping

CheeseyPizza

► CheeseyPizza is equivalent to the intersection of Pizza and ∃ hasTopping


CheeseTopping
► Classes, all of whose individuals fit this definition are found to be subclasses of
CheeseyPizza, or are subsumed by CheeseyPizza

Copyright © 2005, The University of Manchester

103
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Untangling

► We can see that certain Pizzas are


now classified under multiple parents

► MargheritaPizza can be found under


both NamedPizza and CheeseyPizza
in the inferred hierarchy

Mission Successful!
Copyright © 2005, The University of Manchester

Untangling
► However, our unclassified version of the ontology is a
simple tree, which is much easier to maintain

► We’ve now got a polyhierarchy without asserting


multiple superclass relationships
► Plus, we also know why certain pizzas have been
classified as CheeseyPizzas

Copyright © 2005, The University of Manchester

104
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Untangling
► We don’t currently have many kinds of primitive pizza
but its easy to see that if we had, it would have been a
substantial task to assert CheeseyPizza as a parent
of lots, if not all, of them

► And then do it all over again for other defined classes


like MeatyPizza or whatever

Copyright © 2005, The University of Manchester

Viewing polyhierarchies

► As we now have
multiple inheritance, the
tree view is less than
helpful in viewing our
“hierarchy”

Copyright © 2005, The University of Manchester

105
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Viewing our Hierarchy


Graphically

Copyright © 2005, The University of Manchester

OWLViz Tab
Show All Classes
View Asserted Model View Inferred Model

Polyhierarchy
tangle

Copyright © 2005, The University of Manchester

106
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Using OWLViz to untangle


► The asserted hierarchy should, ideally, be a tidy tree
of disjoint primitives
► The inferred hierarchy will be tangled
► By switching from the asserted to the inferred
hierarchy, it is easy to see the changes made by the
reasoner
► OWLViz can be used to spot tangles in the primitive
tree and also disjoints (including inherited ones) are
marked (with a ¬)

Copyright © 2005, The University of Manchester

Defined Classes
► We’ve created a Defined Class, CheeseyPizza

► It has a definition. That is at least one Necessary and Sufficient condition


► Classes, all of whose individuals satisfy this definition, can be inferred to be
subclasses
► Therefore, we can use it like a query to “collect” subclasses that satisfy its
conditions
► Reasoners can be used to organise the complexity of our hierarchy

► It’s marked with an equivalence symbol in the interface


► Defined classes are rarely disjoint

Copyright © 2005, The University of Manchester

107
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Exercise 5: Define a MeatyPizza

► Add a CheeseyPizza to your ontology as well

Copyright © 2005, The University of Manchester

Define a Vegetarian Pizza


► Not as easy as it looks…
► Define in words?
► “a pizza with only vegetarian toppings”?
► “a pizza with no meat (or fish) toppings”?
► “a pizza that is not a MeatyPizza”?

► More than one way to model this

We’ll start with the first example

Copyright © 2005, The University of Manchester

108
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Define a Vegetarian Pizza


To be able to define a vegetarian pizza as
a Pizza with only Vegetarian Toppings

we need:

1. To be able to create a vegetarian topping


This requires a Union Class

2. To be able to say “only”


This requires a Universal Restriction

Copyright © 2005, The University of Manchester

Union Classes
► aka “disjunction”
► This OR That OR TheOther
► This That TheOther
B
A B includes all A
individuals of class A and
all individuals from class B
and all individuals in the
overlap (if A and B are not
disjoint)

► Commonly used for:


► Covering axioms
► Closure

Copyright © 2005, The University of Manchester

109
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Covering Axioms

► Covering axiom – a union expression containing several


covering classes

► A covering axiom in the Necessary & Sufficient Conditions of


a class means:
the class cannot contain any instances other than those from
the covering classes

► NB. If the covering classes are subclasses of the covered


class, the covering axiom only needs to be a Necessary
condition – it doesn’t harm to make it Necessary & Sufficient
though – its just redundant

Copyright © 2005, The University of Manchester

Covering PizzaBase
PizzaBase ≡ ThinAndCrispy DeepPan

PizzaBase
► In this example, the class
PizzaBase is covered by
ThinAndCrispy or DeepPan

DeepPan ► “All PizzaBases must be


ThinAndCrispy ThinAndCrispy or DeepPan”

► “There are no other types of


PizzaBase”

Copyright © 2005, The University of Manchester

110
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Exercise 6: Define a
VegetarianTopping

Copyright © 2005, The University of Manchester

Universal Restrictions

► We need to say our VegetarianPizza can only have


toppings that are vegetarian toppings

► We can do this by creating a Universal or


AllValuesFrom restriction

► We’ll first look at an example…

Copyright © 2005, The University of Manchester

111
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Real Italian Pizzas


► “RealItalianPizzas only have bases that are
ThinAndCrispy”

► A Universal Restriction is
added just like an
Existential one, but the
restriction type is different

► For now, this can be primitive – you can make it


defined if you like

Copyright © 2005, The University of Manchester

What does this mean?

► We have created a restriction: ∀ hasBase ThinAndCrispy on


Class RealItalianPizza as a necessary condition
ase
RealItalianPizza hasB ThinAndCrispy
ase
hasB
ase
hasB

hasB
ase

► “If an individual is a member of this class, it is necessary that it


must only have a hasBase relationship with an individual from
the class ThinAndCrispy”

Copyright © 2005, The University of Manchester

112
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

What does this mean?

► We have created a restriction: ∀ hasBase ThinAndCrispy on


Class RealItalianPizza as a necessary condition
ase
DeepPan RealItalianPizza hasB ThinAndCrispy
hasBase
ase
hasB
ase
hasB

hasB
ase

► “No individual of the RealItalianPizza class can have a base


from a class other than ThinAndCrispy”
► NB. DeepPan and ThinAndCrispy are disjoint

Copyright © 2005, The University of Manchester

Warning: Trivial Satisfaction

► If we had not already inherited: ∃ hasBase PizzaBase


from Class Pizza the following could hold
ase
RealItalianPizza hasB ThinAndCrispy
Trivially ase
satisfied hasB

by this ase
hasB
individual
hasB
ase

► “If an individual is a member of this class, it is necessary that it


must only have a hasBase relationship with an individual from
the class ThinAndCrispy, or no hasBase relationship at all”
► Universal Restrictions by themselves do not state “at least one”

Copyright © 2005, The University of Manchester

113
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Exercise 7: Create VegetarianPizza

Copyright © 2005, The University of Manchester

VegetarianPizza Classification

► Nothing classifies under VegetarianPizza

► Actually, there is nothing wrong with our definition of


VegetarianPizza
► It is actually the descriptions of our Pizzas that are incomplete

► The reasoner has not got enough information to infer that any
Pizza is subsumed by VegetarianPizza

► This is because OWL makes the Open World Assumption

Copyright © 2005, The University of Manchester

114
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Open World Assumption


► In a closed world (like DBs), the information we have is
everything
► In an open world, we assume there is always more information
than is stated

► Where a database, for example, returns a negative if it cannot


find some data, the reasoner makes no assumption about the
completeness of the information it is given
► The reasoner cannot determine something does not hold unless it
is explicitly stated in the model

Copyright © 2005, The University of Manchester

Open World Assumption


► Typically we have a pattern of several Existential
restrictions on a single property with different fillers –
like primitive pizzas on hasTopping

► Existential restrictions should be paraphrased by


“amongst other things…”

► Must state that a description is complete


► We need closure for the given property

Copyright © 2005, The University of Manchester

115
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Exercise 8: Closing Pizzas

Copyright © 2005, The University of Manchester

Exercise 9: Your PizzaFinder

► You can now plug your pizza ontology into the


PizzaFinder application

Copyright © 2005, The University of Manchester

116
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Closure
► This is in the form of a Universal Restriction with a
filler that is the Union of the other fillers for that
property

► Closure works along a single property

Copyright © 2005, The University of Manchester

Closure example: MargheritaPizza

All MargheritaPizzas must have:


at least 1 topping from MozzarellaTopping and
at least 1 topping from TomatoTopping and
only toppings from MozzarellaTopping or TomatoTopping

► The last part is paraphrased into “no other toppings”


► The union closes the hasTopping property on MargheritaPizza

Copyright © 2005, The University of Manchester

117
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Summary
You should now be able to:
► Create Defined Classes and classify using a Reasoner
to check expected results
► Create Covering Axioms
► Close Class Descriptions and understand the Open
World Assumption

Copyright © 2005, The University of Manchester

118
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Formal Modelling
Issues
Alan Rector

119
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Formal Modelling

Alan Rector

O p enG A LEN

BioHealth
Informatics
Group 1 Ontology tutorial, © 2005 Univ. of Manchester

The problem

Knowledge is Big, Fractal & Changeable!


But we want to
► Build ontologies cooperatively with different groups
► Extend ontologies smoothly
► Re-use pieces of ontologies
► Build new ontologies on top of old
► Quit starting from scratch

O p enG A LEN

BioHealth
Informatics
Group 2 Ontology tutorial, © 2005 Univ. of Manchester

120
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Assertion:
The arrival of logic-based
ontologies/OWL gives new opportunities
to make ontologies more manable and
modular

► Let the ontology authors


► create discrete modules
► describe the links between modules

► Let the logic reasoner


► Organise the result

O p enG A LEN

BioHealth
Informatics
Group 3 Ontology tutorial, © 2005 Univ. of Manchester

When to use a classifier


1. At author time: As a compiler – Pre-coordination
► Ontologies will be delivered as “pre-coordinated” ontologies to be
used without a reasoner
► To make extensions and additions quick, easy, and responsive,
distri but developments, empower users to make changes
► Part of an ontology life cycle
2. At delivery time: As a service: - Post-coordination
► Many fixed ontologies are too big and too small
► Too big to find things; too small to contain what you need
► Create them on the fly
► Part of an ontology service
3. At application time: as a reasoner - Post-
coordination & inference
O p enG A LEN ► Decision support, query optimisation, schema integration, …, …, …
► Part of a reasoning service
BioHealth
Informatics
Group 4 Ontology tutorial, © 2005 Univ. of Manchester

121
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

When to use a classifier 1:


Pre-coordinated delivery
classifier as compiler
► The life cycle
► Gather requirements, sketch, experiment
► Establish patterns – design a “language”
► Criteria for success: What a subject domain expert can learn in a few days

► Bulk authoring
► Classification
Development & evolution
► Quality assurance

► Commit classifier results to a pre-coordinated ontology & deliver


► Polyhierarchies (Protégé, DAG-Edit, OWL-Lite, RDF(S), Topic Maps, …
► Query and use with you favourite tool

O p enG A LEN

BioHealth
Informatics
Group 5 Ontology tutorial, © 2005 Univ. of Manchester

Commit Results to a Pre-


Coordinated Ontology

Assert
(“Commit”)
changes
inferred by
classifier

O p enG A LEN

BioHealth
Informatics
Group 6 Ontology tutorial, © 2005 Univ. of Manchester

122
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Precoordinated Ontologies

► Author
► Classify
► Export to OWL-Lite or RDF
► Query with RDQL, SparQL, or your favourite
RDF/RDF(S) query tool
► Use as a vocabulary in your database

O p enG A LEN

BioHealth
Informatics
Group 7 Ontology tutorial, © 2005 Univ. of Manchester

Content

Surgical
Procedure
Disease

has diagnosis has treatment Surgical


Patient Disease Procedure
tion
complica
has

O p enG A LEN Disease

BioHealth
Informatics
Group 8 Ontology tutorial, © 2005 Univ. of Manchester

123
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Content
Surgical
Procedure
Disease
Excision

Melanoma Infection

has diagnosis has treatment


Mrs Smith aMelanoma anExcision

tion
complica
has
O p enG A LEN anInfection

BioHealth
Informatics
Group 9 Ontology tutorial, © 2005 Univ. of Manchester

When to use a classifier 2:


Post Coordination
► When the ontology too big – “Lazy classification” on
demand

API
kernel
model

Externally available
resource
O p enG A LEN
Big on the outside: small kernel on the inside
BioHealth
Informatics
Group 10 Ontology tutorial, © 2005 Univ. of Manchester

124
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Often combined with other


services:
Example - the GALEN Server

Client Ontology Services


Multilingual
Module
Multilingual Lexicons
Client

Service API
Ontology
Applications Module
Users Ontologies & Classifier

External Resources &


“Coding” Module
Resource References

Run time classifier


O p enG A LEN

BioHealth
Informatics
Group 11 Ontology tutorial, © 2005 Univ. of Manchester

Logic-based Ontologies:
Conceptual Lego
gene
hand
protein
extremity
body cell

expression

chronic Lung
acute inflammation
infection
abnormal
normal bacterial
deletion polymorphism
ischaemic
O p enG A LEN

BioHealth
Informatics
Group 12 Ontology tutorial, © 2005 Univ. of Manchester

125
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Logic-based Ontologies:
Conceptual Lego
“SNPolymorphism of CFTRGene causing Defect in MembraneTransport of
Chloride Ion causing Increase in Viscosity of Mucus in CysticFibrosis…”

“Hand which is
anatomically
normal”

O p enG A LEN

BioHealth
Informatics
Group 13 Ontology tutorial, © 2005 Univ. of Manchester

Species
Genes

Protein

Function
Gene in humans

Disease
Protein coded by
gene in humans

Logical Constructs Function of


build complex Protein coded by
gene in humans
concepts from Disease caused by abnormality in
modularised Function of
O p enG A LEN Protein coded by
primitives gene in humans
BioHealth
Informatics
Group 14 Ontology tutorial, © 2005 Univ. of Manchester

126
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Normalising (untangling)
Ontologies
Structure
Structure Part-whole Function
Function

Part-whole

O p enG A LEN

BioHealth
Informatics
Group 15 Ontology tutorial, © 2005 Univ. of Manchester

Rationale for Normalisation

► Explicit distinctions between modules


► Primitives are opaque to the reasoner
►Information implicit in primitive names cannot contribute to modularisation
► Primitives are indivisible to both human and reasoner
►Each primitive should represent a single notion
► Therefore, each primitive must belong to exactly one module
►If a primitive belongs to two modules, they are not modular.
►If a primitive belongs to two modules, it probably conflates two notions
► Therefore concentrate on the “primitive skeleton” of the domain
ontology

O p enG A LEN

BioHealth
Informatics
Group 16 Ontology tutorial, © 2005 Univ. of Manchester

127
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Normalisation and
Untangling
Let the reasoner do multiple classification

► Tree
► Everything has just one parent
►A ‘strict hierarchy’

► Directed Acyclic Graph (DAG)


► Things can have multiple parents
►A ‘Polyhierarchy’

► Normalisation
► Separate primitives into disjoint trees
► Link the trees with restrictions
O p enG A LEN
►Fill in the values

BioHealth
Informatics
Group 17 Ontology tutorial, © 2005 Univ. of Manchester

Tables are easier to manage


than DAGs /
Polyhierarchies

…and get the benefit of inference:


Grass and Leafy_plants are both kinds of
Plant
O p enG A LEN

BioHealth
Informatics
Group 18 Ontology tutorial, © 2005 Univ. of Manchester

128
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Remember to add any


closure axioms

Closure
Axiom

Then let the reasoner do the work


O p enG A LEN

BioHealth
Informatics
Group 19 Ontology tutorial, © 2005 Univ. of Manchester

Normalisation:
From Trees to DAGs

„ Before classification „ After classification


„ A tree „ A DAG
„ Directed Acyclic Graph

O p enG A LEN

BioHealth
Informatics
Group 20 Ontology tutorial, © 2005 Univ. of Manchester

129
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Normalisation: Criterion 1
The skeleton should consist
of disjoint trees

► Every primitive concept should have exactly one


primitive parent
► All multiple hierarchies the result of inference by reasoner

O p enG A LEN

BioHealth
Informatics
Group 21 Ontology tutorial, © 2005 Univ. of Manchester

Normalisation Criterion 2:
No hidden changes of meaning

►Each branch should be homogeneous and


logical
(“Aristotelian”)
► Hierarchical principle should be subsumption
►Otherwise we are “lying to the logic”
► The criteria for differentiation should follow consistent principles in
each branch
eg. structure XOR function XOR cause

O p enG A LEN

BioHealth
Informatics
Group 22 Ontology tutorial, © 2005 Univ. of Manchester

130
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

A Non-homogeneous
taxonomy
“On those remote pages it is written that animals are divided into:

a. those that belong to the Emperor


b. embalmed ones
c. those that are trained
d. suckling pigs
e. mermaids
f. fabulous ones
g. stray dogs
h. those that are included in this classification
i. those that tremble as if they were mad
j. innumerable ones
k. those drawn with a very fine camel's hair brush
l. others
m. those that have just broken a flower vase
O p enG A LEN n. those that resemble flies from a distance"
From The Celestial Emporium of Benevolent Knowledge, Borges
BioHealth
Informatics
Group 23 Ontology tutorial, © 2005 Univ. of Manchester

Normalisation Criterion 3
Distinguish “Self-standing” and
“Refining” Concepts

►Self-standing concepts
► Roughly Welty & Guarino’s “sortals”
►person, idea, plant, committee, belief,…

► Refining concepts – depend on self-standing


concepts
►mild|moderate|severe, hot|cold, left|right,…
► Roughly Welty & Guarino’s non-sortals
► Closely related to Smith’s “fiat partitions”
► Usefully thought of as Value Types by engineers
O p enG A LEN ► For us an engineering distinction…
BioHealth
Informatics
Group 24 Ontology tutorial, © 2005 Univ. of Manchester

131
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Normalisation Criterion 3a
Self-standing primitives should be
globally disjoint & open
► Primitives are atomic
► If primitives overlap, the overlap conceals implicit information

► A list of self-standing primitives can never be


guaranteed complete
► How many kinds of person? of plant? of committee? of belief?
► Can’t infer: Parent & ¬sub1 &…& ¬subn-1 Æ subn

► Heuristic:
► Diagnosis by exclusion about self-standing concepts should NOT
O p enG A LEN be part of ‘standard’ ontological reasoning

BioHealth
Informatics
Group 25 Ontology tutorial, © 2005 Univ. of Manchester

Normalisation Criterion 3b
Refining primitives should be locally
disjoint & closed
► Individual values must be disjoint
► but can be hierarchical
►e.g. “very hot”, “moderately severe”

► Each list can be guaranteed to be complete


► Can infer Parent & ¬sub1 &…& ¬subn-1 Æ subn

► Value types themselves need not be disjoint


► “being hot” is not disjoint from “being severe”
►Allowing Valuetypes to overlap is a useful trick, e.g.
►restriction has_state someValuesFrom (severe and hot)
O p enG A LEN

BioHealth
Informatics
Group 26 Ontology tutorial, © 2005 Univ. of Manchester

132
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Normalisation Criterion 4
Axioms

► No axiom should denormalise the ontology


No axiom should imply that a primitive is part of
more than one branch of primitive skeleton
► If all primitives are disjoint, any such axioms will make that
primitive unsatisfiable
►A partial test for normalisation:
►Create random conjunctions of primitives which do not subsume
each other.
►If any are satisfiable, the ontology is not normalised

O p enG A LEN

BioHealth
Informatics
Group 27 Ontology tutorial, © 2005 Univ. of Manchester

Consequences 1

► All self-standing primitives are disjoint


► All multiple classification is inferred
► For any two primitive self-standing classes, either
one subsumes the other or they are disjoint
► Every self standing concept is part of exactly one
primitive branch of the skeleton
► Every self-standing concept has exactly one most
specific primitive ancestor

O p enG A LEN

BioHealth
Informatics
Group 28 Ontology tutorial, © 2005 Univ. of Manchester

133
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Consequences 2

► Primitives introduced by a conjunction of one class and


a boolean combination of zero or more restrictions
► Tree subclass-of Plant and
restriction isMadeOf someValuesFrom Wood
► Resort subclass-of Accommodation
restriction isIntendedFor someValueFrom Holidays

O p enG A LEN

BioHealth
Informatics
Group 29 Ontology tutorial, © 2005 Univ. of Manchester

Consequences 3

►Use of axioms limited (outside of skeleton


construction)
The following are a safe but not exhaustive
guide:
►The right side of subclass axioms limited to
restrictions
►Both sides of disjointness axioms limited to
restrictions
►No equivalence axioms with primitives on either
side
O p enG A LEN

BioHealth
Informatics
Group 30 Ontology tutorial, © 2005 Univ. of Manchester

134
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

A real example:
Build a simple treee

easy to maintain
O p enG A LEN

BioHealth
Informatics
Group 31 Ontology tutorial, © 2005 Univ. of Manchester

Let the classifier organise it

O p enG A LEN

BioHealth
Informatics
Group 32 Ontology tutorial, © 2005 Univ. of Manchester

135
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

If you want more


abstractions,
just add new definitions
(re-use existing data)

O p enG A LEN
“Diseases linked to abnormal
proteins”
BioHealth
Informatics
Group 33 Ontology tutorial, © 2005 Univ. of Manchester

And let the classifier work


again

O p enG A LEN

BioHealth
Informatics
Group 34 Ontology tutorial, © 2005 Univ. of Manchester

136
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

And again – even for a quite


different category

O p enG A LEN
“Diseases linked genes
described in the mouse”
BioHealth
Informatics
Group 35 Ontology tutorial, © 2005 Univ. of Manchester

And let classifier check


consistency
(My first try wasn’t)

O p enG A LEN

BioHealth
Informatics
Group 36 Ontology tutorial, © 2005 Univ. of Manchester

137
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Summary
Why use a Classifier?
► To compose concepts
► Allow conceptual lego
► To manage polyhierarchies
► Adding abstractions (“axes”) as needed
► Normalisation
► Untangling
► labelling of “kinds of is-a”

► To avoid combinatorial explosions


► Keep bicycles from exploding
► To manage context
► Cross species, Cross disciplines, Cross studies
► To check consistency and help users find errors
O p enG A LEN

BioHealth
Informatics
Group 37 Ontology tutorial, © 2005 Univ. of Manchester

Limitations on OWL (1)


► Ontologies are not databases
► About classes / schemas
►Individuals only to define classes
►And that poorly supported by classifiers
► Open World
►Negation as impossibility

► Databases are not ontologies


► About individuals
►Classes only as part of schemas
► Closed world
►Negation as failure
► Variants
►Instance store
►RDF Triple Store
O p enG A LEN

BioHealth
Informatics
Group 38 Ontology tutorial, © 2005 Univ. of Manchester

138
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Limitations on OWL

► Expressivity
► Binary relational
►only two variables
►no way of saying equal
►No way to express “A person who teaches themselves”
“A play directed by its producer”
► Basic patterns
►Supported
►All – Some, All – Only
►Some support
►at least n ; at most n
►Qualified cardinality restrictions
►No support
►Some-All, Some-Some
►All-All*
O p enG A LEN
►“Generally, but subject to exceptions”

BioHealth
Informatics
Group 39 Ontology tutorial, © 2005 Univ. of Manchester

Limitations on OWL

► Metadata and Annotations


► OWL statements are always about “all members of class C…”
►Statements about Class C itself or the implementation of Class C are
metadata or higher order data
► Confused and not well standardised
►Annotation properties in OWL DL are arbitrarily restricted
►Choice between annotations and OWL-Full around an OWL DL core
is unclear
►Experience and use cases needed
►Need experience leading to standards – at least for UK community
►One function potentially growing out of this group

O p enG A LEN

BioHealth
Informatics
Group 40 Ontology tutorial, © 2005 Univ. of Manchester

139
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontology
Applications
Sean Bechhofer
Daniele Turi
Matthew Horridge

140
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Application/Service
Issues
Sean Bechhofer

O p enG A LEN

BioHealth
Informatics
Group

Ontologies in Applications

► If we want to make use of ontologies within


applications, there are a number of things that we
need to consider.
► How are we to make the information in the ontology
available to the application?
► There are no “right” answers to these questions.

141
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Classifier limitations

► Numbers and strings


► Simple concrete data types in spec
► User defined XML data types enmeshed in standards disputes
► No standard classifier deals with numeric ranges
►Although several experimental ones do

► is-part-of and has-part


► Totally doubly-linked structures scale horridly

► Handling of individuals
► Variable with different classifiers
O p enG A LEN
► oneOF works badly with all classifiers at the moment

BioHealth
Informatics
Group 41 Ontology tutorial, © 2005 Univ. of Manchester

Axiom Schemas and Tools

► Many things that would need extra variables can be


expressed as axiom schemas
► All right body parts can only be part of right or midline body parts
► All left body parts can only be part of left or midline body parts

► All X-sided body parts can only be part of X-sided or midline body
parts.
►For small numbers can do by hand
►For large numbers need tool support

O p enG A LEN

BioHealth
Informatics
Group 42 Ontology tutorial, © 2005 Univ. of Manchester

142
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontologies in Applications

► In the past, ontologies have been embedded in the


application
► This introduces problems with:
► Maintenance
► Implementation
► Exchange of terms

► Considering the ontology as a separate resource


provides greater flexibility

What is an Ontology?

► It’s a collection of statements about concepts


► Definitions, relationships etc.

► In the Semantic Web, ontologies are considered as


resources in their own right
► However, they are often implicitly thought of as some
kind of static resource.
► “Ontologies are OWL/RDF files.”

143
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

What is an Ontology?

► Recall that one of the key aspects of OWL is the


provision of semantics that ensure that everyone
interprets descriptions in a consistent manner.
► Considering ontologies as static resources requires
applications to be able to provide implementations of
the language semantics (potentially non-trivial in the
case of OWL).
► Instead we can think of them as dynamic objects
providing services.
► Pushes the onus for implementation on to the service provider.

Grid Aside: Ontologies as


Service

Resources Services

Data Access Dataset Data Service


query/update etc

Ontologies Ontology source Ontology Service


(e.g. RDF file) query/inference etc.

144
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontology Services

► Terminological
► Classification
► Validity and consistency checking
► Intentional Concept Descriptions
► Query
► Linguistic
► Mappings to/from terms
► Extrinsic/Annotation
► Application specific information
► Annotations that are not intensional or part of the intrinsic definition
of the concepts.

Implementations of OWL

► What does it mean to provide implementations of


ontologies?
► What do you want to do with the ontology?
► Read it
► Manipulate it
► Reason about it
► Where does the reasoner go?
►Inside or outside?

145
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Ontology interactions

► Modelling
► Provide data structures that represent OWL ontologies/documents
► Parsing
► Taking some syntactic presentation, e.g. OWL-RDF and converting it to some [useful]
internal data structure

► Serialization
► Producing a syntactic presentation, e.g. OWL-XML from a local data structure

► Manipulation
► Being able to manipulate the underlying objects

► Inference
► Providing a representation that implements/understands the formal semantics of the
language

Implementation Aspects

Format Translation
Simple Editing
Consistency Checking
Parsing Manipulation

Modelling

Serializing Inference

146
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Files/Libraries/Services

► Access to Ontologies via URIs


► Basic representations e.g. RDF/XML

► Code Libraries/APIs
► Code libraries that expose the ontology and associated functionality
via some API.

► Services (Web or otherwise).


► Shared resources.

Layering

► OWL can be layered on RDF.


► This layering provides us with a number of different
options in terms of accessing the ontology.
► Direct access to the RDF triple structures
► E.g. Jena, Sesame, 3store
► May require client applications to “understand” or implement aspects
of the language, e.g. inference.

► Access at a “higher level” using some API.


► OWL-API, Protégé API, Jena Ontology API

147
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Modularisation

► Ontologies are likely to be distributed and modular


► Modularisation is poorly supported in the OWL
specification
► owl:imports
► Simply grabs the RDF graph and includes it.

► Ontology naming is problematic


► There’s no consistent mechanism for referring to context or
collections of axioms.

Inside or Outside?

Application Reasoner

Reasoner sits outside


the Ontology Service.
Service API Requests are answered
w.r.t. the basic facts
Ontology Service asserted in the
ontology.

Ontology Ontology Ontology

148
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Inside or Outside?

Application
Reasoner sits inside the
Ontology Service.
Requests are answered
w.r.t. the semantics.

Service API

Ontology Service Reasoner

Ontology Ontology Ontology

Do You Really Need


Reasoning?
Ontology Service answers
Application requests w.r.t. the basic
facts asserted in the
ontology.

Reasoner used during


Service API design of the ontology,
to ensure a consistent
Ontology Service and coherent hierarchy.

Ontology

Ontology Ontology Taxonomy Reasoner

149
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

COHSE

► We saw COHSE demonstrated yesterday.


► It’s a system that uses an ontology to drive dynamic
linking of documents
► An Ontology Service provides access to the
ontologies.
► Ontologies are represented in OWL
► Third party ontologies (and documents) can be used

COHSE

Ontologies &
Lexicons

Semantics and
world knowledge
Unlinked
Document in Ontology
Service
Reasoner

COHSE
Agent

Annotation
Linked Resource Descriptions
Document out Service

Resource Discovery &


Metadata Management Search Engines

150
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

COHSE

► Ontologies accessed via URLs


► Third party ontologies
► Loaded into an Ontology Service
► Handled using OWL-API library code.

► This then exposes the ontology through a number of API calls


► “Web Service” like.
► May involve the use of a reasoner to, e.g. calculate the taxonomy.
► COHSE doesn’t currently use much reasoning at deployment time, other
than traversing the hierarchy.
► Ontology service reused in other applications

151
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

OWL Instance Store


reasoning over large volumes of
individuals

Daniele Turi

S Bechhofer, I Horrocks, L Li, P Lord, U Sattler

Protégé Tutorial, 30th June 2005

Copyright © 2005, The University of Manchester 1

Scalable Ontological Reasoning

• Semantic web and bioinformatics applications:

• millions of individuals

• Existing reasoners cannot cope

Î instance Store

Copyright © 2005, The University of Manchester 2

152
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Example: Gene Ontology

• 10,000s classes (gene terms)

• 1,000,000s individuals (gene products)

• Example individual: 1433_CANAL


corresponding description:

takesPartIn IntracellularSignallingCascade
and isPartOf Chloroplast
and hasFunction
ProteinDomainSpecificBindingActivity

Copyright © 2005, The University of Manchester 3

Schema v Instance Data


in ontologies

• Classes and properties Schema


• more or less static

• Individuals: dynamic Instance Data


• Frequent updates
• Concurrency
• Persistency
• Security

Copyright © 2005, The University of Manchester 4

153
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Instance Store

z Main observation:
z Reasoning over individuals can often be
reduced to reasoning over their descriptions
(i.e. the classes they belong to)

Îclass-level reasoner + relational database


Schema Instance Data

z Use reasoner only when strictly necessary

z Cache inferred schema information in database

Copyright © 2005, The University of Manchester 5

Instance Store
basic functionality

• Stores assertions
assert(Individual I, Description D)

• Answers retrieval questions


retrieve(Description Q): Set of Individuals

Copyright © 2005, The University of Manchester 6

154
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

OWL
Ontology

(individual, description) Java retrieve(description)


assert
individual 1
individual 2
individual 3

instance
data Database schema
(MySQL,
+
Oracle,
inferred PostgreSQL,
Hypersonic, etc) Class-level Reasoner
schema (FaCT, FaCT++, Racer, etc)
Copyright © 2005, The University of Manchester 7

Relational Database

Cache descriptions used in assertions and queries

z Descriptions table
Oracle
z Assertions table MySQL
z individual Hypersonic
z description id

z Types, Equivalents, Children, Parents tables


z concept
z description id

Copyright © 2005, The University of Manchester 8

155
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Copyright © 2005, The University of Manchester 9

z Relational databases
Æ persistency & scalability

z Java + relational databases


Æ enterprise technology (J2EE)
Æ concurrency & security
Æ robust

Copyright © 2005, The University of Manchester 10

156
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Class-level Reasoner

z Reasoners do not speak OWL, but DIG

z DIG is the de-facto standard XML language for


communicating with Description Logic reasoners

z DIG Interface
z RACER
z FaCT
z FaCT++
z …

Copyright © 2005, The University of Manchester 11

OWL

z OWL Wrapper
z OWL to DIG (and back)
z OWL Abstract Syntax

DIG API

OWL API

Copyright © 2005, The University of Manchester 12

157
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Assertion (example)

jo: Kid and some hasPet Cat

Types Parents
1. Animal 1. CatOwner
2. CatOwner 2. Kid
3. Kid
4. Person Children and Equivalents:
5. PetOwner no new entry
6. Young

Copyright © 2005, The University of Manchester 13

Copyright © 2005, The University of Manchester 14

158
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Retrieval

z Delegate most of work to database

z Worst case: query not equivalent to

z either a class in ontology

z or the conjunction of its parents

Îa subsumption test for each concept in the


following result set (parametric in parents
of query):

Copyright © 2005, The University of Manchester 15

SELECT DISTINCT description FROM Descriptions


WHERE Descriptions.id IN (
SELECT descriptionId FROM Types
WHERE concept = parent-1
INTERSECT
...
INTERSECT
SELECT descriptionId FROM Types
WHERE concept = parent-n
MINUS
SELECT Types.descriptionId FROM Types, Children
WHERE Children.concept = Types.concept
AND Children.descriptionId = id )

Copyright © 2005, The University of Manchester 16

159
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Copyright © 2005, The University of Manchester 17

Work in Progress

• No relation between individual:


usedBy
1433_CANAL daniele_turi

• Solution: precompletion
reduces most inferences to inferences about
classes
• Core precompletion component ready and
under testing

Copyright © 2005, The University of Manchester 18

160
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Conclusions

Appropriate technologies for appropriate tasks


• Reasoner only when strictly necessary
• Database
• scalability, performance (set operations)
• Java + database
• EJB
• concurrency
• security

Copyright © 2005, The University of Manchester 19

Related Work

• “Loading data into description reasoners”


(Borgida and Brachman ’93)

• Parka system (University of Maryland ’95)

• “Semantic indexing” (Schmiedel ’94)

Copyright © 2005, The University of Manchester 20

161
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

System details

http://instancestore.man.ac.uk

Code available from SourceForge

Copyright © 2005, The University of Manchester 21

Demo

• Enriched Gene Ontology (GO)


• 25,180 classes
• 4 properties

• Instance data mined from GO SWISS-PROT


database (in June 03)
• 653,762 individuals
• involving 48,584 distinct descriptions

Copyright © 2005, The University of Manchester 22

162
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Intelligent Curation
Using Ontologies

K.Wolstencroft

O p enG A LEN

BioHealth
Informatics
Group

Introduction

► Developing an automated system for extracting and


classifying proteins from newly sequenced genomes

1. Background
2. Architecture
3. Advantages

163
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Motivation

► Genome sequencing techniques greatly improved


► More whole genomes are being sequenced quickly -
lots of data being generated
► Without analysis and classification – sequences are
simply a series of letters
► Therefore, data analysis is now the rate-limiting step

Why Classify?

► Classification and curation of a genome is the first step


in understanding the processes and functions
happening in an organism
► Classification enables comparative genomic studies -
what is already known in other organisms
► The similarities and differences between processes
and functions in related organisms often provide the
greatest insight into the biology

164
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Background
DNA to Proteins

Genome sequencing – produces DNA sequences

► DNA – blueprint of an organism


► DNA encodes complex molecules – mostly proteins

► Proteins are the functional molecules of a cell

Proteins

► Complex molecules constructed from sequences of


amino acids
► 20 different amino acids with different chemical
properties

165
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Proteins
Primary Structure

► Amino acid sequences can be represented as a series


of single letters

>1A5Y:_ PROTEIN TYROSINE PHOSPHATASE 1B


MEMEKEFEQIDKSGSWAAIYQDIRHEASDFPCRVAKLPKNKNR
NRYRDVSPFDHSRIKLHQEDNDYINASLIKMEEAQRSYILTQGP
LPNTCGHFWEMVWEQKSRGVVMLNRVMEKGSLKCAQYWPQ
KEEKEMIFEDTNLKLTLISEDIKSYYTVRQLELENLTTQETREILH
FHYTTWPDFGVPESPASFLNFLFKVRESGSLSPEHGPVVVHXS
AGIGRSGTFCLADTCLLLMDKRKDPSSVDIKKVLLDMRKFRMG
LIATAEQLRFSYLAVIEGAKFIMGDSSVQDQWKELSHEDLEPPP
EHIPPPPRPPKRILEPHNGKCREFFPN

Proteins
Tertiary Structure

► Sequence determines structure

166
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Searching for Features

► The relationship between amino acid sequence and


eventual protein structure means that we can search
for distinct structural (and functional) domains within
the sequence
► Domains could be several amino acids long – or could
span most of the protein

Example

A search of the linear sequence of protein tyrosine phosphatase type


K – identified 9 functional domains

>uniprot|Q15262|PTPK_HUMAN Receptor-type protein-tyrosine phosphatase kappa precursor (EC 3.1.3.48) (R-


PTP-kappa).
MDTTAAAALPAFVALLLLSPWPLLGSAQGQFSAGGCTFDDGPGACDYHQDLYDDFEWVHV
SAQEPHYLPPEMPQGSYMIVDSSDHDPGEKARLQLPTMKENDTHCIDFSYLLYSQKGLNP
GTLNILVRVNKGPLANPIWNVTGFTGRDWLRAELAVSSFWPNEYQVIFEAEVSGGRSGYI
AIDDIQVLSYPCDKSPHFLRLGDVEVNAGQNATFQCIATGRDAVHNKLWLQRRNGEDIPV………..

167
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Human Expert Annotation

► Bioinformaticians use a series of tools to identify functional


domains
Similarity searching, domain/motif identification
Tools include – BLAST / INTERPRO
► Tools simply show presence of domains
► Use expert knowledge to classify proteins according to domain
arrangements
Presence / order / number of each important

► Can an ontology be used to capture this knowledge to the


standard of a human annotator?

Protein Family
Classification

► Proteins divided into broad functional classes “Protein


Families”
► Often diagnostic domains/motif signify family
membership
► Initial Study focuses on the protein phosphatase family

168
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

The Protein Phosphatases

► large superfamily of proteins – involved in the removal


of phosphate groups from molecules
► Important proteins in almost all cellular processes
► Involved in diseases – diabetes and cancer
► human phosphatases well characterised

Characterisation allows
classification

► Diagnostic phosphatase domains/motifs – sufficient for


membership of the protein phosphatase superfamily
► Other motifs determine a protein’s place within the
family
► This human expert knowledge can be captured and
incorporated into the model if the domain
organisations are represented in a formal DL OWL
ontology

169
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Protein Functional Domains

Andersen et al (2001) Mol. Cell. Biol. 21 7117-36

Determining Class
Definitions

R2A
- Contains 2 protein tyrosine phosphatase domains
- Contains 1 transmembrane domain
- Contains 4 fibronectin domains
- Contains 1 immunoglobulin domain
- Contains 1 MAM domain
- Contains 1 cadherin-like domain

170
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Protégé OWL Modelling

Requirements

► Extract phosphatase sequences from rest of protein


sequences from a whole genome
► Identify the domains present in each
► Compare these sequences to the formal ontology
descriptions
► Classify each protein instance to a place in the
hierarchy

171
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Technology

OWL DL
ontology

Raw protein myGrid Instance Classified Protein


sequences Workflow Store Phosphatases

Reasoner
(racer)

myGrid Workflow

► extract sequences from whole genome


► perform simple filtering – patmatdb
► performs InterproScan to determine domain
architecture
► transform the InterproScan results into abstract OWL
instance descriptions

172
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

myGrid Workflow

InterproScan Results

173
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Conversion to abstract
OWL format

restriction(<http://www.owl-
ontologies.com/unnamed.owl#containsDomainIPR000
340> cardinality(1))
restriction(<http://www.owl-
ontologies.com/unnamed.owl#containsDomainIPR001
763> cardinality(1))
restriction(<http://www.owl-
ontologies.com/unnamed.owl#containsDomainIPR000
387> cardinality(1))

Instance Store

► Instance Store enables reasoning over individuals


► Can support much higher numbers of individuals

► OWL ontology is loaded into the instance store


► A DL reasoner (racer) is used to compare individuals
to the OWL ontology definitions

174
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Instance Store

Example Instances

► Protein Individual ► Ontology Definition of Dual


Dual Specificity Specificity Phosphatase
Phosphatase DUSE containsDomain IPR000340
restriction(<http://www.owl- Necessary and Sufficient for
ontologies.com/unnamed.owl# class membership
containsDomainIPR000340> Also inherits
cardinality(1))
containsDomain IPR000387 from
restriction(<http://www.owl- Parent Class PTP
ontologies.com/unnamed.owl#
containsDomainIPR000387>
cardinality(1))

175
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

So Far…..

► Human phosphatases have been classified using the


system
► The ontology classification performed equally well as
expert classification
► The ontology system refined classification
- DUSC contains zinc finger domain
Characterised and conserved – but not in classification
- DUSA contains a disintegrin domain
previously uncharacterised – evolutionarily conserved

Aspergillus fumigatus

► Phosphatase compliment very different from human


>100 human <50 A.fumigatus
► Whole subfamilies ‘missing’
Different fungi-specific phosphorylation pathways?
No requirement for tissue-specific variations?
► Novel serine/threonine phosphatase with homeobox
conserved in aspergillus and closely related species, but not in
any other

176
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Conclusions

► Using ontology allows automated classification to


reach the standard of human expert annotation
► Reasoning capabilities allow interpretation of domain
organisation
► Produces interesting biological questions
► Allows fast, efficient comparative genomics studies
► System currently describes protein phosphatases -
but possible to expand to other protein families

Acknowledgements

Group : myGrid
PhD Supervisors: Andy Brass, Robert Stevens
Phosphatase Biologist: Lydia Tabernero
Ontogrid and NIBHI

177
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Open Discussion
Q&A
Panel

Questions:

Possible Topics:
- Current (known) limitations of OWL
- Modularisation of ontologies
- Ontological Patterns
- Protégé-OWL UI questions & feedback
(shortcuts, debugging, future development)

178
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Appendices
Terminology
Syntax
Resources
Application Overviews

179
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Appendix A: Terminology
“Class” ≈ “Concept” ≈ “Category” ≈ “Type”

“Individual” ≈ “Instance”

“Property” ≈ “Slot” ≈ “Relation” ≈ “Relationtype” ≈ “Attribute” ≈ Semantic link type” ≈ “Role”

NB be careful about “role”


• Means “property” in DL-speak
• Means “role played” in most ontologies
– E.g. “doctor_role”, “student role” …

“Entity” ≈ “Object” ≈ “Resource”, Class or Individual

180
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Appendix B: Syntax
Three official syntaxes + Protégé-OWL syntax:

Abstract syntax-- - Specific to OWL

N3 ---------------- - OWL & RDF


- used in all SWBP documents

XML/RDF ------- - very verbose, not for human consumption

Protégé-OWL---- - Compact, derived from DL syntax

Alternatives:

“German DL”---- - very concise, symbolic

First order logic - - complete but more powerful than DL

Paraphrase-------- - Verbose but precise

Protégé/OWL can generate all syntaxes except German

Simplified abstract syntax


someValuesFrom some ∃
allValuesFrom only ∀
intersectionOf AND П
unionOf OR
complementOf NOT ¬
complete definition necessary & sufficient
partial description necessary

181
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester
Symbol Meaning OWL
∃ “some” someValuesFrom
∃ hasCause X “hasCause SOME X” hasCause someValuesFrom(X)
∀ “only” allValuesFrom
∀ hasCause X “hasCause ONLY X” hasCause allValuesFrom(X)
П “and” intersectionOf
“or” unionOf
≡ “are necessary & sufficient equivalentClass
conditions for”
“necessarily implies” subclassOf

182
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Appendix C: Resources
W3C OWL Pages – http://www.w3.org/2004/OWL/
Including specs, pointers to other material, including applications and related projects

Protégé – http://protege.stanford.edu
See also the WIKI available at http://protege.cim3.net/cgi-bin/wiki.pl

Especially useful for the mailing list – subscribe to Protégé-OWL for support and
discussion

Protégé-OWL homepage - http://protege.stanford.edu/plugins/owl/ includes most


recent versions of the rapidly changing software, documentation, papers and details of
the Java API as well as examples of producing plugins

CO-ODE – http://www.co-ode.org
Plugins and other resources/materials available, including:
• OWLViz - graph view of the ontology
• Protégé Wizards- several basic wizards to automate some of the class creation process
• Class Description Display - A floating dialog that can be invoked to display various renderings the
selected OWL Class
• OWLDoc - Generates JavaDoc style HTML docs for your OWL ontology
• Abstract Syntax Package - Viewing and Exporting OWL Ontologies in the OWL Abstract Syntax.
• RDFS Class Hierarchy Exporter - Export a 'bare bones' RDFS Class Hierarchy with optional
annotations.

Semantic Web Best Practices Working Group


Producing documentation on ontology quality and other aspects such as identifying
Design Patterns

W3C Documentation - http://www.w3.org/2001/sw/BestPractices/

WIKI - http://esw.w3.org/topic/FrontPage

AKT applications
A good source of example applications, including ArtEquAkt, Magpie and CS AKTiveSpace
and technologies like the 3store

http://www.aktors.org/technologies/

183
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Appendix D: Application Overviews


Manchester Pizza Finder
The Pizza Finder uses a remote Pizza Ontology, and a remote Description Logic (DL) reasoner to
dynamically generate pizza toppings and pizza topping categories. The user can include toppings that they
would like on their pizza and exclude any toppings that they do not want on their pizza. The description
logic reasoner is used to determine if the choices that have been made contradict each other - for
example, choosing to include Jalapeno Pepper topping, but choosing to exclude all hot toppings - the
choices are automatically adjusted to modify any decisions that could potentially lead to contradictions
and inconsistent results.

For more information please visit: http://www.co-ode.org/downloads/pizzafinder/

184
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

COHSE

The aim of this project was to research into methods to improve significantly the quality,
consistency and breadth of linking of WWW documents at retrieval time (as readers
browse the documents) and authoring time (as authors create the documents). It has
produced a COHSE (Conceptual Open Hypermedia Services Environment) using three
leading-edge technologies:

• an ontological reasoning service which is used to represent a sophisticated conceptual model of


document terms and their relationships;
• a Web-based open hypermedia link service that can offer a range of different link-providing
facilities in a scalable and non-intrusive fashion;
• the integration of the ontology service and the open hypermedia link service to form a conceptual
hypermedia system to enable documents to be linked via metadata describing their contents;

Figure 1 illustrates how all the COHSE software fits together. Ontologies can be created in any DAML
enabled ontology constructor, although we used the OILEd ontology editor throughout this project. The
constructed ontologies (1) are loaded by the Ontology Service (2) which can answer queries about it (e.g.
What concept is described by the term 'block'? What are the super-concepts of 'data type'?). Annotations
are stored in a database and the Annotation Service adds and retrieves annotations from it (3).

Annotations are constructed using the Mozilla Annotator tool which communicates with the Ontology
Service (4) and Annotation Service (5). To assist in annotating complex concepts, a concept browser (a cut
down version of OILed) can be used which loads an ontology (10) and then communicates with the
annotator (9).

COHSE linking can be applied through the Mozilla DLRS tool or the browser independent proxy solution.
Both tools communicate with the Ontology Service (4 & 6) and the Annotation Service (5 & 7). The Mozilla
DLRS tool dynamically updates the Web page it has loaded from the Web (8.1). The proxy downloads the
Web page (8.2), decorates it with COHSE linking, and then returns it to the browser (11).

• For more information please visit: http://cohse.semanticweb.org/

185
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Instance Store

The instance Store (iS) is a Java application for performing efficient and scalable
Description Logic (DL) reasoning over individuals.

DL reasoning over individuals is an important aspect of the vision behind the Semantic
Web and it is crucial in applications of ontologies in areas such as bioinformatics (gene
description) and web service discovery. This also poses new challenges for ontological
reasoning. Firstly, applications might now require vast volumes of individuals exceeding
the capabilities of existing reasoners. Secondly, while one can assume that changes in
the terminological part of an ontology are relatively infrequent, various scenarios, such
as web service discovery, postulate dynamic, frequent and, possibly, concurrent
modification of the information related to the individuals in ontologies.

The iS system tackles this problem by applying a well-known idea in knowledge


representation, namely supporting reasoning by means of databases. Assertions over
individuals are stored in a database, together with information inferred using a DL
reasoner over the position in the ontological taxonomy of their corresponding
descriptions. This allows to reduce the amount of reasoning to pure terminological
reasoning, while maintaining soundness and completeness (provided that no relation
between individuals occurs). Moreover, it allows to deploy iS using enterprise
technologies such as Enterprise Java Beans, thus handling the delicate concurrency,
security, and transaction management issues using robust technologies.

More information is available at: http://instancestore.man.ac.uk/

186
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester
Intelligent Curation Through Ontology

Classification of proteins is a central step in understanding the molecular biology of an


organism. Sequencing is simply a first step in revealing the molecular machinery of a cell.
Techniques involved in sequencing, especially the high throughput sequencing of whole
genomes, have improved dramatically in recent years. Consequently, analysis and
annotation of the data is now the rate-limiting step.

Approaches to analysing the large data sets produced in genome sequencing projects
have ranged from the ‘gold-standard’ of human expert annotation to the simple
automation of bioinformatics tools. Expert annotation enables protein classification to be
driven by community knowledge and can add rich, accurate information to data, but it is
a slow process. Automated annotation methods are often much faster, but generate a
much higher degree of errors.

To bring automated classification up to the standard of expert annotation, we use a


description logic ontology. The use of an ontology incorporates community knowledge
into the automatic curation process.

The automated classification tool uses myGrid workflows to extract and describe the
properties of individual proteins. By comparing these individual descriptions to DL
ontology class definitions, DL reasoners are able to classify each protein using the
knowledge from human experts.

187
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Appendix E: Hands-On – Protégé-OWL part 3

The following slides are used to demonstrate several issues around modelling in OWL and
are provided as additional material to support the further exercises in the handouts. It is
unlikely that this material will be presented, unless time permits.

188
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

A Practical Introduction to
Ontologies & OWL
Additional Exercises: Common
Errors and how to correct them

Nick Drummond & Matthew Horridge

O p enG A LEN

BioHealth
Informatics
Group 1 Copyright © 2005, The University of Manchester

Overview
► Elephant Traps
► Property Domain & Range
► Property Characteristics – functional properties
► Intersection

► Negation in OWL – ComplementOf


► Class expressions test

► Q&A – 20 mins

2 Copyright © 2005, The University of Manchester

189
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Elephant Traps

Common Errors in OWL generally include:


► Disjoint misuse – often used on defined classes by
mistake
► Confusing AllValueFrom and SomeValuesFrom –
some doesn’t imply only, and only doesn’t imply some
► Forgetting to close class descriptions
► Incorrect expectations of Domain and Range defined
for properties
► Incorrect use of Functional Properties
► Using intersection (AND) instead of union (OR), where
the members of the intersection are disjoint
3 Copyright © 2005, The University of Manchester

Property Domain & Range


► If a relation is:
subject_individual Æ hasProperty Æ object_individual
► The domain is the class of the subject individual
► The range is the class of the object individual (or a datatype if
hasProperty is a Datatype Property)

rty
rope
hasP
DomainClass rty RangeClass
rope
hasP
rty
rope
hasP

4 Copyright © 2005, The University of Manchester

190
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Setting a Domain & Range


► Setting a domain & range on a property has global implications
► Be careful not to over-constrain your ontology
► The domain & range can be set in the Properties Tab – just click
Add named class(es)
eg. Setting a domain of Pizza on hasBase

► Using a Universal Restriction on a Class is like setting a local


range

5 Copyright © 2005, The University of Manchester

Semantics of Domain & Range

► Domain and Range are not used to restrict the interface


► They are used by the reasoner to infer additional information
about individuals
► Any individual that uses a property with a domain set can be
inferred to be a member of the domain class
► the same holds for range

6 Copyright © 2005, The University of Manchester

191
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Exercise 10: IceCream and Domain

7 Copyright © 2005, The University of Manchester

Trap: Property Domain reclassification

► Any Class that uses a property with a domain set in an


existential restriction will be inferred to be a subclass
of the domain class
► This is because all individuals in this class must have
at least one relationship using this property –
therefore, all members of this class must be members
of the domain class
► If these classes are disjoint with the domain then they
will come out inconsistent – another reason to check
all your disjoints are set

► The same does not apply to range


8 Copyright © 2005, The University of Manchester

192
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Property Characteristics
► Inverses – if property p has inverse property q, and p relates A-B,
then it can be inferred q relates B-A
► Functional – if property p relates A-B then all relations along p relate
A-B (m..1 relation)
(B could also be a datatype value)
► Inverse Functional – the inverse of the property is functional
► Symmetric – if a property relates A-B then it also relates B-A
► Transitive – if a property relates A-B and B-C then it relates A-C

9 Copyright © 2005, The University of Manchester

Functional Properties
► An individual can only have relationships with at most one other
individual along a functional property
eg Setting hasBase to Functional means:
“Every Pizza can have at most one PizzaBase”
Description of DoubleBasePizza:

► The reasoner finds this inconsistent


► It looks like the interface is warning us that we can’t use the property
more than once, but actually…

10 Copyright © 2005, The University of Manchester

193
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Exercise 11: Functional Properties

11 Copyright © 2005, The University of Manchester

Trap: Functional Property Misuse

► If a property is functional and is used in several


Existential restrictions on a class, the reasoner will
infer that the filler classes must overlap

► If any of the fillers are disjoint from each other then


this cannot be the case and therefore causes an
inconsistency

► If they are not, no inconsistency is found

12 Copyright © 2005, The University of Manchester

194
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Intersection Classes
► aka “conjunction”
► This AND That AND TheOther
► This That TheOther
► Each class description or definition is an intersection of the conditions in
it
► CheeseyPizza ≡ Pizza and ∃ hasTopping CheeseTopping
∃ hasTopping
Pizza CheeseTopping

CheeseyPizza

13 Copyright © 2005, The University of Manchester

Intersection
=

► People often ask what the difference is between using


2 existential restrictions (which are, by default, in an
intersection in the interface) and using a single
restriction with a filler containing both the classes

14 Copyright © 2005, The University of Manchester

195
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Trap: Intersection

There are 2 problems:


1. Often we paraphrase “AND” when we logically mean “OR”
The filler “CheeseTopping AND MeatTopping” cannot contain any
individuals as they are disjoint, and is therefore inconsistent
2. If we correct this to OR, it is still wrong as we’ve got a class description
that can be fulfilled by a Pizza with a single topping – either Cheese or
Meat. If we had 2 existential restrictions, there would have to be at least
2 (disjoint) toppings

15 Copyright © 2005, The University of Manchester

ComplementOf Classes
► aka “Negation” “Not”
► Not Something
► ¬ Something

owl:Thing
A

All individuals in
here are members
of ¬A

16 Copyright © 2005, The University of Manchester

196
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

ComplementOf Classes
► Commonly used to model 3 things:
► A is any C that is not B

► A does not have some relation with B

► A only has relations with things that are not B

17 Copyright © 2005, The University of Manchester

Exercise 12: Variations of VeggiePizza

► The ontology used in this example will be available at:


www.co-ode.org/ontologies/brokenPizza/

18 Copyright © 2005, The University of Manchester

197
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Summary
You should now be able to:
► Avoid some of the more common modelling errors in
OWL
► Appreciate that all OWL statements are reasoned with
and many mistakes are only caught because of
disjoints
► Understand different characteristics of properties
► Spot various similar looking statements in OWL are
very different

19 Copyright © 2005, The University of Manchester

198
A Practical Introduction to Ontologies & OWL © 2005 The University of Manchester

Acknowledgements & Contacts:


Thanks to the following people for putting this tutorial together, either physically or
mentally.

Speakers:
Robert Stevens – BioInformatics – robert.stevens@cs.man.ac.uk

Alan Rector – Medical Informatics

Sean Bechhofer – OntoGrid, COHSE

Matthew Horridge – CO-ODE – matthew.horridge@cs.man.ac.uk

Nick Drummond – CO-ODE – nick.drummond@cs.man.ac.uk

Jeremy Rogers – OpenGALEN – Jeremy.e.rogers@manchester.ac.uk

Daniele Turi – IMG, Instance Store

Katy Wolstencroft – Phosphabase, mygrid

Other Contributors:
Holger Knublauch & the Protégé team – Protégé-OWL

Harith Alani, Nick Gibbins and Nigel Shadbolt – AKT

Hai Wang and Julian Seidenberg - HyOntUse

Also:
Georgina Moulton – NIBHI - georgina.moulton@manchester.ac.uk

Sam Creighton and Karon Mee – Computer Science

Tracy Harrison and Kath Melville – MBS

Susan House & Lynn Howarth – Computer Science

199

You might also like