building ontologies from the ground up when users set out to model their professional activity

128
1 Building Ontologies from the Ground Up When users set out to model their professional activity Mark A. Musen Professor of Medicine and Computer Science Stanford University v 1.00

Upload: emele

Post on 03-Feb-2016

30 views

Category:

Documents


0 download

DESCRIPTION

Building Ontologies from the Ground Up When users set out to model their professional activity. Mark A. Musen Professor of Medicine and Computer Science Stanford University. v 1.00. “An ontology is a specification of a conceptualization” (T. Gruber). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Building Ontologies  from the Ground Up   When users set out to model their professional activity

1

Building Ontologies from the Ground Up

When users set out to model their professional activity

Mark A. MusenProfessor of Medicine and Computer Science

Stanford University

v 1.00

Page 2: Building Ontologies  from the Ground Up   When users set out to model their professional activity

2

“An ontology is a specification of a conceptualization” (T. Gruber)

• A conceptualization is the way we think about a domain

• A specification provides a formal way of writing it down

Page 3: Building Ontologies  from the Ground Up   When users set out to model their professional activity

3

Supreme genus: SUBSTANCE

Subordinate genera: BODY SPIRIT

Differentiae: material immaterial

Differentiae: animate inanimate

Differentiae: sensitive insensitive

Subordinate genera: LIVING MINERAL

Proximate genera: ANIMAL PLANT

Species: HUMAN BEAST

Differentiae: rational irrational

Individuals: Socrates Plato Aristotle …

Porphyry’s depiction of Aristotle’s Categories

Page 4: Building Ontologies  from the Ground Up   When users set out to model their professional activity

4

Page 5: Building Ontologies  from the Ground Up   When users set out to model their professional activity

5

Creating Ontologies in Machine-Processable Form

• Provides a mechanism for developers to codify salient distinctions about the world or some application area

• Provides a structure for knowledge bases that can enable– Information retrieval

– Information integration

– Automated translation

– Decision support

Page 6: Building Ontologies  from the Ground Up   When users set out to model their professional activity

6

The New Philosophers

• Categorizing “what exists” in machine-understandable form

• Providing a structure that enables– Developers to locate and update relevant

descriptions – Computers to infer relationships and properties

• Creating new abstractions to facilitate the creation of this structure

Page 7: Building Ontologies  from the Ground Up   When users set out to model their professional activity

7

Page 8: Building Ontologies  from the Ground Up   When users set out to model their professional activity

8

Part of the CYC Upper Ontology

Page 9: Building Ontologies  from the Ground Up   When users set out to model their professional activity

9

There is a misconception …

• That people building ontologies are all well versed in metaphysics, computer science, knowledge representation, and the content domain

• That ontologies in the real world are as “clean” as SUMO, DOLCE, and other upper-level ontologies

• That most people who are creating ontologies understand all the ramifications of what they are doing!

Page 10: Building Ontologies  from the Ground Up   When users set out to model their professional activity

10

Lots of ontology builders are not very good philosophers

• Nearly always, ontologies are created to address pressing professional needs

• The people who have the most insight into professional knowledge may have little appreciation for metaphysics, principles of knowledge representation, or computational logic

• There simply aren’t enough good philosophers to go around

Page 11: Building Ontologies  from the Ground Up   When users set out to model their professional activity

11

Practical Problems

BioInformatics

Page 12: Building Ontologies  from the Ground Up   When users set out to model their professional activity

12

The pressing need to standardize the names of human genes

Page 13: Building Ontologies  from the Ground Up   When users set out to model their professional activity

13

But the human genome is only part of the problem …

• Scientist maintain huge databases of gene sequences and gene expression for a wide range of “model organisms” (e.g., mouse, rat, yeast, fruit fly, round worm, slime mold)

• Database entries are annotated with the entries such as the name of a gene, the function of the gene, and so on

• How do you ensure uniformity in the nature of these annotations?

Page 14: Building Ontologies  from the Ground Up   When users set out to model their professional activity

14

Gene Ontology Consortium

• Founded in 1998 as a collaboration among scientists responsible for developing different databases of genomic data for model organisms (fruit fly, yeast, mouse)

• Now, essentially all developers of all model-organism databases participate

• Goal: To produce a dynamic, controlled vocabulary that can be applied to all organism databases even as knowledge of gene and protein roles in cells is accumulating and changing

Page 15: Building Ontologies  from the Ground Up   When users set out to model their professional activity

15

Gene Ontology (GO)

• Comprises three independent “ontologies”

– molecular function of gene products

– cellular component of gene products

– biological process representing the gene product’s higher order role.

• Uses these terms as attributes of gene products in the collaborating databases (gene product associations)

