Title: Ontologies in Semantic Web
1Ontologiesin Semantic Web
www.ontoknowledge.org/oil
- Based on tutorials and presentations
- D. Lee, F. Harmelen, M. Arumugam, C. Goble, I.
Horrocks, N. F. Noy, D.L. McGuinness, J.
Broekstra, M. Klein, S. Decker, D. Fensel, DERI
Group
2Communication between people
3The More or Less Global Agreement about Standard
Terminology and Conceptual Hierarchy for a Domain
Description is Necessary for the Interoperability
in the Intelligent Web
4Contents
- Introduction to Ontologies
- Ontology Engineering
- OWL Web Ontology Language
5Introduction to Ontologies
6What 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.
7What are ontologies? (2)
- Ontology as vocabularyOntology is a
representation vocabulary, often specialized to
some domain or subject matter. - Ontology as content theoryThe main contribution
of ontology is to identify specific classes of
objects and relations that exist in some domain.
8What are ontologies? (3)
Studer(98) Formal, explicit specification of a
shared conceptualization
9Why are ontologies important?
- Ontological analysis clarifies the structure of
knowledge. - Ontologies enable knowledge sharing.
10Describing the world
- subtypes of concepts.
- task dependence of ontologies.
11Requirement for an Ontology
- Ontologies to be shared need a standard
representation and exchange language
12Requirements for an Ontology-language (1)
- Well designed
- Useful and proven modelling primitives
- Intuitive to human users
- Expressive enough
- Efficient and complete reasoning support
13Requirements for an Ontology-language (2)
- Well defined
- clear syntax - read ontologies
- Formal semantics understand (process)
ontologies - to facilitate machine interpretation
of that semantics
14Requirements for an Ontology-language (3)
- Compatible
- Easy mapping to/from other ontology languages
- Maximum compatibility with XML and RDF(S)
15Ontology Engineering
16What 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
(subclass-superclass hierarchy) - Defining which attributes and properties (slots)
classes can have and constraints on their values - Defining individuals and filling in slot values
17Tool 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)
18Determine 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
19Example Ontology
A shared ONTOLOGY of wine and food
20Competency 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?
21Enumerating 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,...
22Define 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
23Class 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
24Class 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
25Levels in the Hierarchy
26Modes 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
27Documentation
- Classes (and slots) usually have documentation
- Describing the class in natural language
- Listing domain assumptions relevant to the class
definition - Listing synonyms
- Documenting classes and slots is as important as
documenting computer code!
28Define 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
29Properties (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)
30Slots for the Class Wine
(in Protégé-2000)
31Slot 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 colorred from the latter
32Property 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
33Common 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
34Common 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)
35Common 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
36Domain 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
37Facets 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
Winery
producer
is-a
is-a
French wine
French winery
producer
38Create 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
39Creating an Instance Example
40Defining Classes and a Class Hierarchy
- The things to remember
- There is no single correct class hierarchy
- But there are some guidelines
- The question to ask
- Is each instance of the subclass is an instance
of its superclass?
41Transitivity of the Class Hierarchy
- The is-a relationship is transitive
- B is a subclass of A
- C is a subclass of B
- C is a subclass of A
- A direct superclass of a class is its closest
superclass
42Multiple 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
43Disjoint 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 Redwine are not disjoint
Red wine
Rosé wine
White wine
44Avoiding 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
45Siblings 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
46The 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 dOr,
why introduce the subhierarchy? - Compare to bullets in a bulleted list
47The 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
48Single and Plural Class Names
- A wine is not a kind-of wines
- A wine is an instance of the class Wines
49Classes 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
50A Completed Hierarchy of Wines
51Back to the Slots Domain and Range
DOMAIN
RANGE
slot
class
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
52Defining 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
53Inverse Slots
- Maker and
- Producer
- are inverse slots
54Default 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
55Limiting 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
56Limiting 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?
57OWL Web Ontology Language
58Three-layered architecture of the Semantic Web
59RDF Schema
- RDF
- (very small) commitment to modelling primitives
- but no commitment to domain vocabulary
- RDF Schema
- Define vocabulary for RDF
- Organise this vocabulary in a typed hierarchy
- Class, SubClassOf, type
- Property, subPropertyOf,
- domain, range
60State-of-the-art in W3C
- RDF to represent meta-data
- RDF-S to define vocabulary for RDF
- RDF is data-model syntax
- only a very weak semantic interpretation
- no inference model
- RDF-S goes a step further, but still
- no precisely described meaning
- no inference model
61Quote from Ora Lassila (RDF)
- Future We Need More!
- Structural modeling obviously not enough
- we need a logic layer on top of RDF
- some type of description logic is a possibility
(after all, we are talking about frame systems) - Exposing a wide variety of data sources as RDF is
useful, particularly if we have logic/rules which
allow us to draw inference from this data - My proposal RDF DL Frame System for WWW
62Quote from Henry Thompson
The Semantic Web needs a logic on top
OIL modeling primitives from frames semantics
and inference from Description Logic syntax from
RDF(S) XML(S)
63OIL Ontology Inference Layer
Description Logics formal semantics
automated reasoning support
Frames modeling primitives
Web languages XML RDF based syntax, RDFS
mapping
64Defining a More Expressive Ontology Language (1)
- The RDF schema mechanism can be used to define
elements of OIL
65Defining a More Expressive Ontology Language (2)
- Defining herbivore as subclass-of animal, NOT
carnivore
66OIL 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)
67OIL 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)
68OIL as RDFS Extension
69OIL (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)
70OIL as RDF(S) extension
ltrdfsClass rdfIDherbivoregt ltrdftype
rdfresourcehttp//www.ontoknowledge.org/
DefinedClass/gt ltrdfssubClassOf
rdfresourceanimal/gt ltrdfssubClassOfgt
ltoilNOTgt ltoilhasOperand
rdfresourcecarnivore/gt lt/oilNOTgt
lt/rdfssubClassOfgt lt/rdfsClassgt
71Class 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
72Subclass 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.
73Slot-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)
74Slot-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
75Slot-Constraints in OIL (3)
- value-type (class-expr)
- If an instance of the class defined by the
slot-constraint is related via the slot relation
to some individual x, then x must be an instance
of each class-expression in the list
76Slot-Constraints in OIL (4)
- max-cardinality n (class-expr)
- An instance of the class defined by the
slot-constraint 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)
77Slot 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.
78Namespaces for OIL
- lt?xml version'1.0'?gt
- ltrdfRDF
- xmlnsrdf"http//www.w3.org/1999/02/22-rdf
-syntax-ns" - xmlnsrdfs"http//www.w3.org/TR/1999/PR-rd
f-schema-19990303" - xmlnsoil"http//www.ontoknowledge.org/oil
/rdfschema" - xmlnsdc"http//purl.org/dc/elements/1.1/"
- xmlnsdcq"http//purl.org/dc/qualifiers/1.
1/" - lt!-- The ontology defined in OIL with RDFS
syntax--gt -
- lt/rdfRDFgt
79RuleBase Class in OIL
- ltrdfsClass rdfID"RuleBase"gt
- ltrdfscommentgt
- A user-defined rulebase possibly
described - by an external RDF-Schema
- lt/rdfscommentgt
- ltrdfssubClassOf rdfresource
- "http//www.w3.org/TR/1999/PR-rdf-
schema-19990303Resource"/gt - lt/rdfsClassgt
80RuleBase Class Example
- ltrdfDescription xmlnssyllogism"http//old.greec
e/syllogism/"gt - ltrdftype rdfresource
- "http//www.ontoknowledge.o
rg/oil/rdfschemaRuleBase"/gt - ltsyllogismpremisegt
- if it rains, you get
wet - lt/syllogismpremisegt
- ltsyllogismfactgt
- it rains
- lt/syllogismfactgt
- ltsyllogismconclusiongt
- you get wet
- lt/syllogismconclusiongt
- lt/rdfDescriptiongt
81Class Definitions in OIL (1)
- OIL primitive RDFS syntax type
-
- class-def rdfsClass class
- subclass-of rdfssubClassOf property
- class-expression oilClassExpression class
-
(placeholder only) - AND oilAND class
-
(subclass of ClassExpression) - OR oilOR class
-
(subclass of ClassExpression) - NOT oilNOT class
-
(subclass of ClassExpression)
82Class Definitions in OIL (2)
- OIL primitive RDFS syntax type
-
- slot-constraint oilSlotConstraint class
-
(placeholder only) - oilhasSlotConstraint property
-
(rdftype of rdfsConstraintProperty) -
oilNumberRestriction class -
(placeholder only) -
(subclass of oilSlotConstraint) - has-value oilHasValue class
-
(subclass of oilSlotConstraint) - value-type oilValueType class
-
(subclass of oilSlotConstraint)
83Class Definitions in OIL (3)
- OIL primitive RDFS syntax type
-
- max-cardinality oilMaxCardinality class
-
(subclass of oilNumberRestriction) - min-cardinality oilMinCardinality class
-
(subclass of oilNumberRestriction) - cardinality oilCardinality class
-
(subclass of oilNumberRestriction)
84Example of OIL Definition
- has-part is inverse to is-part-of
- is in RDFS
- ltrdfProperty rdfID"has-part"gt
- ltrdftype rdfresource
- "http//www.ontoknowledge.org/oil/rdfschema/Trans
itiveRelation"/gt - ltoilinverseRelationOf rdfresource"is-pa
rt-of"/gt - lt/rdfPropertygt
85OIL as RDF(S) extension
RDF(S)
OIL
- class-def
- subclass-of
- slot-def
- subslot-of
- domain
- range
- class-expressions
- AND, OR, NOT
- slot-constraints
- has-value, value-type
- cardinality
- slot-properties
- trans, symm
86Web Ontology Language OWL
87Outline
- Clarification
- What are Ontologies?
- Revisited
- How we already have learned to express ontologies
- Web Ontology Language -OWL
- extending expressivity
- Semantics of Reasoning with OWL
- using the extended expressivity
88Clarification What are Ontologies?
- Ontology in Philosophy
- The metaphysical study of the nature of being
and existence - Ontology in Artificial Intelligence
- a shared and common understanding of some domain
that can be communicated between people and
application systems (Gruber)
89Clarification What are Ontologies?
- Ontology (languages) for the Semantic Web
- We aim at a (XML-based) language to formally
describe concepts, instances, relations and
axioms, i.e. datastructure in order to enable
machine-processable reasoning on and exchange of
data. - ? Knowledge representation, exchange, combination
(inference of new knowledge!)
90Whats inside an ontology?
- Concepts Classes class-hierarchy
- instances
- Properties often also called Roles or Slots
- labeled instance-value-pairs
- Axioms/Relations
- relations between classes (disjoint, covers)
- inheritance (multiple? defaults?)
- restrictions on slots (type, cardinality)
- Characteristics of slots (symm., trans., )
- reasoning tasks
- Classification Which classes does an instance
belong to? - Subsumption Does a class subsume another one?
- Consistency checking Is there a contradiction in
my axioms/instances?
91Use Cases for ontologies (from OWL requirements
doc.)
- Web portal
- ontology-based, portal for a community of users
which have shared interest - Multi-media collections
- annotating, searching, ontological search instead
of keyword search - Corporate Website
- knowledge management
- Documentation
- engineering design
- Agents Services, Ubiquitous computing
- Interoperability!
92Outline
- Clarification
- What are Ontologies?
- Revisited
- How we already have learned to express ontologies
- Web Ontology Language -OWL
- extending expressivity
- Semantics of Reasoning with OWL
- using the extended expressivity
93RDF/RDFS
Vehicle
producedBy
Company
subClassOf
subClassOf
SeaVehicle
LandVehicle
subClassOf
subClassOf
NumberOfEngines
Hovercraft
Number
- Recall from last lecture RDF RDFS
- RDF triples for making assertions about
resources - RDFS extends RDF with schema vocabulary, e.g.
- Class, Property
- type, subClassOf, subPropertyOf
- range, domain
- ? representing simple assertions, taxonomy
typing
94RDFSLimitations of RDFS
- RDFS too weak to describe resources in sufficient
detail - No localised range and domain constraints
- Cant say that the range of hasChild is person
when applied to persons and elephant when applied
to elephants - No existence/cardinality constraints
- Cant say that all instances of person have a
mother that is also a person, or that persons
have exactly 2 parents - No transitive, inverse or symmetrical properties
- Cant say that isPartOf is a transitive property,
that hasPart is the inverse of isPartOf or that
touches is symmetrical - No in/equality
- Cant say that a class/instance is the same as
some other class/instance, cant say that somthe
classes/instances are definitely
disjoint/different. - No boolean algebra
- Cant say that that one class is the union,
intersection, complement of other classes, etc.
95(In)famous Layer Cake
? Semanticsreasoning
OWL
?
? Relational Data
? Data Exchange
96Outline
- Clarification
- What are Ontologies?
- Revisited
- How we already have learned to express ontologies
- Web Ontology Language -OWL
- extending expressivity
- Semantics of Reasoning with OWL
- using the extended expressivity
97OWL-RDFS Relationship
- Both use the same data model
- OWL extends vocabulary and adds axioms
hasAuthor
page.html
Dieter Fensel
Resource (subject)
Property (predicate)
Value (object)
98Origins of OWL
DAML
OIL
RDF
DAMLOIL
OWL
99History
- 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 DAMLOIL
- Development was carried out by Joint EU/US
Committee on Agent Markup Languages - Extends (DL subset of) RDF
- DAMLOIL submitted to W3C as basis for
standardisation - Web-Ontology (WebOnt) Working Group formed
- WebOnt group developed OWL language based on
DAMLOIL - OWL language now a W3C Recommendation
(01.02.2004)
100OWL Language - Overview
Full
- 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
- 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
- Implemented systems (highly optimised)
- OWL full has all that and all the possibilities
- of RDF/RDFS which destroy decidability
DL
Lite
Syntactic layering Semantic layering
101Description Logic Family
- DLs are a family of logic based KR formalisms
- Particular languages mainly characterized by
- Set of constructors for building complex concepts
and roles from simpler ones - Set of axioms for asserting facts about concepts,
roles and individuals - Examples
- Female persons
- Person ? Female
- Non-female persons
- Person ? ?Female
- Persons that have a child
- Person ? ?hasChild.Person
- Persons all of whose children are female
- Person ? ?hasChild.Female
- Persons that are employed or self-eployed
- Person ? (Employee ? SelfEmployed)
- Persons the have at most one father
- Person ? 1.hasFather
102Description 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
103Description LogicVocabulary and Semantics
Dom Domain I Interpretation
T (T)I Dom (a class which ANY legal instance is a member of owlThing)
- (-)I
?C (?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
104Describing Classes in OWL
105Classes OWL vs. RDFS
- OWL allows greater expressiveness, but
- OWL (DL/Lite) puts certain constraints on the use
of RDF - For instance a class may not act as an instance
of another (meta)class (the same holds for
properties) - ? OWL has got its own Class identifier
RDFS
OWL
ltowlClass rdfID"River"gt
ltrdfssubClassOf rdfresource"Stream"/gt lt/owlCl
assgt
ltrdfsClass rdfID"River"gt
ltrdfssubClassOf rdfresource"Stream"/gt lt/rdfsC
lassgt
106Class Description RDF constructs
- What can you express in RDF/RDFS?
- Not too much
- rdfssubClassOf class hierarchy, necessary
conditions (also equivalence is expressible
because A ? B and B ? A ? A B) -
- rdftype class membership
- OWL provides more expressive constructs to
express - the DL features!
Employee ? Person
Employee(axel)
107Complex ClassesUnion of Classes
- Instances of the Union of two Classes are either
the instance of one or both classes
Person Man ? Woman
ltowlClass rdfIDPerson"gt ltowlunionOf
rdfparseType"Collection"gt ltowlClass
rdfabout"Woman" /gt ltowlClass
rdfabout"Man" /gt lt/owlunionOfgt
lt/owlClassgt
108Complex ClassesIntersection of Classes
- Instances of the Intersection of two Classes are
simultaneously instances of both class
Man Person ? Male
ltowlClass rdfIDMan"gt ltowlintersectionOf
rdfparseType"Collection"gt ltowlClass
rdfabout"Person" /gt ltowlClass
rdfabout"Male" /gt lt/owlintersectionOfgt
lt/owlClassgt
109one of Enumerated Classes
- Specify a class via a direct enumeration of its
members
WhineColor White, Rose, Red
ltowlClass rdfID"WineColor"gt ltrdfssubClassOf
rdfresource"WineDescriptor"/gt ltowloneOf
rdfparseType"Collection"gt ltowlThing
rdfabout"White"/gt ltowlThing
rdfabout"Rose"/gt ltowlThing
rdfabout"Red"/gt lt/owloneOfgt lt/owlClassgt
110Necessary vs. necessary and sufficient conditions
in OWL
- Necessary condition (?) via
- rdfssubclass
- Necessary and sufficient () either by
- ? ?, i.e. 2 subclass definitions or
- owlequivalentClass
111Complex 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
112Complex Classes - Property Restrictions
someValuesFrom
- A Mother is a Woman that has a child (some
Person)
Mother ? Woman ? ?hasChild.Person
- ltowlClass rdfIDMother"gt
- ltrdfssubClassOf rdfresource"Woman" /gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"hasChild"
/gt - ltowlsomeValuesFrom rdfresource"Person"
/gt - lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
113Complex Classes - Property Restrictions
allValuesFrom
- To express the set of parents that only have
female children (daughters) you would write
ParentsWithOnlyDaughters ? Person ?
?hasChild.Woman
- ltowlClass rdfIDParentsWithOnlyDaughters"gt
- ltrdfssubClassOf rdfresource"Person" /gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"hasChild"
/gt - ltowlallValuesFrom rdfresource"Woman"
/gt - lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- ...
- lt/owlClassgt
114Complex 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
- ltowlClass rdfIDMarysChildren"gt
- ltrdfssubClassOf rdfresource"Person" /gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"hasParent"
/gt - ltowlhasValue rdfresource"MARRY" /gt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/rdfssubClassOfgt
- ...
- lt/owlClassgt
115Complex 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
ltowlClass rdfIDHalfOrphan"gt
ltrdfssubClassOf rdfresource"Person" /gt
ltrdfssubClassOfgt ltowlRestrictiongt
ltowlonProperty rdfresource"hasParent"/gt
ltowlcardinality rdfdatatype"xsdNonNegativ
eInteger"gt1lt/owlcardinalitygt
lt/owlRestrictiongt lt/rdfssubClassOfgt
lt/rdfssubClassOfgt lt/owlClassgt
116 Classes as Restrictions on Properties
- In summarydefine a class using LOCAL
restrictions on a specific Property
rdfsClass
owlClass
owlRestriction
- Properties
- allValuesFrom rdfsClass (lite/DL owlClass)
- hasValue specific Individual
- someValuesFrom rdfsClass (lite/DL owlClass)
- cardinality xsdnonNegativeInteger (in lite
0,1) - minCardinality xsdnonNegativeInteger (in lite
0,1) - maxCardinality xsdnonNegativeInteger (in lite
0,1)
117Describing Properties in OWL
118Properties OWL vs. RDF
- RDF Schema provides a couple of pre defined
properties - rdfsrange used to indicate the range of values
for a property. - rdfsdomain used to associate a property with a
class. - rdfssubPropertyOf used to specialize a property.
- OWL provides additional poperty classes, which
allow reasoning and inferencing, i.e. - owlfunctionalProperty
- owltransitiveProperty
- owlsymetricProperty
119Properties 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
ObjectProperty
Resource
Resource
A DatatypeProperty relates a Resource to a
Literal or an XML Schema data type
DatatypeProperty
Resource
Value
120Why separate Classes and Datatypes?
- Philosophical reasons
- Datatypes structured by built-in predicates
- Not appropriate to form new datatypes using
ontology language - Practical reasons
- Ontology language remains simple and compact
- Semantic integrity of ontology language not
compromised - Implementability not compromised can use hybrid
reasoner
121Datatype Properties Example
- for instance, usage of XSD dattypes
- object properties in OWL allow for some more
sophisticated definitions than only domain and
range, see following slides
ltowlDatatypeProperty rdfID"yearValue"gt
ltrdfsdomain rdfresource"VintageYear" /gt
ltrdfsrange rdfresource"xsdpositiveInteger"/gt
lt/owlDatatypePropertygt
122Properties in OWLTransitive 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
ltowlObjectProperty rdfIDancesotor"gt
ltrdftype rdfresource"owlTransitiveProperty"
/gt ltrdfsdomain rdfresource"Person" /gt
ltrdfsrange rdfresource"Person"
/gt lt/owlObjectPropertygt
123Properties in OWLSymmetric Property
- Example If Mary is akin to John then John is
also akin to Mary
akin- ? akin and akin ? akin-
ltowlObjectProperty rdfIDakin"gt ltrdftype
rdfresource"owlSymmetricProperty" /gt
ltrdfsdomain rdfresource"Person" /gt
ltrdfsrange rdfresource"Person"
/gt lt/owlObjectPropertygt
124Properties in OWLInverse Property
- Example If Mary is a child of John then John is
the Father of Mary
hasChild ? hasParent-
ltowlObjectProperty rdfIDhasChild"gt
ltowlinverseOf rdfresource"hasParent"
/gt lt/owlObjectPropertygt
125Properties in OWLFunctional 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
ltowlObjectProperty rdfIDhasFather"gt
ltrdftyoe rdfresource"owlFunctionalProperty"/gt
lt/owlObjectPropertygt
126OWL Property Classes
- The symmetric and transitive property may only
used for connecting two resources
127Summary
128OWL as DL Axioms
First Order Logic
Description Logic
129OWL as DL Axioms
Social Security Number
130Outline
- Revisited
- How we already have learned to express ontologies
- Web Ontology Language -OWL
- extending expressivity
- Reasoning with OWL
- using the extended expressivity
131Subsumption
- 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
132Subsumption 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.
133Subsumption Example in Protégé
134Subsumption Inferred Hierarchy in Protégé
135Inconsistency
- You may define Classes were no individual can
fulfill its definition. Via reasoning engines
such a definition can be found also in big
ontologies.
136Inconsistency Example
- Cow Animal ? Vegetarian
- Sheep ? Animal
- Vegetarian ?eats ? Animal
- MadCow Cow ? ?eats.Sheep
137Inconsistency Example in Protégé
138Inconsistency Detected Inconsistency in Protégé
139Some more aspects of Reasoning in OWL
- Open world assumption
- No unique name assumption
140Open 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
1400 - There is a train at 1500
- My query Is there a train at 1700?
- CWA answer No!
- OWA answer unknown! (i.e. there could be another
resource2 which has info on another train at
1700!) - Reasoning in OWL is OWL! Assume we have an RDF
file with the following triples - T1 rdftype Train .
- T2 rdftype Train .
- T1 departureTime 1500 .
- T1 departureTime 1500 .
141No 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
- familyMarry rdftype familyperson.
- familyMarry exhasParent familyJohnDoe.
- familyMarry exhasParent familyLissaDoe.
- familyMarry exhasParent familyLissaMinelly.
- Some cardinality axiom (in DL)
- familyperson ? ?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 - familyLissaDoe familyLissaMinelly
- familyJohnDoe familyLissaMinelly
- familyJohnDoe familyLissaMinelly
142Individual Identity and Mapping
- To explicitly state that individuals are
different - owldifferentFrom(between 2 individuals)
- owlallDifferent(between a set of individuals)
- To explicitly state that two individuals are
identical - owlsameIndividualAs / owlsameAS
- To explicitly state that two classes are
identical - owlequivalentClass
- To explicitly state that two properties are
identical - owlequivalentProperty
143OWL 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 yz
- InverseOf if P1(x,y) then P2(y,x)
- InverseFunctional if P(y,x) and P(z,x) then yz
- allValuesFrom P(x,y) and yallValuesFrom(C)
- someValuesFrom P(x,y) and ysomeValuesFrom(C)
- hasValue P(x,y) and yhasValue(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, )
- equivalentClass C1 C2
- disjointWith C1 ! C2
- sameIndividualAs I1 I2
Legend Properties are indicated by P, P1, P2,
etc Specific classes are indicated by x, y,
z Generic classes are indicated by C, C1,
C2 Values are indicated by v, v1, v2 Instance
documents are indicated by I1, I2, I3, etc. A
number is indicated by N P(x,y) is read as
property P relates x to y
144Back to the OWL Layers (Lite, DL, Full)
Full
DL
Lite
145Meta Information in OWL
146Imports
- Since OWL makes an open world assumption it is
possible to extend/import classes from other
ontologies - Consequences of additional propositions are
monotonic - New information can not retract existing (but may
be contradictory, i.e. cause inconsistency) - owlimports imports another ontology in the sense
that it becomes part of the ontology doing the
import - owlimports is transitive
- (if A imports B and B imports C, A import B and
C) - Note Import is different to just declare a
namespace and reference to i.e. a concept, since
this does not imply to import associated
constraints
147Versioning
- owlversionInfo provides a construct to include
version information but has no impact on model
theory - owlpriorVersion, owlbackwardCompatibleWith and
owlincompatibleWith can be used to track changes
and reference other ontologies - owlDeprecatedClass and owlDeprecatedProperty
allow versioning on a high level of granularity
148Things OWL doesnt 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
149Summary
- 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/
150Resources
- W3C Documents
- Guide http//www.w3.org/TR/owl-guide/
- Reference http//www.w3.org/TR/owl-ref/
- Semantics and Abstract Syntaxhttp//www.w3.org/T
R/owl-semantics/ - OWL Tutorials
- Ian Horrocks, Sean Bechhoferhttp//www.cs.man.ac
.uk/horrocks/Slides/Innsbruck-tutorial/ - Roger L. Costello, David B. Jacobs
http//www.xfront.com/owl/ - Example Ontologies, e.g. here
- http//www.daml.org/ontologies/