Title: An Introduction to Ontologies in OWL
1An Introduction to Ontologies in OWL
Bibliography The OWL Guide The OWL
Overview Description Logic slides from Enrico
Franconi Artificial Intelligence A Modern
Approach by Russel and Nordig
2What is an Ontology?
- A representation of terms and their
interrelationships (OWL Overview) - A formal conceptualization of the world
- Smart data
3Ontology Languages
- Typically introduce concepts, properties,
relationships between concepts and constraints - May be expressed with diagrams
- ER Diagrams and UML Class Diagrams are ontology
languages - OWL (The Web Ontology Language) is expressed in
XML - OWL is a distributed ontology language
4The OWL Language
- February 10, 2004 OWL and RDF become W3C
Recommendations - See Jena from Hewlett-Packard Research for an
existing Java API - See Protégé-2000 at Stanford University for an
existing OWL editor - Big names in this space include Jim Hendler, and
Debra McGuiness - A large example can be found at
http//www.mindswap.org/2003/CancerOntology/nciOnc
ology.owl
5From the W3C
6The three sublanguages of OWL
- OWL Lite (decidable)
- OWL DL (Description Logic) (Decidable)
- OWL Full (Allows classes as instances)
- As we move from OWL Lite to OWL full we increase
expressiveness and logical complexity.
7Decidability
- A proof procedure r is incomplete if there are
true statements that the procedure cannot infer. - Godel (1930s) showed that, for first order
logic, any statement entailed by a set of
statements can be proved from the set. In other
words, a proof procedure exists. - In 1965, Robinson found the resolution method.
8Decidability
- But, entailment is semi-decidable. If a statement
does not follow from the premises it may go on
and on.
If S follows the proof of S will emerge
after some time.
Resolution is complete
Premises
If S does not follow the procedure may loop
forever.
Statment S
9OWL Lite is a Decidable Language
- A Class is a set of individuals
- The class Thing is the superclass of all OWL
classes - The class Nothing is a subclass of all OWL
classes and has no individuals members - Classes may be defined as subClasses of other
classes
10Three classes that subclass Thing
- ltowlClass rdfIDWinery/gt
- ltowlClass rdfIDRegion/gt
- ltowlClass rdfIDConsumableThing/gt
- These terms may be referred to from within this
- Document by Winery, Region and
- ConsumableThing.
- Other ontologies may refer to these terms with
- SomeURIWinery, SomeURIRegion and so on.
11Class Hierarchies built with subClassOf
- ltowlClass rdfIDPotableLiquidgt
- ltrdfssubClassOf rdfresource
ConsumableThing /gt -
- lt/owlClassgt
- ltowlClass rdfIDEdibleThinggt
- ltrdfssubClassOf rdfresource
ConsumableThing /gt -
- lt/owlClassgt
Deduction If x is a PotableLiquid then x is a
ConsumableThing
12Wine and Pasta
- ltowlClass rdfIDWinegt
- ltrdfssubClassOf rdfresource
PotableLiquid /gt -
- lt/owlClassgt
- ltowlClass rdfID Pasta
- ltrdfssubClassOf rdfresource EdibleThing /gt
-
- lt/owlClassgt
Deduction If x is Pasta then x is a
ConsumableThing
13SweetFruit and NonSweetFruit
- ltowlClass rdfIDSweetFruitgt lt! food.xml--gt
- ltrdfssubClassOf
- rdfresourceEdibleThing/gt
- lt/owlClassgt
- ltowlClass rdfIDNonSweetFruitgt lt!
food.xml--gt - ltrdfssubClassOf
- rdfresourceEdibleThing/gt
-
- lt/owlClassgt
14Defining Individuals
- ltRegion rdfIDCentralCoastRegion/gt
- Is identical to
- ltowlThing rdfIDCentralCoastRegion/gt
- ltowlThing rdfaboutCentralCoatRegiongt
- ltrdftype rdfresourceRegion/gt
- lt/owlThinggt
15Another individual
- ltowlClass rdfIDGrapegt lt! food.xml--gt
- ltrdfssubClassOf rdfresourceSweetFruit/gt
- lt/owlClassgt
-
lt! wine.xml --gt - ltowlClass rdfIDWineGrapegt
- ltrdfssubClassOf rdfresourcefoodGrape/gt
- lt/owlClassgt
- ltWineGrape rdfIDCabernetSauvignonGrape /gt
Deduction CabernetSauvignon is a SweetFruit
16So far we have
Winery
Region
ConsumableThing
PotableLiquid
EdibleThing
SweetFruit
NonSweetFruit
Pasta
Wine
Grape
WineGrape
17So far we have
- Classes
- Individuals
- We now need properties to state facts about
classes and facts about individuals
18Properties
- Properties are binary relations
- A binary relation R from a set X to a set Y is a
subset of the Cartesian product X x Y. If (x,y) e
R, we write xRy and say x is related to y.
19Binary Relations
- Suppose the set X has members a,b and
- the set Y has members c,d,e.
- XxY (a,c),(a,d),(a,e),(b,c),(b,d),(b,e)
- Let R (a,c),(b,e)
- Since (a,c) e R and (b,e) e R we write aRc
- and bRe.
- Notice that a binary relation is a set of ordered
pairs. -
20Domain and Range
The set x e X (x,y) e R for some y e Y is
called the domain of R. The domain of R
(a,c),(b,e) is a,b. The set y e Y (x,y) e
R for some x e X is called the range of R. The
range of R (a,c),(b,e) is c,e.
21Properties
- R is Transitive if and only if
- xRy and yRz imply xRz
- locateIn is transitive in the wine ontology
- R is Symmetric if and only if
- xRy iff yRx
- adjacentTo is symmetric in the wine ontology
22Properties
- R is Functional if and only if
- xRy and xRz implies y z
- hasVintageYear is functional in the wine
- ontology
- R1 and R2 are Inverse Properties if and only if
- xR1y iff yR2x
- hasMaker and producesWine are inverse
- relations in the wine ontology
23OWLs Property Hierarchy
- Thing is a superset of Property
- Property is a superset of ObjectProperty
- Property is a superset of DataProperty
- An ObjectProperty associates a class instance
with another class instance. - A DataProperty associates a class instance with a
datatype value
24OWLs Property Hierarchy Example
Thing
Mammal
Indentation shows subset relationships. Set
elements are marked with dots.
Person
Property
ObjectProperty DataProperty
hasRelative
hasSibling
hasAge
25OWL Property Syntax
- ltowlObjectProperty rdfIDlocatedIngt
- ltrdfsdomain
- rdfresourceOWLURIThing/gt
- ltrdfsrange
- rdfresourceRegion/gt
- lt/owlObjectPropertygt
- OWLURI will actually appear as the official OWL
URI.
26Adding pairs to locatedIn
- ltRegion rdfIDSantaCruzMountainsRegiongt
- ltlocatedIn rdfresourceCaliforniaRegion/gt
- lt/Regiongt
- ltCabernetSauvignon
- rdfID SantaCruzMountainVinyardCabernetSauvi
gnongt - ltlocatedIn rdfresourceSantaCruzMountainsRe
gion/gt -
- lt/CabernetSauvignongt
Can we make a deduction?
27locatedIn
- locatedIn is defined as a set of ordered pairs.
- Each pair must contain an owlThing (maybe a
Region) - followed by value from the set Region.
- For example
- locatedIn
- (SantaCruzMountainsRegion, CaliforniaRegion),
- (SantaCruzMountainVinyardCabernetSauvignon,
- SantaCruzMountainsRegion)
- A deduction like the following is not yet
possible - The Thing SantaCruzMountainVinyardCabernetSau
vignon - is locatedIn CaliforniaRegion
-
28locatedIn is Transitive
- ltowlObjectProperty rdfIDlocatedIngt
- ltrdftype rdfresourceTransitiveProperty
/gt lt! include an OWLURI --gt - ltrdfsdomain
- rdfresourceOWLURIThing/gt
- ltrdfsrange
- rdfresourceRegion/gt
- lt/owlObjectPropertygt
- A deduction like the following is now possible
- The Thing SantaCruzMountainVinyardCabernetSau
vignon - is locatedIn CaliforniaRegion
-
29Given the madeFromGrape property
- ltowlObjectProperty rdfIDmadeFromGrapegt
- ltrdfsdomain rdfresourceWine/gt
- ltrdfsrange rdfresourceWineGrape/gt
- lt/owlObjectPropertygt
madeFromGrape
(Wine,WineGrape)
(Wine,WineGrape)
30And
- ltowlThing refIDLindemansBin65Chardonnaygt
- ltmadeFromGrape rdfresourceChardonnayGrape/
gt - ltowlThinggt
- We can deduce that LindemansBin65Chardonnay is a
Wine.
31Given a Property
- ltowlClass rdfIDWineDescriptor/gt
- ltowlClass rdfIDWineColorgt
- ltrdfssubClassOf rdfresourceWineDescriptor
/gt -
- ltowlClassgt
- ltowlObjectProperty rdfIDhasWineDescriptorgt
- ltrdfsdomain rdfresourceWine/gt
- ltrdfsrange rdfresourceWineDescriptor/gt
- ltowlObjectPropertygt
32We can define a subproperty
- ltowlObjectProperty rdfIDhasColorgt
- ltrdfssubPropertyOf rdfresourcehasWineDescr
iptor/gt - ltrdfsdomain rdfresourceWine/gt
- ltrfdsrange rdfresource WineColor /gt
-
- lt/owlObjectPropertygt
hasWineDescriptor
(Wine,WineDescriptor) (Wine,WineDescriptor) (
Wine,WineDescriptor) (Wine,WineDescriptor) (Wi
ne,WineColor) (Wine,WineColor)
33And make it functional.
- ltowlObjectProperty rdfIDhasColorgt
- ltrdftype rdfresourceowlFunctionalProperty
/gt - ltrdfssubPropertyOf rdfresourcehasWineDescr
iptor/gt - ltrdfsdomain rdfresourceWine/gt
- ltrfdsrange rdfresource WineColor /gt
-
- lt/owlObjectPropertygt
hasWineDescriptor
(Wine,WineDescriptor) (Wine,WineDescriptor) (
Wine,WineDescriptor) (Wine,WineDescriptor) (Wi
ne,WineColor) (Wine,WineColor)
Now, for each Wine, there can be at most one
WineColor.
34Anonymous Classes
ltowlClass rdfIDWinegt ltrdfssubClassOf
rdfresource foodPotableLiquid /gt
ltrdfssubClassOfgt ltowlRestrictiongt
ltowlonProperty rdfresourcemadeFromGra
pe/gt ltowlminCardinality
rdfdatatype
xsdnonNegativeIntegergt1
lt/owlminCardinaltygt lt/owlrestrictiongt
ltrdfssubClassOfgt lt/owlClassgt
So, those Things that are in the PotableLiquid
set that are also in the set of things made from
at least one grape are Wines. If we know that x
is a Wine then we know it has at least one
madeFromGrape property defined.
35A Wine Individual
- ltCabernetSauvignon
- rdfID SantaCruzMountainVinyardCabernetSauvi
gnongt - ltlocatedIn rdfresourceSantaCruzMountainsRe
gion/gt -
- lt/CabernetSauvignongt
- This says nothing about what grape its made
from. To find that out - we must look to the class CabernetSauvignon.
There we learn all - wines of this variety are madeFromGrape
CabernetSauvignon. - So, individuals inherit properties and property
values from their class.
36What does this mean?
- ltowlClass rdfID"Student"gt
- ltowlintersectionOf rdfparseType"Collection"gt
- ltowlClass rdfabout"Person"/gt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"enrolledIn
"/gt - ltowlminCardinality rdfdatatype
- "xsdnonNegativeInteger"gt 1
- lt/owlminCardinalitygt
- lt/owlRestrictiongt
- lt/owlintersectionOfgt
- lt/owlClassgt
37And this?
- ltStudent rdfID"John"gt
- ltfriendOfgt
- ltStudent
rdfresource"Peter" /gt - lt/friendOfgt
- lt/Studentgt
38How about this one?
- ltStudent rdfabout" http//www.student.orgDaniel
aRenuncio "gt - ltowlsameIndividualAs rdfresource
- "http//www.student.orgDaniela_de_Senna_E
yng_Renuncio"/gt - lt/Studentgt