• Allows queries across databases using GO terms, providing linkage of biological information across species

Page 16: Building Ontologies  from the Ground Up   When users set out to model their professional activity

16

GO = Three OntologiesGO = Three Ontologies

• Molecular Function – elemental activity or task

– example: DNA binding

• Cellular Component – location or complex

– example: cell nucleus

• Biological Process – goal or objective within cell

– example: secretion

Page 17: Building Ontologies  from the Ground Up   When users set out to model their professional activity

17

Page 18: Building Ontologies  from the Ground Up   When users set out to model their professional activity

18

GO has been wildly successful!!

• Dozens of biologists around the world contribute to GO on a regular basis

• The ontology is updated every 30 minutes!

• It’s now impossible to work in most areas of computational biology without making use of GO terms

Page 19: Building Ontologies  from the Ground Up   When users set out to model their professional activity

19

But GO has real problems …

• Ontologies are represented in an idiosyncratic format that is not compatible with standard knowledge-representation systems

• The format is based on directed acyclic graphs of concepts, without the general ability to specify machine interpretable properties of concepts or definitions of concepts

• Because of the informal knowledge-representation system, lots of errors have crept into GO– Terms that are duplicated in different places– Terms with no superclasses– Uncertain relationships between terms

Page 20: Building Ontologies  from the Ground Up   When users set out to model their professional activity

20

Page 21: Building Ontologies  from the Ground Up   When users set out to model their professional activity

21

Tension in the GO Community

• Biologists around the world with pressing needs to integrate research databases work together to add terms to GO nearly continuously– Using an impoverished, nonstandard knowledge-

representation system– Using no standards to assure uniform modeling

conventions from one part of GO to another

• Computer scientists bemoan all this ad-hoc-ery and condemn GO as a hack that will become increasingly unusable and unmaintainable

Page 22: Building Ontologies  from the Ground Up   When users set out to model their professional activity

22

The Capulets and MontaguesA plague on both your houses?

Professor Carole GobleUniversity of Manchester, UK

Warning: This talk contains sweeping generalisations

A wonderful keynote talk from the recent meeting on Standards and Ontologies for Functional Genomics

Page 23: Building Ontologies  from the Ground Up   When users set out to model their professional activity

23

PrologueTwo households, both alike in dignity,In fair genomics, where we lay our scene,(One, comforted by its logic’s rigour,Claims ontology for the realm of pure,The other, with blessed scientist’s vigour,Acts hastily on models that endure),From ancient grudge break to new mutiny,When “being” drives a fly-man to blaspheme.From forth the fatal loins of these two foesResearchers to unlock the book of life;Whole misadventured piteous overthrowsCan with their work bury their clans’ strife.The fruitful passage of their GO-mark'd love,And the continuance of their studies sage,Which, united, yield ontologies undreamed-of,Is now the hours' traffic of our stage;The which if you with patient ears attend,What here shall miss, our toil shall strive to mend.

Based on an idea by Shakespeare

Carole Goble

Page 24: Building Ontologies  from the Ground Up   When users set out to model their professional activity

24

The Montagues

Computer Science, Knowledge engineering, AILogic and Languages

TheoryTop down, well-behaved neatness

Generic and lots of toysMethodologies & patterns

Tools and standardsTechnology pushAcademic pursuit

One, comforted by its logic’s rigour,

Claims ontology for the realm of pure

Carole Goble

Page 25: Building Ontologies  from the Ground Up   When users set out to model their professional activity

25

The Capulets

Life ScientistsPractice

Bottom up, real-worldSpecific and many of them

Methodologies, community practiceTools and standards

Application pullPractical pursuit – build ‘n’ use it

The other, with blessed scientist’s vigour,

Acts hastily on models that endure

Carole Goble

Page 26: Building Ontologies  from the Ground Up   When users set out to model their professional activity

26

The Philosophers

PhilosophersTheoryTruth

Generic – the one true ontology?Methodologies, patterns & foundational ontologies

Not really into tools No push or pull

Academic pursuit

One, comforted by its logic’s rigour,

Claims ontology for the realm of pure

Carole Goble

Page 27: Building Ontologies  from the Ground Up   When users set out to model their professional activity

27

Pragm

atists

Aesthetics

Philosophers

Life ScientistsCapulets

KRMontagues

A means to an endContent providers

Theo

retic

ians

The endMechanism providers

Endurants, Perdurants,Being, Substance, Event

Spi

ritua

l gui

des

Carole Goble

Page 28: Building Ontologies  from the Ground Up   When users set out to model their professional activity

28

The Princes of Genomics

