Ontologies

advertisement
Contents
 Introduction to Ontologies
 Ontology Engineering
 OWL: Web Ontology Language
4
5
What are ontologies?
 Ontologies are content theories about
the sorts of objects, properties of
objects, and relations between
objects that are possible in a
specified domain of knowledge.
6
What are ontologies? (3)
Studer(98):
Formal, explicit specification of a shared conceptualization
Machine
readable
Concepts, properties,
functions, axioms
are explicitly defined
Consensual
knowledge
Abstract model of
some phenomena
in the world
8
Requirements for an Ontologylanguage (1)
Well designed




Useful and proven modelling primitives
Intuitive to human users
Expressive enough
Efficient and complete reasoning support
12
Requirements for an Ontologylanguage (2)
Well defined


clear syntax - read ontologies
Formal semantics – understand (process)
ontologies - to facilitate machine interpretation
of that semantics
13
Requirements for an Ontologylanguage (3)
Compatible


Easy mapping to/from other ontology
languages
Maximum compatibility with XML and
RDF(S)
14
15
What Is “Ontology Engineering”?
Ontology Engineering: Defining terms in the
domain and relations among them




Defining concepts in the domain (classes)
Arranging the concepts in a hierarchy (subclasssuperclass hierarchy)
Defining which attributes and properties (slots)
classes can have and constraints on their values
Defining individuals and filling in slot values
16
Tool for Ontology Engineering
 Screenshots in further examples are from
Protégé-2000, which:



