Lecture 7: Web Ontology Language (OWL)

manyfarmswalkingInternet and Web Development

Oct 21, 2013 (3 years and 8 months ago)

74 views

Service-Oriented Computing Lecture 7: OWL
Note 1
Service-Oriented Computing
Lecture 7:
Web Ontology Language
(OWL)
Shiow-yang Wu
Department of Computer Science
and Information Engineering
National Dong Hwa University
Highlights

Species or Dialects

Constructors

Axioms

Inference

Dialects Compared

Expressiveness
Service-Oriented Computing OWL 1
Service-Oriented Computing Lecture 7: OWL
Note 2
Web Ontology Language (OWL)

RDF captures the basics, i.e., an object-oriented
type system

Additional subtleties of meaning are needed for
effective KR

OWL standardizes additional constructs to show
how to capture such subtleties of meaning

﹡塞   
北イ便ﹴュ﹧

﹡塞





ﵡﹴ北
w
OWL Extends RDF and RDFS

OWL builds on RDF and RDF Schema and adds
more vocabulary for describing properties and
l i l di
c
l
asses,
i
nc
l
u
di
n
g

Relations between classes (e.g., disjointness)

Cardinality (e.g., "exactly one")

Equality

Richer typing of properties
Characteristics of properties (e g symmetry)
Service-Oriented Computing

Characteristics

of

properties

(e
.
g
.,
symmetry)

Enumerated classes
OWL 3
Service-Oriented Computing Lecture 7: OWL
Note 3
OWL in Brief

Specifies classes and properties in a form of
description logic (DL)

Class operators analogous to Boolean operators and,
not, and or

Constraints on properties: transitive, …

Restrictions: constructs unique to DL

Has three s
p
ecies: OWL Full
,
OWL DL
,
and OWL
Service-Oriented Computing
p,,
Lite
OWL 4
Custom Metadata Vocabularies

Creating metadata for services and the information
resources they rely upon presupposes custom
vocabularies for such metadata

The metadata must be given a standard semantics
so that different parties interpret it the same way,
and so that tools can function appropriately.
<Mammal rdf:ID=“Mary”/>
Service-Oriented Computing
<Mammal rdf:ID=“John”>
<hasParent rdf:resource=“#Mary”/>
</Mammal>
OWL 5
Service-Oriented Computing Lecture 7: OWL
Note 4
Ontologies to Define Vocabulary
Semantics

A trivial ontology defining our vocabulary

Uses simple subclasses and properties

ゥﹴ﹥
 說﹤ 

ゥﹴ﹥


說﹤



Object properties refine RDF properties; relate two objects
<owl:Class rdf:ID="Mammal">
<rdfs:subClassOf rdf:resource="#Animal"/>
<owl:disjointWith rdf:resource="#Reptile"/> (爬蟲類)
</owl:Class>
Service-Oriented Computing
<owl:ObjectProperty rdf:ID="hasParent">
<rdfs:domain rdf:resource="#Animal"/>
<rdfs:range rdf:resource="#Animal"/>
</owl:ObjectProperty>
OWL 6
Simple Inference

Given the definition for the property hasParent
and
<owl:Thing rdf:ID=“Fido">
<hasParent rdf:resource="#Rover"/>
</owl:Thing>
we can infer that Fido is an Animal
Service-Oriented Computing OWL 7
Service-Oriented Computing Lecture 7: OWL
Note 5
OWL Entities and Relationships
Service-Oriented Computing
OWL 8
Constructing OWL Classes

Explicitly (as in the examples above) or

A
non
y
mousl
y
,
usin
g

y y
,g

Restrictions (next page)

Set operators: intersectionOf, unionOf,
complementOf, e.g.,
<owl:Class rdf:ID='SugaryBread'>
<owl:intersectionOf rdf:parseType='Collection'>
<o l Class df abo t'#B ead'/>
Service-Oriented Computing
<o
w
l
:
Class
r
df
:
abo
u
t
=
'#B
r
ead'/>
<owl:Class rdf:about='#SweetFood'/>
</owl:intersectionOf>
</owl:Class>
OWL 9
Service-Oriented Computing Lecture 7: OWL
Note 6
Restrictions (1)

A unique feature of description logics

Kind of like division: define classes in terms of a restriction
that they satisfy with respect to a
g
iven property

Anonymous: typically included in a class definition to enable
referring them

Key primitives are

someValuesFrom a specified class

allValuesFrom a specified class
Service-Oriented Computing

hasValue equal to a specified individual or data type

minCardinality

maxCardinality