Rebellious subjects, enemies to peace,Profaners of this neighbour-stained steel,--Will they not hear? What, ho! you men, you beasts,That quench the fire of your pernicious rageWith purple fountains issuing from your veins,On pain of torture, from those bloody handsThrow your mistemper'd weapons to the ground,And hear the sentence of your moved prince.Three civil brawls, bred of an airy word,By thee, old Capulet, and Montague,Have thrice disturb'd the quiet of our streets,And made genomics's ancient citizensCast by their grave beseeming ornaments,To wield old partisans, in hands as old,Canker'd with peace, to part your canker'd hate:

Carole Goble

Page 29: Building Ontologies  from the Ground Up   When users set out to model their professional activity

29

A tragedy?

As in Romeo and Juliette, the threats are political

and sociological

Page 30: Building Ontologies  from the Ground Up   When users set out to model their professional activity

30

Creating ontologies has become a widespread cottage industry

• Professional Societies– MGED: Microarray Gene Expression Data Society– HUPO: Human Protein Organization

• Government– NCI Thesaurus– NIST: Process Specification Language

• Open Biological Ontologies– GO– Three dozen (and growing) other ontologies– Mostly in DAG-Edit, some in Protégé format

Page 31: Building Ontologies  from the Ground Up   When users set out to model their professional activity

31

Page 32: Building Ontologies  from the Ground Up   When users set out to model their professional activity

32

Government Continues to be a Major Driving Force

• Highly visible intramural initiatives to create public ontologies at many agencies, including NIST, NIH, VA, CDC

• Notable variation in these ontologies’– Scope

– Representational sophistication

– “Openness” of content

– Opportunities for peer review

Page 33: Building Ontologies  from the Ground Up   When users set out to model their professional activity

33

NCI Enterprise Vocabulary Services

1997: R. Klausner, Director NCI, wanted a “science management system”

• Know about everything funded by NCI

• Goals and results – “bench to bedside”

- Thereby improve and speed translation of research

Approach:1. Create integrative terminology2. Evolve terminology scope from supporting grants

management to supporting science3. Build Web-accessible infrastructure – caCORE

Page 34: Building Ontologies  from the Ground Up   When users set out to model their professional activity

34

Page 35: Building Ontologies  from the Ground Up   When users set out to model their professional activity

35

More than 37,000 concepts are represented with extremely detailed granularity in many areas

Page 36: Building Ontologies  from the Ground Up   When users set out to model their professional activity

36

Definitions may include considerable detail with respect to properties that establish relationships with other concepts

Page 37: Building Ontologies  from the Ground Up   When users set out to model their professional activity

37

NCI Thesaurus is in Active Usenciterms.nci.nih.gov

ncicb.nci.nih.gov/core/EVS (more info)

Website: 1500-4000 page hits daily, 14K unique visitors (2004)

• API: NCICB & external applications

• Fulfills NCI and collaborators’ needs for controlled vocabulary

• Public domain, open content license

Page 38: Building Ontologies  from the Ground Up   When users set out to model their professional activity

38

NCI Thesaurus Guidelines

• Develop content model (based on Ontylog

description logic from Apelon, Inc.)• Leverage existing sources as appropriate

– MeSH, VA NDF-RT, MedDRA …

• Develop unique content where needed– Cancer genes, gene products, cancer diagnoses, drugs,

chemotherapies, molecular abnormalities etc., and relationships among them

• Link to other standards using URLs where possible– OMIM, Swissprot, GO

Page 39: Building Ontologies  from the Ground Up   When users set out to model their professional activity

39

:

ProductionRelease

ExternalTesting

NCI ThesaurusTest DTSServers

NCI ThesaurusEditing Environment

NCI ThesaurusWorkflow

Conflict Detectionand Resolution

Work ListGeneration

Classification

HxValidation

Hx

Baseline

Schema

Schema

Schema

Individual Editors’ TDE Workflow Client Editing Application DB Schema - Current NCI Baseline - Local History

Lead Editor TDE Work Manager Client Editing Application Conflict Detection/Resolution DB Schema - Master NCI Baseline - Master History

ChangeSet

WorkAssignment

CandidateRelease

Hx

NCI ThesaurusProduction

DTS Servers

Hx

Release

NCI uses an Elaborate Process for Editing and Maintenance

Page 40: Building Ontologies  from the Ground Up   When users set out to model their professional activity

40

The NCI Thesaurus is not without its problems

• Upper level concepts are sometimes used inconsistently or not at all

• Textual definitions of concepts may not always reflect the meaning implied by the concepts’ position in the ontology

• Reliance on a proprietary knowledge-representation system – Prevents the ability to disseminate the ontology freely– Adds an unfortunate degree of uncertainty to the

semantics

Page 41: Building Ontologies  from the Ground Up   When users set out to model their professional activity