is a graphical ontology-development tool
supports a rich knowledge model
is open-source and freely available
(http://protege.stanford.edu/index.shtml)
17
Determine Domain and Scope
 What is the domain that the ontology will
cover?
 For what we are going to use the ontology?
 For what types of questions the information in
the ontology should provide answers
(competency questions)?
Answers to these questions may change during the
lifecycle
18
Example Ontology
Which wine
should
I serve with
seafood
today?
French wines
and
wine regions
A shared
ONTOLOGY
of
wine and food
California
wines and
wine regions
19
Competency Questions
 Which wine characteristics should I consider when
choosing a wine?
 Is Bordeaux a red or white wine?
 Does Cabernet Sauvignon go well with seafood?
 What is the best choice of wine for grilled meat?
 Which characteristics of a wine affect its appropriateness
for a dish?
 Does a flavor or body of a specific wine change with
vintage year?
20
Enumerating Terms - The Wine
Ontology
wine, grape, winery, location,...
wine color, wine body, wine flavor, sugar content,...
white wine, red wine, Bordeaux wine,...
food, seafood, fish, meat, vegetables, cheese,...
21
Define Classes and the Class
Hierarchy
 A class is a concept in the domain




a class of wines
a class of wineries
a class of red wines
…
 A class is a collection of elements (instances
of classes) with similar properties
22
Class Inheritance
 Classes usually constitute a taxonomic hierarchy
(a subclass-superclass hierarchy)
 A class hierarchy is usually an IS-A hierarchy:
an instance of a subclass is an instance of a superclass
 If you think of a class as a set of elements, a
subclass is a subset
23
Class Inheritance - Example
 Apple is a subclass of Fruit
Every apple is a fruit
 Red wines is a subclass of Wine
Every red wine is a wine
 Chianti wine is a subclass of Red wine
Every Chianti wine is a red wine
24
Levels in the Hierarchy
Top
level
Middle
level
Bottom
level
25
Modes of Development
 top-down – define the most general
concepts first and then specialize them
 bottom-up – define the most specific
concepts and then organize them in more
general classes
 combination – define the more salient
concepts first and then generalize and
specialize them
26
Define Properties of Classes – Slots
 Slots in a class definition describe attributes
of instances of the class and relations to
other instances
 Each wine will have color, sugar content,
producer, etc
28
Properties (Slots)
 Types of properties




“intrinsic” properties: flavor and color of wine
“extrinsic” properties: name and price of wine
parts: ingredients in a dish
relations to other objects: producer of wine (winery)
 Simple and complex properties


simple properties (attributes): contain primitive values
(strings, numbers)
complex properties: contain (or point to) other objects
(e.g., a winery instance)
29
Slots for the Class Wine
(in Protégé-2000)
30
Slot and Class Inheritance
 A subclass inherits all the slots from the
superclass
If a wine has a name and flavor, a red wine also has a name
and flavor
 If a class has multiple superclasses, it inherits
slots from all of them
Port is both a dessert wine and a red wine. It inherits “sugar
content: high” from the former and “color:red” from the
latter
31
Property Constraints
 Property constraints (facets) describe or
limit the set of possible values for a slot
The name of a wine is a string
The wine producer is an instance of Winery
A winery has exactly one location
32
Common Facets
 Slot cardinality – the number of values a slot has
 Slot value type – the type of values a slot has
 Minimum and maximum value – a range of
values for a numeric slot
 Default value – the value a slot has unless
explicitly specified otherwise
33
Common Facets: Slot Cardinality
 Minimum cardinality


Minimum cardinality 1 means that the slot must have a value
(required)
Minimum cardinality 0 means that the slot value is optional
 Maximum cardinality


Maximum cardinality 1 means that the slot can have at most
one value (single-valued slot)
Maximum cardinality greater than 1 means that the slot can
have more than one value (multiple-valued slot)
34
Common Facets: Value Type




String: a string of characters (“Château Lafite”)
Number: an integer or a float (15, 4.5)
Boolean: a true/false flag
Enumerated type: a list of allowed values (high,
medium, low)
 Complex type: an instance of another class

Specify the class to which the instances belong
The Wine class is the value type for the slot
“produces” at the Winery class
35
Domain and Range of Slot
 Domain of a slot – the class (or classes) that
have the slot

More precisely: class (or classes) instances of
which can have the slot
 Range of a slot – the class (or classes) to
which slot values belong
36
Facets and Class Inheritance
 A subclass inherits all the slots from the superclass
 A subclass can override the facets to “narrow” the
list of allowed values


Make the cardinality range smaller
Replace a class in the range with a subclass
Wine
producer
is-a
French
wine
Winery
is-a
producer
French
winery
37
Create Instances
 Create an instance of a class


The class becomes a direct type of the instance
Any superclass of the direct type is a type of the
instance
 Assign slot values for the instance frame


Slot values should conform to the facet constraints
Knowledge-acquisition tools often check that
38
Creating an Instance: Example
39
Multiple Inheritance
 A class can have more than
one superclass
 A subclass inherits slots and
facet restrictions from all the
parents
 Different systems resolve
conflicts differently
42
Disjoint Classes
 Classes are disjoint if they cannot have common instances
 Disjoint classes cannot have any common subclasses either
Port
Wine
Dessert
wine
Red wine, White wine,
Rosé wine are disjoint
Dessert wine and Red
wine are not disjoint
Red
wine
White
wine
Rosé
wine
43
Avoiding Class Cycles
 Danger of multiple
inheritance: cycles in the class
hierarchy
 Classes A, B, and C have
equivalent sets of instances

By many definitions, A, B, and
C are thus equivalent
44
Siblings in a Class Hierarchy
 All the siblings in the class
hierarchy must be at the
same level of generality
 Compare to section and
subsections in a book
45
The Perfect Family Size (1)
 If a class has only one child,
there may be a modeling
problem
 If the only Red Burgundy we
have is Côtes d’Or, why
introduce the subhierarchy?
 Compare to bullets in a
bulleted list
46
The Perfect Family Size (2)
 If a class has more
than a dozen children,
additional
subcategories may be
necessary
 However, if no natural
classification exists,
the long list may be
more natural
47
Single and Plural Class Names
 A “wine” is not a kind-of
“wines”
 A wine is an instance of the
class Wines
Class
instance-of
Instance
48
Classes and Their Names
 Classes represent concepts in the domain, not
their names
 The class name can change, but it will still refer to
the same concept
 Synonym names for the same concept are not
different classes

Many systems allow listing synonyms as part of the
class definition
49
A Completed
Hierarchy of Wines
50
Back to the Slots:
Domain and Range
DOMAIN
class
RANGE
slot
allowed values
 When defining a domain or range for a slot, find the most
general class or classes
 Consider the flavor slot


Domain: Red wine, White wine, Rosé wine
Domain: Wine
 Consider the produces slot for a Winery:


Range: Red wine, White wine, Rosé wine
Range: Wine
51
Defining Domain and Range
 A class and a superclass
– replace with the
superclass
 All subclasses of a class
– replace with the
superclass
 Most subclasses of a
class – consider
replacing with the
superclass
52
Inverse Slots
Maker and
Producer
are inverse slots
53
Default Values
 Default value – a value the slot gets when
an instance is created
 A default value can be changed
 The default value is a common value for the
slot, but is not a required value
 For example, the default value for wine
body can be FULL
54
Limiting the Scope (1)
 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
55
Limiting the Scope (2)
 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?
56
57
OIL: Ontology Inference Layer
Frames:
modeling primitives
Description Logics:
formal semantics &
automated reasoning
support
Web languages:
XML & RDF based syntax, RDFS mapping
63
Defining a More Expressive
Ontology Language (1)
 The RDF schema mechanism can be used to
define elements of OIL
64
Defining a More Expressive
Ontology Language (2)
 Defining herbivore as subclass-of animal, NOT carnivore
65
OIL: Extends Frame Languages (1)
 Classes can be primitive (necessary conditions)

elephant  animal that has-colour grey
 or defined (necessary and sufficient conditions)

vegetarian  person who eats meat nor fish
 Classes allowed in slot constraints


slot-constraint eats has-value meat
(eats some meat)
slot-constraint eats value-type meat
(eats only meat)
66
OIL: Extends Frame Languages (2)
 Can use arbitrary class expressions instead of only
class names

slot-constraint eats value-type NOT (OR meat fish)
 Cardinality constraints can include value-types

slot-constraint eats max-cardinality 1 plant
 Supports sub-slot relation

daughter-of sub-slot of child-of
 Slot properties


transitive (e.g., part-of )
symmetrical (e.g., connected-to)
67
OIL (explained by example)
class-def animal
animals are a class
class-def plant
plants are a class
subclass-of NOT animal
that is disjoint from animals
class-def tree
subclass-of plant
trees are a type of plants
class-def branch
slot-constraint is-part-of
branches are parts of some tree
has-value tree
max-cardinality 1
class-def defined carnivore
carnivores are animals
subclass-of animal
slot-constraint eats
that eat any other animals
value-type animal
class-def defined herbivore
herbivores are animals
subclass-of animal, NOT carnivore that are not carnivores, and
slot-constraint eats
they eat plants or parts of plants
value-type plant OR (slot-constraint is-part-of has-value plant)
69
Class Definition in OIL
 class-def associates a class name with a class
description
 The class description consists of:



the type of the definition (either primitive, which means that the
stated conditions for class membership are necessary but not
sufficient, or defined, which means that these conditions are both
necessary and sufficient)
a subclass-of statement
zero or more slot-constraints
71
Subclass Definition in OIL
 The value of a subclass-of statement is a
(list of) class-expression(s), which can be
either:



a class name,
a slot-constraint,
a Boolean combination of class expressions
using the operators AND, OR and NOT, with
the standard DL semantics.
72
Slot-Constraints in OIL (1)
 A slot-constraint (a slot may also be called a role or
an attribute) is a list of one or more constraints
(restrictions) applied to a slot. Typical
constraints are:

has-value (class-expr)
value-type (class-expr)

max-cardinality n (class-expr)

73
Slot-Constraints in OIL (2)
 has-value (class-expr)

Every instance of the class defined by the slot
constraint must be related, via the slot relation,
to an instance of each class expression in the
list
74
Slot-Constraints in OIL (3)
 value-type (class-expr)

If an instance of the class defined by the slotconstraint is related via the slot relation to some
individual x, then x must be an instance of each
class-expression in the list
75
Slot-Constraints in OIL (4)
 max-cardinality n (class-expr)

An instance of the class defined by the slotconstraint can be related to at most n distinct
instances of the class-expression via the slot
relation (also min-cardinality and, as a shortcut
for both min and max, cardinality)
76
Slot Definition in OIL
 A slot definition (slot-def) associates a slot
name with a slot definition. A slot definition
specifies global constraints that apply to the slot
relation. A slot-def can consist of:



a subslot-of statement,
domain and range restrictions,
additional qualities of the slot:
• inverse,
• transitive,
• symmetric.
77
Web Ontology Language OWL
86
(In)famous “Layer Cake”
???
???
???
 Semantics+reasoning
 Relational Data
?
OWL
 Data Exchange
95
OWL-RDFS Relationship
 Both use the same data model:
page.html
hasAuthor
“Dieter Fensel“
Resource
Property
Value
(subject)
(predicate)
(object)
 OWL extends vocabulary and adds axioms
97
Origins of OWL
DAML
OIL
RDF
DAML+OIL
OWL
98
History
 Two languages developed to satisfy above requirements

OIL (Object Inference Layer): developed by group of (largely) European
researchers (several from EU OntoKnowledge project)

DAML-ONT: developed by group of (largely) US researchers (in DARPA
DAML programme)
 Efforts merged to produce DAML+OIL


Development was carried out by “Joint EU/US Committee on Agent
Markup Languages”
Extends (“DL subset” of) RDF
 DAML+OIL submitted to W3C as basis for standardisation

Web-Ontology (WebOnt) Working Group formed

WebOnt group developed OWL language based on DAML+OIL

OWL language now a W3C Recommendation (01.02.2004)
99
OWL Language - Overview




Three species of OWL

OWL DL stays in Description Logic fragment

OWL Lite is “easier to implement” subset of OWL DL

OWL Full is union of OWL syntax and RDF
Full
DL
Lite
OWL DL based on SHIQ Description Logic

In fact it is equivalent to SHOIN(Dn) DL
OWL DL Benefits from many years of DL research

Well defined semantics

Formal properties well understood (complexity, decidability)

Known reasoning algorithms
Syntactic

Implemented systems (highly optimised)
layering
Semantic layering
OWL full has all that and all the possibilities
of RDF/RDFS which destroy decidability
100
Description Logic Family
Necessary and sufficient conditions
 Inclusion axioms provide necessary
conditions:

concept ⊑ definition
 Equivalence axioms provide necessary and
sufficient conditions:
concept ≡ definition
{
concept ⊑ definition and
definition ⊑ concept
102
Description Logic
Vocabulary and Semantics:
Dom … Domain
I … Interpretation
T
(T)I = Dom
┴
C
(┴)I = {}
(C)I = Dom\CI
C⊓D
(C ⊓ D)I = CI  DI
C⊔D
(C ⊔ D)I = CI  DI
R.C
(R.C)I = { x | (x,y)  RI  y  CI }
R.C
(R.C)I = { x | (x,y)  RI  y  CI }
nR.C
(nR.C)I = { x | |{ y | (x,y)  RI  y  CI }|  n }
nR.C
(nR.C)I ={ x | |{ y | (x,y)  RI  y  CI }|  n }
=nR.C
(=nR.C)I ={ x | |{ y | (x,y)  RI  y  CI }| = n }
nR
(nR)I = { x | |{ y | (x,y)  RI }|  n }
nR
(nR)I ={ x | |{ y | (x,y)  RI }|  n }
=nR
(=nR)I ={ x | |{ y | (x,y)  RI }| = n }
(a class which ANY legal instance is a member of: owl:Thing)
103
Describing Classes in OWL
104
Complex Classes
Union of Classes

Instances of the Union of two Classes are either the
instance of one or both classes
Person ≡ Man ⊔ Woman
<owl:Class rdf:ID=“Person">
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="#Woman" />
<owl:Class rdf:about="#Man" />
</owl:unionOf>
</owl:Class>
107
Complex Classes
Intersection of Classes

Instances of the Intersection of two Classes are
simultaneously instances of both class
Man ≡ Person ⊓ Male
<owl:Class rdf:ID=“Man">
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="#Person" />
<owl:Class rdf:about="#Male" />
</owl:intersectionOf>
</owl:Class>
108
one of: Enumerated Classes
 Specify a class via a direct enumeration of
its members:
WhineColor ≡ {White, Rose, Red}
<owl:Class rdf:ID="WineColor">
<rdfs:subClassOf rdf:resource="#WineDescriptor"/>
<owl:oneOf rdf:parseType="Collection">
<owl:Thing rdf:about="#White"/>
<owl:Thing rdf:about="#Rose"/>
<owl:Thing rdf:about="#Red"/>
</owl:oneOf>
</owl:Class>
109
Necessary vs. necessary and
sufficient conditions in OWL…
 Necessary condition (⊑) via
rdfs:subclass
 Necessary and sufficient (≡) either by
⊑ + ⊒, i.e. 2 subclass definitions or:
owl:equivalentClass
110
Complex Classes
Property Restrictions
 Defining a Class by restricting its possible instances
via their property values
 OWL distinguishes between the following two:

Value constraint
• (Mother ≡ Woman ⊓ hasChild.Person)

Cardinality constraint
• (MotherWithManyChildren ≡ Mother ⊓ ≥3hasChild)
 Property restrictions are local

remember RDFS allows only global properties
111
Complex Classes - Property Restrictions
someValuesFrom
 A Mother is a Woman that has a child (some Person)
Mother ⊑ Woman ⊓ hasChild.Person
<owl:Class rdf:ID=“Mother">
<rdfs:subClassOf rdf:resource="#Woman" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasChild" />
<owl:someValuesFrom rdf:resource="#Person" />
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
112
Complex Classes - Property Restrictions
allValuesFrom
 To express the set of parents that only have female
children (daughters) you would write:
ParentsWithOnlyDaughters ⊑ Person ⊓ hasChild.Woman
<owl:Class rdf:ID=“ParentsWithOnlyDaughters">
<rdfs:subClassOf rdf:resource="#Person" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasChild" />
<owl:allValuesFrom rdf:resource="#Woman" />
</owl:Restriction>
</rdfs:subClassOf>
...
</owl:Class>
113
Complex Classes - Property Restrictions
hasValue
 hasValue allows to define classes based on the existence of particular
property values, their must be at least one matching property value
 The set of all childs of the woman MARY would be expressed like
following:
MarysChildren ⊑ Person П hasParent.{MARY}
<owl:Class rdf:ID=“MarysChildren">
<rdfs:subClassOf rdf:resource="#Person" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasParent" />
<owl:hasValue rdf:resource="#MARRY" />
</owl:Restriction>
</rdfs:subClassOf>
</rdfs:subClassOf>
...
</owl:Class>
114
Complex Classes - Property Restrictions
cardinality
 Definition of cardinality: the number of occurrences, either
maximum (maxCardinality) or minimum (minCardinality) or exact
(cardinality) based upon the context (class) in which it is used
 To define a half-orphan (Halbwaise) you would write the following:
HalfOrphan ⊑ Person П =1hasParent.Person
<owl:Class rdf:ID=“HalfOrphan">
<rdfs:subClassOf rdf:resource="#Person" />
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasParent"/>
<owl:cardinality rdf:datatype="&xsd;NonNegativeInteger">1</owl:cardinality>
</owl:Restriction>
</rdfs:subClassOf>
</rdfs:subClassOf>
…
115
</owl:Class>
Describing Properties in OWL
117
Properties OWL vs. RDF
 RDF Schema provides a couple of pre defined properties:



rdfs:range used to indicate the range of values for a property.
rdfs:domain used to associate a property with a class.
rdfs:subPropertyOf used to specialize a property.
 OWL provides additional poperty classes, which allow
reasoning and inferencing, i.e.



owl:functionalProperty
owl:transitiveProperty
owl:symetricProperty
118
Properties OWL vs. RDF
 OWL (DL and Lite) distinguishes between data type
ptoperties and object properties (RDFS does not)
An ObjectProperty relates one Resource to another Resource:
Resource
ObjectProperty
Resource
A DatatypeProperty relates a Resource to a Literal or an XML Schema data type:
Resource
DatatypeProperty
Value
119
Properties in OWL
Transitive Property
 Example: If person A is a ancestor of person B and
B of C then A is also an ancestor of C.
ancestor+  ancestor
<owl:ObjectProperty rdf:ID=“ancesotor">
<rdf:type rdf:resource="&owl;TransitiveProperty" />
<rdfs:domain rdf:resource="#Person" />
<rdfs:range rdf:resource="#Person" />
</owl:ObjectProperty>
122
Properties in OWL
Symmetric Property
 Example: If Mary is akin to John then John is also
akin to Mary
akin-  akin and akin  akin-
<owl:ObjectProperty rdf:ID=“akin">
<rdf:type rdf:resource="&owl;SymmetricProperty" />
<rdfs:domain rdf:resource="#Person" />
<rdfs:range rdf:resource="#Person" />
</owl:ObjectProperty>
123
Properties in OWL
Inverse Property
 Example: If Mary is a child of John then John is
the Father of Mary
hasChild  hasParent-
<owl:ObjectProperty rdf:ID=“hasChild">
<owl:inverseOf rdf:resource="hasParent" />
</owl:ObjectProperty>
124
Properties in OWL
Functional Properties
 A functional property states that the value of range
for a certain object in the domain is always the
same:
 Example: A child has always the same Father
(biological)
Person  1hasFather
<owl:ObjectProperty rdf:ID=“hasFather">
<rdf:tyoe rdf:resource="&owl;FunctionalProperty"/>
</owl:ObjectProperty>
125
OWL Property Classes
 The symmetric and transitive property may
only used for connecting two resources:
rdf:Property
owl:ObjectProperty
owl:SymmetricProperty
owl:DatatypeProperty
owl:FunctionalProperty
owl:InverseFunctionalProperty
owl:TransitiveProperty
126
OWL as DL: Axioms
Description Logic
First Order Logic
128
OWL as DL: Axioms
Social Security Number
129
Subsumption
 The presented examples contain a number of classes and properties
intended to illustrate particular aspects of reasoning in OWL.
 We can make inferences about relationships between classes, in
particular subsumption between classes
 Recall that A subsumes B when it is the case that any instance of B
must necessarily be an instance of A.
A
B
131
Subsumption
An Example






Woman ≡ Person ⊓ Female
Man ≡ Person ⊓ Woman
Mother ≡ Woman ⊓ hasChild.Person
Father ≡ Man ⊓ hasChild.Person
Parent ≡ Father ⊔ Mother
Grandmother ≡ Mother ⊓ hasChild.Parent
We can further infer (though not explicitly stated):
 Grandmother ⊑ Person
Grandmother ⊑ Man ⊔ Woman
etc.
132
Subsumption
Example in Protégé
133
Subsumption
Inferred Hierarchy in Protégé
134
Inconsistency
 You may define Classes were no individual
can fulfill its definition. Via reasoning
engines such a definition can be found also
in big ontologies.
135
Inconsistency
Example




Cow ≡ Animal ⊓ Vegetarian
Sheep ⊑ Animal
Vegetarian ≡ eats  Animal
MadCow ≡ Cow ⊓ eats.Sheep
136
Inconsistency
Example in Protégé
137
Inconsistency
Detected Inconsistency in Protégé
138
Some more aspects of Reasoning
in OWL
 Open world assumption
 No unique name assumption
139
Open world assumption (OWA):


In Database Systems, usually the closed world assumption is made: “The fact in the databases describe
completely what I know, all that is not in the database is assumed to be false”.
This assumption is usually not valid in an open context such as the web!
Example: resource1 says:
“There is a train at 14:00”
“There is a train at 15:00”
My query:
“Is there a train at 17:00?”
CWA answer: No!
OWA answer: unknown! (i.e. there could be another resource2 which has info on another train at 17:00!)
Reasoning in OWL is OWL! Assume we have an RDF file with the following triples:
T1 rdf:type Train .
T2 rdf:type Train .
T1 departureTime “15:00” .
T1 departureTime “15:00” .

Train ⊓ departureTime.{“17:00”} is not inconsistent by OWA!!!
140
No unique name assumption:

What does it mean? E.g. A Child has two parents, but Marry hasParents {John Doe, Lissa
Doe, Lissa Minelly}??
Some facts:
family:Marry rdf:type family:person.
family:Marry ex:hasParent family:JohnDoe.
family:Marry ex:hasParent family:LissaDoe.
family:Marry ex:hasParent family:LissaMinelly.
Some cardinality axiom (in DL):
family:person ⊑ 2 hasParent.T
There is no unique name assumption, this means that JohnDoe, LissaDoe and LissaMinelly are not necessarily different
objects.
Three possible options which can be “inferred” from the above example::
family:LissaDoe = family:LissaMinelly
family:JohnDoe = family:LissaMinelly
family:JohnDoe = family:LissaMinelly
Only the first is intuitive.
If we add facts and axioms stating that JohnDoe is male, LissaMinelly is female, LissaDoe is female and female are
disjoint from male then only the first intuitive solution remains.
141
Individual Identity and Mapping
 To explicitly state that individuals are different:

owl:differentFrom
(between 2 individuals)

owl:allDifferent
(between a set of individuals)
 To explicitly state that two individuals are identical

owl:sameIndividualAs / owl:sameAS
 To explicitly state that two classes are identical

owl:equivalentClass
 To explicitly state that two properties are identical

owl:equivalentProperty
142
OWL on one Slide






















Symmetric: if P(x, y) then P(y, x)
Transitive: if P(x,y) and P(y,z) then P(x, z)
Functional: if P(x,y) and P(x,z) then y=z
InverseOf: if P1(x,y) then P2(y,x)
InverseFunctional: if P(y,x) and P(z,x) then y=z
allValuesFrom: P(x,y) and y=allValuesFrom(C)
someValuesFrom: P(x,y) and y=someValuesFrom(C)
hasValue: P(x,y) and y=hasValue(v)
cardinality: cardinality(P) = N
minCardinality: minCardinality(P) = N
maxCardinality: maxCardinality(P) = N
equivalentProperty: P1 = P2
intersectionOf: C = intersectionOf(C1, C2, …)
unionOf: C = unionOf(C1, C2, …)
complementOf: C = complementOf(C1)
oneOf: C = one of(v1, v2, …)
Legend:
equivalentClass: C1 = C2
Properties are indicated by: P, P1, P2, etc
disjointWith: C1 != C2
Specific classes are indicated by: x, y, z
sameIndividualAs: I1 = I2
Generic classes are indicated by: C, C1, C2
differentFrom: I1 != I2
Values are indicated by: v, v1, v2
Instance documents are indicated by: I1, I2, I3, etc.
AllDifferent: I1 != I2, I1 != I3, I2 != I3, …
143
A number is indicated by: N
Thing: I1, I2, …
P(x,y) is read as: “property P relates x to y”
Back to the OWL Layers (Lite, DL, Full)
 OWL Lite
(sub)classes, individuals
(sub)properties, domain, range
intersection
(in)equality
cardinality 0/1
datatypes
inverse, transitive, symmetric
hasValue
someValuesFrom
allValuesFrom
OWL DL
Negation (disjointWith, complementOf)
unionOf
Full Cardinality
Enumerated types (oneOf)
RDF Schema
Full
DL
Lite
 OWL Full
 Allow meta-classes etc
144
Things OWL doesn’t do
•
•
•
•
•
default values
closed world option
arithmetic
string operations
involved axioms on axiom values, such
as functional dependencies
• partial imports
• view definitions (it is not a query language)
• procedural attachment
148
Summary
 Compared with RDF/RDFS, OWL provides a
more formal language which allows expressing
more axioms, but also adds some restrictions
 We can do inferences such as classify instances,
detect inconsistencies, etc.
 Last version Feb. 2004, but still under progress
 http://www.w3.org/2004/OWL/
149
Download