OWL, underlying logics, and what this reasoning is all about
Uli Sattler
sattler@cs.man.ac.uk Information Management Group School of Computer Science University of Manchester
OWL, underlying logics, and what this reasoning is all about Uli - - PowerPoint PPT Presentation
OWL, underlying logics, and what this reasoning is all about Uli Sattler sattler@cs.man.ac.uk Information Management Group School of Computer Science University of Manchester In this course: An introduction to OWL ontologies:
sattler@cs.man.ac.uk Information Management Group School of Computer Science University of Manchester
– what they are – what they mean, incl entailments, reasoners, …
– terminology design/maintenance – ontology-based data access
– multi-dimensional modelling – closure axioms
– post-coordination & the OWL API
– what if all goes red? – what if performance becomes an issue? – options for re-using other ontologies
5
– The Business School
– Gain a broader perspective and solve complex business problems
– From idea to marketplace -- bringing our ground-breaking inventions into the commercial world
– MBS is redefiing business education to meet the challenges of a fast- evolving global landscape
– Attend careers fairs or arrange your own dedicated event on campus
– +44 161 275 2227 – business@manchester.ac.uk
6
WWW2002 The eleventh international world wide web con Sheraton waikiki hotel Honolulu, hawaii, USA 7-11 may 2002 1 location 5 days learn interact Registered participants coming from australia, canada, chile denmark, fran ce, germany, ghana, hong kong, india , ireland, italy, japan, malta, new ze aland, the netherlands, norway, singapor e, switzerland, the united kingdom, the united states, vietnam, zaire Register now On the 7th May Honolulu will provide the backdrop of the eleventh international w
s event Speakers confirmed Tim berners-lee Tim is the well known inventor of the Web ,…
<university>WWW2002 The eleventh international world wide webco n</university> <school>7-11 may 2002</school> <address>Sheraton waikiki hotel Honolulu, hawaii, USA</address> <topic>Register now On the 7th May Honolulu will provide the b ackdrop of the eleventh international worl d wide web conference. This prestigious eve nt Speakers confirmed</topic> <topic>Tim berners-lee <details>Tim is the well known inventor of the W eb,</details>… </topic> <topic>Tim berners-lee <details>Tim is the well known inventor of the W eb,</details>… </topic> <contact>Registered participants coming from australia, canada, chile denmark, france , germany, ghana, hong kong, india, ir eland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switze rland, the united kingdom, the united sta tes, vietnam, zaire<contact>
<university>WWW2002 The eleventh international world wide webco n</university> <department>7-11 may 2002</department> <address>Sheraton waikiki hotel Honolulu, hawaii, USA</address> <activity>Register now On the 7th May Honolulu will provide the b ackdrop of the eleventh international worl d wide web conference. This prestigious eve nt Speakers confirmed</activity> <activity>Tim berners-lee <details>Tim is the well known inventor of the W eb,</details>… </activity> <activity>Tim berners-lee <details>Tim is the well known inventor of the W eb,</details>… </activity> <contact>Registered participants coming from australia, canada, chile denmark, france , germany, ghana, hong kong, india, ir eland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switze rland, the united kingdom, the united sta tes, vietnam, zaire<contact>
<conf>WWW2002 The eleventh international world wide webco n<conf> <date>7-11 may 2002</date> <place>Sheraton waikiki hotel Honolulu, hawaii, USA<place> <introduction>Register now On the 7th May Honolulu will provide the b ackdrop of the eleventh international worl d wide web conference. This prestigious eve nt Speakers confirmed</introduction> <speaker>Tim berners-lee <bio>Tim is the well known inventor of the W eb,</bio>… </speaker> <speaker>Tim berners-lee <bio>Tim is the well known inventor of the W eb,</bio>… </speaker> <registration>Registered participants coming from australia, canada, chile denmark, france , germany, ghana, hong kong, india, ir eland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switze rland, the united kingdom, the united sta tes, vietnam, zaire<registration>
– e.g., Dublin Core for annotation of library/bibliographic information
– problems with this approach
(only terms, we can’t build expressions!)
– ontologies provide a vocabulary of terms – new terms can be described by combining existing ones
– Meaning (semantics) of such terms is formally specified
* With thanks to Frank van Harmelen
12
α ωεβ παγε' ιν Ενγλιση' αβουτ ' Φρανκ' ' ' ' Ανδ τηισ' παγε ισ' αβουτ ' ΛαρΚΧ' ανδ ανοτηερ' ωεβ παγε' αβουτ' Φρανκ' Ανδ τηισ' παγε ισ ' αβουτ ' Στεφανο' ' ' Τηισ παγε' ισ αβουτ' τηε ςριϕε' Υνιερσιτει '
13
14
15
16
17
18
Davis, Shrobe & Szolovits
http://groups.csail.mit.edu/medg/ftp/psz/k-rep.html
Sushi SubClassOf Food and contains some Rice
Ontology O Our view of
World
Z123: Sushi Z123 contains Z234 Z243: Chocolate ChSushi EquivalentTo Sushi and contains some Chocolate
– Necessarily abstractions – Simplifying assumptions will be present
– What’s there? – What’s missing?
– designer – application domain
– but we can still assess quality of our ontology: – is it suitable/fit for purpose? – can experts agree on the way it models the domain?
20
Winnie-the-Pooh [A. A. Milne]
<?xml version="1.0"?> <rdf:RDF xmlns="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/RunningExamp xml:base="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/RunningExample" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <owl:Ontology rdf:about="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/ RunningExample"/> <!-- /////////////////////////////////////////////////////////////////////////////////////// // // Object Properties // ///////////////////////////////////////////////////////////////////////////////////////
<owl:ObjectProperty rdf:about="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016 RunningExample#isPartOf"/>
From the OWL 2 Primer
We concentrate on this
40
if (e,f) ∈ RI, then f is an R-filler of e if iI ∈ AI, then i is an instance of A AI is the extension of A
41
42
(not just lines)
for property names
each ▪ class name A to a set AI ⊆ Δ ▪ property name R to a binary relation RI ⊆ Δ x Δ ▪ individual name i to an element iI ∈ Δ
43
Δ
44
{e ∈ Δ | there is some f: (e,f) ∈ hasChildI and f ∈ LawyerI}
{e ∈ Δ | for all f ∈ Δ: if (e,f) ∈ hasChildI then f ∈ DoctorI}
{e ∈ Δ | there are at least 2 f ∈ Δ with (e,f) ∈ hasChildI and f ∈ TallI }
{e ∈ Δ | there are at most 2 f ∈ Δ with (e,f) ∈ hasChildI and f ∈ TallI }
45
46
✓ the more axioms you add to O, the fewer models O has
47
O1 = {}
I1: Δ = {v, w, x, y, z} CI = {v, w, y} DI = {x, y} EI = {} RI = {(v, w), (v, y)} SI = {} aI = v bI = x cI = w dI = y
O2 = {a:C, b:D, c:C, d:C} O3 = {a:C, b:D, c:C, d:C, d:E} O4 = {a:C, b:D, c:C, d:C, d:E D SubClassOf C} O5 = {a:C, b:D, c:C, d:C, d:E a R d, D SubClassOf C, D SubClassOf S some C} O6 = {a:C, b:D, c:C, d:C, d:E a R d, D SubClassOf C, D SubClassOf S some C, C SubClassOf R only C }
I2: Δ = {v, w, x, y, z} CI = {v, w, y} DI = {x, y} EI = {y} RI = {(v, w), (v, y)} SI = {} aI = v bI = x cI = w dI = y I3: Δ = {v, w, x, y, z} CI = {x, v, w, y} DI = {x, y} EI = {y} RI = {(v, w), (v, y)} SI = {} aI = v bI = x cI = w dI = y I4: Δ = {v, w, x, y, z} CI = {x, v, w, y} DI = {x, y} EI = {y} RI = {(v, w), (v, y)} SI = {(x,x), (y,x)} aI = v bI = x cI = w dI = y
48
Model of O
Daisy:Cow Cow SubClassOf Animal Mary: Person Person SubClassOf Animal Z123ABC: Car
Δ Ontology O
Mary drives Z123ABC
Our view of
World
Daisy Mary Z123ABC drives
Should agree with our view Should agree with our view
49
Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc
Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc
Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc
53
54
In Protégé, unsatisfiable classes are red!
55
consistency/entailments, and classify ontologies
56
look others up:
+800 terms/month
hierarchy
axioms, see BioPortal
Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc
Endocarditis = Inflammation and locatedIn Heart
Healthcare Record Name: Bob History:
Class-level ontology acts as lens to your data
Endocarditis = Inflammation and locatedIn Heart
Healthcare Record Name: Bob History:
Patient and (suffersFrom some HeartDisease), regardless of how Bob is described…flexible!
66
– This differs from some frame-based languages where we only have necessary conditions.
– SubClassOf axioms – C SubClassOf: D…any instance of C must be an instance of D
– EquivalentTo axioms – C EquivalentTo: D…any instance of C must be an instance of D and vice versa, any instance of D must be an instance of C
i.e. O ⊨ b:C Constraints/Background knowledge Definitions
subclasses of Student
“any individual of class X has to be an individual of some class Yi”
67 Class: Y1 SubClassOf X Class: Y2 SubClassOf X … Class: Yk SubClassOf X
Class: Y1 SubClassOf X Class: Y2 SubClassOf X … Class: Yk SubClassOf X Class: X SubClassOf: (Y1 or … or Yk)
➡ poly-hierarchies are the norm
“EnglishChildPaperbackFiction” or….
69
70
71 shoulder_catches_during_movement shoulder_feels_like_it_will_slip_out_of_place shoulder_joint_feels_like_it_may_slip_out_of_place shoulder_joint_pain_better_after_rest shoulder_joint_pain_causes_difficulty_lying_on_affected_side shoulder_joint_pain_causing_inability_to_sleep shoulder_joint_pain_difficult_to_localize shoulder_joint_pain_feels_better_after_normal_movement shoulder_joint_pain_first_appears_at_night shoulder_joint_pain_improved_by_medication shoulder_joint_pain_improves_during_exercise__returns_later shoulder_joint_pain_incr_by_raising_arm_above_shoulder_level shoulder_joint_pain_increased_by shoulder_joint_pain_increased_by_lifting shoulder_joint_pain_increased_by_moving_arm_across_chest shoulder_joint_pain_increased_by_reaching_around_the_back shoulder_joint_pain_relieved_by_putting_arm_over_head shoulder_joint_pain_sudden_onset shoulder_joint_pain_unrelenting shoulder_joint_pain_worse_on_rising shoulder_joint_pain_worsens_with_extended_activity shoulder_joint_popping_sound_heard shoulder_joint_suddenly_gives_way shoulder_seems_out_of_place shoulder_seems_out_of_place__recollection_of_the_event
72
together again
73
Amino Acids
Charge
Size
Polarity
Hydrophobicity
74
75
Class: AminoAcid SubClassOf: hasSize some Size, hasPolarity some Polar, hasCharge some Charge, hasHydrophobicity some Hydrophobicity Class: Lysine SubClassOf: AminoAcid, hasSize some Large, hasCharge some Positive, hasPolarity some Polar, hasHydrophobicity some Hydrophilic
76
Charge
Size
Polarity
Hydrophobicity
Amino Acids
Class: LargeAminoAcid EquivalentTo: AminoAcid and hasSize some Large Class: PositiveAminoAcid EquivalentTo: AminoAcid and hasCharge some Positive Class: LargePositiveAminoAcid EquivalentTo: LargeAminoAcid and PositiveAminoAcid
77
78
shoulder_catches_during_movement shoulder_feels_like_it_will_slip_out_of_place shoulder_joint_feels_like_it_may_slip_out_of_place shoulder_joint_pain_better_after_rest shoulder_joint_pain_causes_difficulty_lying_on_affected_side shoulder_joint_pain_causing_inability_to_sleep shoulder_joint_pain_difficult_to_localize shoulder_joint_pain_feels_better_after_normal_movement shoulder_joint_pain_first_appears_at_night shoulder_joint_pain_improved_by_medication shoulder_joint_pain_improves_during_exercise__returns_later shoulder_joint_pain_incr_by_raising_arm_above_shoulder_level shoulder_joint_pain_increased_by shoulder_joint_pain_increased_by_lifting shoulder_joint_pain_increased_by_moving_arm_across_chest shoulder_joint_pain_increased_by_reaching_around_the_back shoulder_joint_pain_relieved_by_putting_arm_over_head shoulder_joint_pain_sudden_onset shoulder_joint_pain_unrelenting
79
shoulder_joint_pain_unrelenting shoulder_joint_pain_worse_on_rising shoulder_joint_pain_worsens_with_extended_activity shoulder_joint_popping_sound_heard shoulder_joint_suddenly_gives_way shoulder_seems_out_of_place shoulder_seems_out_of_place__recollection_of_the_event shoulder_seems_out_of_place_recurrent shoulder_seems_out_of_place_which_resolved shoulder_suddenly_locked_up
use post-coordination
and (hasCharge some Positive))
and (hasCharge some Neutral)) is satisfiable w.r.t O
81
Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish
89
90
Fish Beef VinegaredRice Nigiri
I1 Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish
Fish Beef VinegaredRice Nigiri
I2 hasIngredient Which of these interpretations is a model of the above axiom?
91
Fish Beef VinegaredRice Nigiri
I1 Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish, hasIngredient only (Fish or VinegaredRice)
Fish Beef VinegaredRice Nigiri
I2 hasIngredient Use property closure pattern to avoid unintended models!
92
Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish DisjointClasses: VinegaredRice, Fish, Beef Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish, hasIngredient only (Fish or VinegaredRice)
(hasIngredient only not Beef)
(hasIngredient some Beef)
(hasIngredient only not Beef) Nigiri contains no Beef!
93
95
96
http://www.flickr.com/photos/hartini/2429653007/
properties.
97
http://www.flickr.com/photos/aramisfirefly/4585596077
– I am in the lecture theatre - not a part of it
– Catch 22 is a Book - not a part of it
– Height of a Lighthouse is an attribute/feature of it - not a part of it
– Earrings aren’t part of Ears - not a part of it – But toes are part of Feet
– A bicycle has wheels – I own a bicycle - and thus its wheels
98
transitively. – But this is generally only true with the same kind of composition.
➡ Pistons part of the Car
➡ Sean’s arm part of School of Computer Science
99
X is part of Y, Y is part of Z, thus X is part of Z
transitively. – But this is generally only true with the same kind of composition.
➡ Pistons part of the Car
➡ Sean’s arm part of School of Computer Science
100
X is part of Y, Y is part of Z, thus X is part of Z
Property: isPartOf Characteristics: Transitive Property: isComponentOf SubPropertyOf: isPartOf Property: isPortionOf SubPropertyOf: isPartOf Characteristics: Transitive
– Piston directPartOf Engine; Engine directPartOf Car – Piston is not directPartOf Car, but is a partOf Car
not the direct parts of its direct parts. – So directPartOf shouldn’t be transitive
reduction.
101
Property: isPartOf Characteristics: Transitive Property: isDirectPartOf SubPropertyOf: isPartOf
102
Property: knows Property: hasFriend SubPropertyOf: knows Characteristics: Transitive Property: hasBestFriend SubPropertyOf: hasFriend
any I model of O, any x,y in ∆: (x,y) ∈ PI iff (y,x) ∈ QI
Engine SubClassOf (isPartOf some Car)?
103 Property: knows Property: hasFriend SubPropertyOf: knows Characteristics: Transitive Property: isFriendOf InverseOf: hasFriend Property: hasPart InverseOf: isPartOf Class: Car SubClassOf: Vehicle and (hasPart some Engine) (hasPart exactly 4 Wheel)
C SubClassOf D and E (1) D SubClassOf A and r some B1 (2) E SubClassOf A and r only B2 (3) B1 SubClassOf not B2 (4) D SubClassOf not E (5) G SubClassOf B and s some C (6)
– we need to consider all axioms in J: they are all needed! – if J is laconic, then you need to look at all parts in J i.e., all sub-expressions
– as long as on justification is left intact, entailment will be preserved
whether O ⊨ A SubClassOf B
whether O ⊨ b:A …and returning the result in a suitable form: O’s inferred class hierarchy
If O has n class names, m individual names
each test can be very complex
Name Meaning Undecidable no sound, complete & terminating algorithm … …. NExpTime non-det. exponential time ExpTime exponential time PSpace polynomial space NP non-det. polynomial time P polynomial time L logarithmic space
Boolean Logic
First Order Logic
EL
DL-lite
ALC SHIQ
SROIQ
ALC(D)
KL-One
ALCI ALCIQ ALCt
OWL 2 profiles
– DisjointWith axioms…wrong! – InverseProperty…sometimes! – …
from richer ontologies
meaning!
How much does O need from Oi?
imports
imports
imports
imports
M
Inflammation SubClassOf Disease
– property axiom – datatype properties – keys
– query answering & OBDA – module extraction and conservative extensions – ontology alignment – entailment explanation – similarity measures