41

Throughout this cottage industry

• Lots of ontology development, principally by content experts with little training in conceptual modeling

• Use of development tools and ontology-definition languages that may be– Extremely limited in their expressiveness– Useless for detecting potential errors and guiding

correction– Nonadherent to recognized standards– Proprietary and expensive

Page 42: Building Ontologies  from the Ground Up   When users set out to model their professional activity

42

But the world is beginning to change!

• The Montagues do want to get the modeling right!

• The Capulets do want to see their work used by others!

• Useful, open tools and standards are now available that make it hard to justify closed, proprietary approaches

Page 43: Building Ontologies  from the Ground Up   When users set out to model their professional activity

43

Some signs the world is changing …

• Developers of several overlapping and incompatible ontologies of anatomy suddenly are trying to understand why their models do not agree

• Philosopher Barry Smith suddenly is camping out at biomedical informatics meetings to get the attention of ontology developers

• NCI is piloting the use of OWL and Protégé to encode and manage the NCI thesaurus

• MGED and several other biomedical ontologies are being authored in OWL and Protégé from the beginning

• Downloads of the Protégé system continue to escalate

Page 44: Building Ontologies  from the Ground Up   When users set out to model their professional activity

44

Page 45: Building Ontologies  from the Ground Up   When users set out to model their professional activity

45

Total Protege RegistrationsThrough 10/13/04

0100020003000400050006000700080009000

10000110001200013000140001500016000170001800019000200002100022000

Jan '0

1

Apr

'01

Jul '

01

Oct

'01

Jan '0

2

Apr

'02

Jul '

02

Oct

'02

Jan '0

3

Apr

'03

Jul '

03

Oct

'03

Jan '0

4

Apr

'04

Jul '

04

Oct

'04

Month/Year

Regis

trati

ons

Page 46: Building Ontologies  from the Ground Up   When users set out to model their professional activity

46

Protégé’s main features

• Simplified editing of ontologies and knowledge bases• Open-source distribution to encourage development by a

world-wide community of users• A plug-in architecture that enables developers to add new

features easily• Support for a wide range of representation formats

– CLIPS/COOL– XML Schema– UML– RDF– OWL

Page 47: Building Ontologies  from the Ground Up   When users set out to model their professional activity

47

Protégé is ecumenical in its support for formal languages

• Open Knowledge Base Connectivity Protocol– CLIPS/COOL– UML– XML Schema– RDF and RDFS– Topic Maps

• Ontology Web Language (OWL)

Page 48: Building Ontologies  from the Ground Up   When users set out to model their professional activity

48

Protégé remains successful because of its user community

• There are now 89 plug-ins available for use with Protégé• Collaboration with our users enables rapid debugging and

code fixes• Some development, such as the creation of extensions to

our basic OWL capabilities, has been a major collaborative experience

• Annual users groups meetings provide great opportunities for developers to share strategies, principles, and war stories

• Members of the international Protégé community are a huge support base for new users and for fledgling projects

Page 49: Building Ontologies  from the Ground Up   When users set out to model their professional activity

49

The NCI Thesaurus

Page 50: Building Ontologies  from the Ground Up   When users set out to model their professional activity

50

Moving from cottage industry to the industrial age

• There must be widely available tools that are open-source, that are easy to use, and that adhere to knowledge representation standards: Protégé certainly is a candidate

• There must be a large user user community of developers who use the tools and who can provide feedback to one another and to the core team of tool builders

Page 51: Building Ontologies  from the Ground Up   When users set out to model their professional activity

51

Moving from cottage industry to the industrial age II

• Government and professional societies must set expectations regarding the need for appropriate standards

• Government and professional societies must invest in educational programs to teach Montagues to identify with Capulets, and vice versa

• Demonstration projects must communicate to the potential developers of future ontologies the strengths and weaknesses of the guidelines, tools, and languages that facilitated the development work

Page 52: Building Ontologies  from the Ground Up   When users set out to model their professional activity

52

A thousand flowers are blooming from every corner of the landscape

• Ontologies are being developed by interested groups from every sector of academia, industry, and government

• Many of these ontologies have been proven to be extraordinarily useful to wide communities

• Many of these same ontologies have been shown to be structurally flawed and of uncertain semantics

• We finally are at the stage where we have tools and representation languages that can lift us out of the grass roots to create durable and maintainable ontologies with rich semantic content

Page 53: Building Ontologies  from the Ground Up   When users set out to model their professional activity

53

An infrastructure is now in place

• The need to build new ontologies in environmental health, phenotypic expression in model organisms, developmental biology, and many, many other domains is getting wide attention

• We finally have the tools and the languages to do things right