Cardinality (when maxCardinality equals minCardinality)
OWL 10
Restrictions (2)
Examples of restriction fragments
<owl:Restriction>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasFather"/>
<owl:maxCardinality rdf:datatype="xsd:nonNegativeInteger">
1
</owl:maxCardinality>
</owl:Restriction>
< l R t i ti >
Service-Oriented Computing
<
ow
l
:
R
es
t
r
i
c
ti
on
>
<owl:onProperty rdf:resource='#bakes'/>
<owl:someValuesFrom rdf:resource='#Bread'/>
</owl:Restriction>
OWL 11
Service-Oriented Computing Lecture 7: OWL
Note 7
Restrictions (3)
<owl:Class rdf:ID="Wine">
<rdfs:subClassOf rdf:resource="&food;PotableLiquid" />
<rdfs:subClassOf>
l R t i ti
< o w
l
:
R
es
t
r
i
c
ti
on>
<owl:onProperty rdf:resource="#hasMaker" />
<owl:allValuesFrom rdf:resource="#Winery" />
</owl:Restriction>
</rdfs:subClassOf>
...
</owl:Class>
Service-Oriented Computing
The maker of a Wine must be a Winery. The
allValuesFrom restriction is on the hasMaker property of
this Wine class only. Makers of Cheese are not
constrained by this local restriction
OWL 12
Axioms (1)

Assertions that are given to be true

Can be es
p
eciall
y

p
owerful in combination with
p y p
other axioms, which may come from different
documents

Some primitives

rdfs:subClassOf

キﰺﱥﹴ
北イ便ﹴュ﹧

キﰺﱥﹴ
w
Service-Oriented Computing Lecture 7: OWL
Note 8
Axiomsa (2)
<owl:AllDifferent> <!– in essence, pair-wise inequalities
<owl:distinctMembers rdf:parseType='Collection'>
<ex:Country rdf:ID
='
Russia
'
/>
<ex:Country

rdf:ID Russia/>
<ex:Country rdf:ID='India'/>
<ex:Country rdf:ID='USA'/>
<owl:distinctMembers/>
</owl:AllDifferent>
<ex:Country rdf:ID='Iran'/>
Service-Oriented Computing
<ex:Country rdf:ID='Persia'>
<owl:sameAs rdf:resource='#Iran'/>
</ex:Country>
OWL 14
Restrictions versus Axioms

Axioms are global assertions that can be used as
the basis for further inference

Restrictions are constructors

When we state that hasFather has a maxCardinality of 1,
we are

Defining the class of animals who have zero or one fathers: this
class may or may not have any instances

Not stating that all animals have zero or one fathers
Service-Oriented Computing

Often, to achieve the desired effect, we would have
to combine restrictions with axioms (such as based
on equivalentClass)
OWL 15
Service-Oriented Computing Lecture 7: OWL
Note 9
Inference

OWL is about content, not the syntax

Statements from different documents about the
same URI are automatically con
j
oined

OWL can appear unintuitive to the uninitiated

Declare that no one can have more than one mother

Declare Mary is John’s mother

Declare Jane is John’s mother
Service-Oriented Computing

A DBMS would declare an integrity violation

An OWL reasoner would say Mary = Jane
OWL 16
Dialects Compared

OWL DL: the core dialect, includes DL primitives;
not necessarily (but often practically) tractable

OWL Lite: adds restrictions to OWL DL to make
it tractable

OWL Full: lifts restrictions to allow other
interpretations; extremely general; quite
intractable;included just for fancy
Service-Oriented Computing
intractable;

included

just

for

fancy

expressiveness needs
OWL 17
Service-Oriented Computing Lecture 7: OWL
Note 10
Expressiveness Limitations (1)
OWL DL cannot express some simple requirements

Non-tree models: because instance variables are
implicit in OWL restrictions, OWL cannot express
conditions that require that two variables be
identified

Think of siblings – two people who have the same
parents – but in terms of classes
Service-Oriented Computing

Do the same thing with class definitions
OWL 18
Expressiveness Limitations (2)
Specialized properties

Cannot state that the child of a mammal must be a
mammal and so on without

Defining new child properties for each class

Adding an axiom for each class stating that it is a
subClassOf the restriction of hasChild to itself

Analogous to the problem in a strongly typed
bj t
i t d l ith t i
Service-Oriented Computing
o
bj
ec
t
-or
i
en
t
e
d

l
an
g
ua
g
e w
ith
ou
t

g
ener
i
cs

You have to typecast the contents of a hash table or
linked list
OWL 19
Service-Oriented Computing Lecture 7: OWL
Note 11
Expressiveness Limitations (3)

Constraints among individuals

Cannot define tall person: class of persons whose
height is above a certain threshold

Can define ETHusband: class of persons who have
been married to Elizabeth Taylor

Cannot capture defeasibility (also known as
nonmonotonicity)
Service-Oriented Computing

Birds fly

Penguins are birds

Penguins don’t fly
OWL 20
Summary

OWL builds on RDF to provide a rich vocabulary
for capturing knowledge

Synthesizes a lot of excellent work on discrete,
taxonomic knowledge representation

Fits well with describing information resources – a
basis for describing metadata vocabularies

Critical for unambiguously describing services so they
b l t d d it bl d
Service-Oriented Computing
can
b
e se
l
ec
t
e
d
an
d
su
it
a
bl
y engage
d
OWL 21