• Now all we need now is the will, the educational opportunities, and the community feedback to help developers at the grass roots to reemerge as philosophers and princes.

Page 54: Building Ontologies  from the Ground Up   When users set out to model their professional activity

54

Let’s have a happy ending.

Page 55: Building Ontologies  from the Ground Up   When users set out to model their professional activity

55

Editing OWL Ontologieswith Protégé

Holger KnublauchStanford University

July 06, 2004

Page 56: Building Ontologies  from the Ground Up   When users set out to model their professional activity

56

This Tutorial

• Introduction to OWL, the Semantic Web, and the Protégé OWL Plugin

• Theory + Walkthrough

• Also available: Tutorial by Matthew Horridge (http://www.co-ode.org)– Similar content but more details on logic– Other example scenario (Pizzas)

• ... Workshop (this afternoon)

• ... Talks (tomorrow morning)

Page 57: Building Ontologies  from the Ground Up   When users set out to model their professional activity

57

Overview

The Semantic Web and OWL

Basic OWL

Interactive: Classes, Properties

Advanced OWL

Interactive: Class Descriptions

Creating Semantic Web Contents

Page 58: Building Ontologies  from the Ground Up   When users set out to model their professional activity

58

The Semantic WebShared ontologies help to exchange data

and meaning between web-based services

(Image by Jim Hendler)

Page 59: Building Ontologies  from the Ground Up   When users set out to model their professional activity

59

Wine Example ScenarioTell me what wines I should buy to serve

with each course of the following menu.

Wine Agent

Grocery Agent

Books Agent

I recommend Chardonney or

DryRiesling

Page 60: Building Ontologies  from the Ground Up   When users set out to model their professional activity

60

Ontologies in the Semantic Web

• Provide shared data structures to exchange information between agents

• Can be explicitly used as annotations in web sites

• Can be used for knowledge-based services using other web resources

• Can help to structure knowledge to build domain models (for other purposes)

Page 61: Building Ontologies  from the Ground Up   When users set out to model their professional activity

61

OWL

• Web Ontology Language

• Official W3C Standard since Feb 2004

• Based on predecessors (DAML+OIL)

• A Web Language: Based on RDF(S)

• An Ontology Language: Based on logic

Page 62: Building Ontologies  from the Ground Up   When users set out to model their professional activity

62

OWL Ontologies

• What’s inside an OWL ontology– Classes + class-hierarchy– Properties (Slots) / values– Relations between classes

(inheritance, disjoints, equivalents)– Restrictions on properties (type, cardinality)– Characteristics of properties (transitive, …)– Annotations– Individuals

• Reasoning tasks: classification,consistency checking

Page 63: Building Ontologies  from the Ground Up   When users set out to model their professional activity

63

OWL Use Cases

• At least two different user groups– OWL used as data exchange language

(define interfaces of services and agents)– OWL used for terminologies or knowledge

models

• OWL DL is the subset of OWL (Full) that is optimized for reasoning and knowledge modeling

Page 64: Building Ontologies  from the Ground Up   When users set out to model their professional activity

64

Protégé OWL Plugin

• Extension of Protégé for handling OWL ontologies

• Project started in April 2003

• Features– Loading and saving OWL files & databases– Graphical editors for class expressions– Access to description logics reasoners– Powerful platform for hooking in custom-

tailored components

Page 65: Building Ontologies  from the Ground Up   When users set out to model their professional activity

65

Tutorial Scenario

• Semantic Web for Tourism/Traveling

• Goal: Find matching holiday destinations for a customer

I am looking for a comfortable destination

with beach access

Tourism Web

Page 66: Building Ontologies  from the Ground Up   When users set out to model their professional activity

66

Scenario Architecture

• A search problem: Match customer’s expectations with potential destinations

• Required: Web Service that exploits formal information about the available destinations– Accomodation (Hotels, B&B, Camping, ...)– Activities (Sightseeing, Sports, ...)

Page 67: Building Ontologies  from the Ground Up   When users set out to model their professional activity

67

Tourism Semantic Web

• Open World:– New hotels are being added– New activities are offered

• Providers publish their services dynamically

• Standard format / grounding is needed → Tourism Ontology

Page 68: Building Ontologies  from the Ground Up   When users set out to model their professional activity

68

Tourism Semantic Web

OWLMetadata

(Individuals)

OWLMetadata

(Individuals)

OWLMetadata

(Individuals)

OWLMetadata

(Individuals)

Tourism Ontology

Web Services

Destination

AccomodationActivity

Page 69: Building Ontologies  from the Ground Up   When users set out to model their professional activity

69

OWL (in Protégé)

• Individuals (e.g., “FourSeasons”)

• Properties– ObjectProperties (references)– DatatypeProperties (simple values)

• Classes (e.g., “Hotel”)

Page 70: Building Ontologies  from the Ground Up   When users set out to model their professional activity

70

Individuals

• Represent objects in the domain

• Specific things

• Two names could represent the same “real-world” individual

SydneysOlympicBeachBondiBeach

Sydney

Page 71: Building Ontologies  from the Ground Up   When users set out to model their professional activity

71

ObjectProperties

• Link two individuals together

• Relationships (0..n, n..m)

Sydney

BondiBeachhasPart

FourSeasonshasAccomodation

Page 72: Building Ontologies  from the Ground Up   When users set out to model their professional activity

72

Inverse Properties

• Represent bidirectional relationships

• Adding a value to one property also adds a value to the inverse property

Sydney

BondiBeachhasPart

isPartOf

Page 73: Building Ontologies  from the Ground Up   When users set out to model their professional activity

73

Transitive Properties

• If A is related to B and B is related to C then A is also related to C

• Often used for part-of relationships

Sydney

BondiBeach

hasPart

NewSouthWales

hasPart

hasPart (derived)

Page 74: Building Ontologies  from the Ground Up   When users set out to model their professional activity

74

DatatypeProperties

• Link individuals to primitive values(integers, floats, strings, booleans etc)

• Often: AnnotationProperties without formal “meaning”

Sydney

hasSize = 4,500,000isCapital = truerdfs:comment = “Don’t miss the opera house”

Page 75: Building Ontologies  from the Ground Up   When users set out to model their professional activity

75

Classes

• Sets of individuals with common characteristics

• Individuals are instances of at least one class

City

Sydney

Beach

Cairns

BondiBeach

CurrawongBeach

Page 76: Building Ontologies  from the Ground Up   When users set out to model their professional activity

76

Range and Domain

• Property characteristics– Domain: “left side of relation” (Destination)– Range: “right side” (Accomodation)

Sydney

BestWestern

FourSeasonshasAccomodation

DestinationAccomodation

hasAccomodation

Page 77: Building Ontologies  from the Ground Up   When users set out to model their professional activity

77

Domains

• Individuals can only take values of properties that have matching domain– “Only Destinations can have

Accomodations”

• Domain can contain multiple classes

• Domain can be undefined:Property can be used everywhere

Page 78: Building Ontologies  from the Ground Up   When users set out to model their professional activity

78

Superclass Relationships

• Classes can be organized in a hierarchy

• Direct instances of subclass are also (indirect) instances of superclasses

Cairns

Sydney

Canberra

Coonabarabran

Page 79: Building Ontologies  from the Ground Up   When users set out to model their professional activity

79

Class Relationships

• Classes can overlap arbitrarily

City

Sydney

CairnsBondiBeach

RetireeDestination

Page 80: Building Ontologies  from the Ground Up   When users set out to model their professional activity

80

Class Disjointness• All classes could potentially overlap

• In many cases we want to make sure they don’t share instances

Sydney

UrbanArea RuralArea

SydneyWoomera

CapeYork

disjointWith

City Destination

Page 81: Building Ontologies  from the Ground Up   When users set out to model their professional activity

81

(Create a new OWL project)

Page 82: Building Ontologies  from the Ground Up   When users set out to model their professional activity

82

(Create simple classes)

Page 83: Building Ontologies  from the Ground Up   When users set out to model their professional activity

83

(Create class hierarchy and set disjoints)

Page 84: Building Ontologies  from the Ground Up   When users set out to model their professional activity

84

(Create Contact class with datatype properties)

Page 85: Building Ontologies  from the Ground Up   When users set out to model their professional activity

85

(Edit details of datatype properties)

Page 86: Building Ontologies  from the Ground Up   When users set out to model their professional activity

86

(Create an object property hasContact)

Page 87: Building Ontologies  from the Ground Up   When users set out to model their professional activity

87

(Create an object property with inverse)

Page 88: Building Ontologies  from the Ground Up   When users set out to model their professional activity

88

(Create the remaining classes and properties)

Page 89: Building Ontologies  from the Ground Up   When users set out to model their professional activity

89

Class Descriptions• Classes can be described by their

logical characteristics

• Descriptions are “anonymous classes”

Things with three star accomodation

Things with sightseeing opportunities

RetireeDestination

SydneySanJose

BlueMountains

Page 90: Building Ontologies  from the Ground Up   When users set out to model their professional activity

90

Class Descriptions

• Define the “meaning” of classes

• Anonymous class expressions are used– “All national parks have campgrounds.”– “A backpackers destination is a destination

that has budget accomodation and offers sports or adventure activities.”

• Expressions mostly restrict property values (OWL Restrictions)

Page 91: Building Ontologies  from the Ground Up   When users set out to model their professional activity

91

Class Descriptions: Why?

• Based on OWL’s Description Logic support

• Formalize intentions and modeling decisions (comparable to test cases)

• Make sure that individuals fulfill conditions

• Tool-supported reasoning

Page 92: Building Ontologies  from the Ground Up   When users set out to model their professional activity

92

Reasoning with Classes

• Tool support for three types of reasoning exists:– Consistency checking:

Can a class have any instances?

– Classification:Is A a subclass of B?

– Instance classification:Which classes does an individual belong to?

• For Protégé we recommend RACER(but other tools with DIG support work too)

Page 93: Building Ontologies  from the Ground Up   When users set out to model their professional activity

93

Restrictions (Overview)

• Define a condition for property values– allValuesFrom– someValuesFrom– hasValue– minCardinality– maxCardinality– cardinality

• An anonymous class consisting of all individuals that fulfill the condition

Page 94: Building Ontologies  from the Ground Up   When users set out to model their professional activity

94

Cardinality Restrictions• Meaning: The property must have at least/at

most/exactly x values• is the shortcut for and• Example: A FamilyDestination is a Destination

that has at least one Accomodation and at least 2 Activities

Page 95: Building Ontologies  from the Ground Up   When users set out to model their professional activity

95

allValuesFrom Restrictions

• Meaning: All values of the property must be of a certain type

• Warning: Also individuals with no values fulfill this condition (trivial satisfaction)

• Example: Hiking is a Sport that is only possible in NationalParks

Page 96: Building Ontologies  from the Ground Up   When users set out to model their professional activity

96

someValuesFrom Restrictions• Meaning: At least one value of the

property must be of a certain type

• Others may exist as well

• Example: A NationalPark is a RuralArea that has at least one Campground and offers at least one Hiking opportunity

Page 97: Building Ontologies  from the Ground Up   When users set out to model their professional activity

97

hasValue Restrictions• Meaning: At least one of the values of

the property is a certain value

• Similar to someValuesFrom but with Individuals and primitive values

• Example: A PartOfSydney is a Destination where one of the values of the isPartOf property is Sydney

Page 98: Building Ontologies  from the Ground Up   When users set out to model their professional activity

98

Enumerated Classes• Consist of exactly the listed individuals

OneStarRating

TwoStarRatingThreeStarRating

BudgetAccomodation

Page 99: Building Ontologies  from the Ground Up   When users set out to model their professional activity

99

Logical Class Definitions

• Define classes out of other classes– unionOf (or)– intersectionOf (and)– complementOf (not)

• Allow arbitrary nesting of class descriptions (A and (B or C) and not D)

Page 100: Building Ontologies  from the Ground Up   When users set out to model their professional activity

100

unionOf• The class of individuals that belong to

class A or class B (or both)

• Example: Adventure or Sports activities

Adventure Sports

Page 101: Building Ontologies  from the Ground Up   When users set out to model their professional activity

101

intersectionOf• The class of individuals that belong to

both class A and class B

• Example: A BudgetHotelDestination is a destination with accomodation that is a budget accomodation and a hotel

BudgetAccomodation

Hotel

Page 102: Building Ontologies  from the Ground Up   When users set out to model their professional activity

102

Implicit intersectionOf• When a class is defined by more than

one class description, then it consists of the intersection of the descriptions

• Example: A luxury hotel is a hotel that is also an accomodation with 3 stars

AccomodationWith3StarsHotel

LuxuryHotel

Page 103: Building Ontologies  from the Ground Up   When users set out to model their professional activity

103

complementOf• The class of all individuals that do not

belong to a certain class

• Example: A quiet destination is a destination that is not a family destination

DestinationFamilyDestination

QuietDestination (grayed)

Page 104: Building Ontologies  from the Ground Up   When users set out to model their professional activity

104

Class Conditions

• Necessary Conditions:(Primitive / partial classes)“If we know that something is a X,then it must fulfill the conditions...”

• Necessary & Sufficient Conditions:(Defined / complete classes)“If something fulfills the conditions...,then it is an X.”

Page 105: Building Ontologies  from the Ground Up   When users set out to model their professional activity

105

Class Conditions (2)

QuietDestination

NationalPark

(not everything that fulfills theseconditions is a NationalPark)

(everything that fulfills theseconditions is a QuietDestination)

Page 106: Building Ontologies  from the Ground Up   When users set out to model their professional activity

106

ClassificationNationalPark

BackpackersDestination

• A RuralArea is a Destination

• A Campground is BudgetAccomodation

• Hiking is a Sport• Therefore:

Every NationalPark is a Backpackers-Destiantion

(Other BackpackerDestinations)

Page 107: Building Ontologies  from the Ground Up   When users set out to model their professional activity

107

Classification (2)

• Input: Asserted class definitions

• Output: Inferred subclass relationships

Page 108: Building Ontologies  from the Ground Up   When users set out to model their professional activity

108

(Create an enumerated class out of individuals)

Page 109: Building Ontologies  from the Ground Up   When users set out to model their professional activity

109

(Create a hasValue restriction)

Page 110: Building Ontologies  from the Ground Up   When users set out to model their professional activity

110

(Create a hasValue restriction)

Page 111: Building Ontologies  from the Ground Up   When users set out to model their professional activity

111

(Create a defined class)

Page 112: Building Ontologies  from the Ground Up   When users set out to model their professional activity

112

(Classify Campground)

Page 113: Building Ontologies  from the Ground Up   When users set out to model their professional activity

113

(Add restrictions to City and Capital)

Page 114: Building Ontologies  from the Ground Up   When users set out to model their professional activity

114

(Create defined class BackpackersDestination)

Page 115: Building Ontologies  from the Ground Up   When users set out to model their professional activity

115

(Create defined class FamilyDestination)

Page 116: Building Ontologies  from the Ground Up   When users set out to model their professional activity

116

(Create defined class QuietDestination)

Page 117: Building Ontologies  from the Ground Up   When users set out to model their professional activity

117

(Create defined class RetireeDestination)

Page 118: Building Ontologies  from the Ground Up   When users set out to model their professional activity

118

(Classification)

Page 119: Building Ontologies  from the Ground Up   When users set out to model their professional activity

119

(Consistency Checking)

Page 120: Building Ontologies  from the Ground Up   When users set out to model their professional activity

120

Visualization with OWLViz

Page 121: Building Ontologies  from the Ground Up   When users set out to model their professional activity

121

OWL Wizards

Page 122: Building Ontologies  from the Ground Up   When users set out to model their professional activity

122

Putting it All Together

• Ontology has been developed

• Published on a dedicated web address

• Ontology provides standard terminology

• Other ontologies can extend it

• Users can instantiate the ontology to provide instances– specific hotels– specific activities

Page 123: Building Ontologies  from the Ground Up   When users set out to model their professional activity

123

Ontology Import

• Adds all classes, properties and individuals from an external OWL ontology into your project

• Allows to create individuals, subclasses, or to further restrict imported classes

• Can be used to instantiate an ontology for the Semantic Web

Page 124: Building Ontologies  from the Ground Up   When users set out to model their professional activity

124

Tourism Semantic Web (2)

OWLMetadata

(Individuals)Tourism Ontology

Web Services

Destination

AccomodationActivity

Page 125: Building Ontologies  from the Ground Up   When users set out to model their professional activity

125

Ontology Import with Protégé

• On the Metadata tab:– Add namespace, define prefix– Check “Imported” and reload your project

Page 126: Building Ontologies  from the Ground Up   When users set out to model their professional activity

126

Individuals

Page 127: Building Ontologies  from the Ground Up   When users set out to model their professional activity

127

Individuals

Page 128: Building Ontologies  from the Ground Up   When users set out to model their professional activity

128

OWL File<?xml version="1.0"?>\<rdf:RDF xmlns="http://protege.stanford.edu/plugins/owl/owl-library/heli-bunjee.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:travel="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl#" xml:base="http://protege.stanford.edu/plugins/owl/owl-library/heli-bunjee.owl">

<owl:Ontology rdf:about=""> <owl:imports rdf:resource="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl"/> </owl:Ontology>

<owl:Class rdf:ID="HeliBunjeeJumping"> <rdfs:subClassOf rdf:resource="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl#BunjeeJumping"/> </owl:Class>

<HeliBunjeeJumping rdf:ID="ManicSuperBunjee"> <travel:isPossibleIn> <rdf:Description rdf:about="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl#Sydney"> <travel:hasActivity rdf:resource="#ManicSuperBunjee"/> </rdf:Description> </travel:isPossibleIn> <travel:hasContact> <travel:Contact rdf:ID="MSBInc"> <travel:hasEmail rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[email protected] </travel:hasEmail> <travel:hasCity rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Sydney</travel:hasCity> <travel:hasStreet rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Queen Victoria St</travel:hasStreet> <travel:hasZipCode rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1240</travel:hasZipCode> </travel:Contact> </travel:hasContact> <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Manic super bunjee now offers nerve wrecking jumps from 300 feet right out of a helicopter. Satisfaction guaranteed.</rdfs:comment> </HeliBunjeeJumping>

</rdf:RDF>