Ontology Design: OWL
Constructs
Tutor: Aldo Gangemi
Lecture 1 @ LEX09
Fiesole, Italy
Tutor info
•
•
•
•
•
Name: Aldo Gangemi
Institute: ISTC-CNR, Rome, Italy
Research Group: Semantic Technology Laboratory (STLab)
Role: Senior Researcher, Head of STLab
Research interest: Ontology Design, KE+NLP, Enterprise 3.0,
Legal Ontologies, Historical Knowledge Representation
LEX09
The Web evolves
• A digital library (1.0)
– A document library with hyperlinks
• A database, an application platform (1.0, evolved)
– A shared portal through which applications can be web accessible
• A multimedia and social platform (2.0)
– A radio, a trailer, a telephone, a tv, a public place, a position anywhere
in the world. Collaboration, “web editing”
• A naming scheme (Semantic Web)
– Unique identity for all entities: documents, persons, services, physical
things, metadata, ...
– URI-based data integration is the key use-case for the semantic web
• A Global Giant Graph (3.0)
– A place where people work, interact, and produce interpretations
assisted by computers
3
Data patterns
from &m berners‐lee’s
linked data principles
• Use URIs as names for things
• Use HTTP URIs so that people can look up those names
–Slash URIs are preferred
• When someone looks up a URI, provide useful information
– Browsable graphs: a graph G is browsable if, for the URI of
any node in G, if I look up that URI I will be returned
information which describes the node, where describing a
node means:
• Returning all statements where the node is a subject or
object
• Describing all blank nodes attached to the node by one
arc
• Include links to other URIs so that they can discover more things
4
5
RDF vocabularies and OWL
• Large use of small vocabularies
– FOAF, SIOC, SKOS
• OWL representation and reasoning is the
next step at a web scale, but already a
reality for intrawebs
6
7
Preliminaries
• Team in pairs or small groups
• Open an editor
• Create an ontology project
– Choose the reference language or syntax
• Create a new ontology
– Choose the base URI of the ontology (“ID”),
and the default URI (ending with either “#” or
“/”)
8
Natural and Formal Languages
• Formal interpretation is not (only :)) an
academic game
• It gives us a precise way to establish what
we are talking about, and therefore to
provide reliable automated inferences
when needed
• Natural language is able to describe very
different types of facts with the same
structure, for example ...
9
... different types of facts ...
• Melville wrote Moby Dick [ground fact]
• Captain Ahab is in command of the Pequod [literary fact]
• Moby Dick is white [attributive fact]
• The Pequod is a whaler [classification fact]
• A whaler is a ship for hunting whales [meaning fact]
• Whaler is synonym to whaleship [terminological fact]
• Whaler is six characters long [information fact]
• Whaler is a class [formal fact]
• Whales are a delicious food for Japanese people
[contextual fact]
• Moby Dick represents the hatred and rage of humanity
[interpretive fact]
10
From NL to FL
• This functionality of natural language
cannot be easily reproduced for machine
interpretation
• The formal interpretation of OWL can do
something
• More is provided by best practices
• Some arbitrariness is unavoidable
– Requirements, requirements, requirements
11
RDF (and OWL)
• Each entity in an ontology is a web
resource, and has a URI
• Each fact can be expressed as a triple
> Let's create a new ontology “Moby Dick”
12
Facts in OWL (or RDF)
• Basic structure
• Subject – Predicate – Object
> Melville wrote Moby Dick
> Moby Dick is a whale
13
Embedding facts (RDF)
• If the fact includes three entities, you can
embed a triple in another
– Whales are a delicious food for Japanese
people
• [Whales are a delicious food] – for – Japanese
people
• This is not allowed in OWL
• Patterns do exist to approximate such
cases
14
Liberality of RDF
• As a matter of fact, you can declare any
fact in RDF, even “unusual”,
“counterintuitive”, or “abnormal” ones:
? Moby Dick is white but also black
? Moby Dick is in command of the Pequod
? Ahab hates the third character of the white
whale
? Ahab is a class
• Liberality is great, but has costs: no way to
make a machine detect undesired facts
15
OWL constraints
• In order to limit (and to guide) the design of
ontologies, OWL restricts the expressivity of
RDF
• No more is any triple allowed, but only those
that respect the constraints of OWL formal
semantics (lecture 1)
• Undesired facts will then be detected, if the
design of the ontology reflects the
conceptualization of the users
• That’s why we need good design (lecture 2)
16
Formal interpretation (extensional)
Whale
MobyDick
hatesI = HumanI × ThingI
WhaleI ⊆ ThingI
HumanI ⊆ ThingI
WhaleI ∩ HumanI = ∅
AhabI ∈ HumanI
MobyDickI ∈ WhaleI
(Ahab,MobyDick)I ∈ hatesI
Thing
hates
Ahab
Human
17
OWL exercise I:
types, subclasses, and inheritance
> Ahab hates Moby Dick
> Ahab is a human
> Moby Dick is a whale
> Whale is a class
> Whale is a subclass of Mammal
> Mammal is a subclass of Vertebrate
> Vertebrate is a Group
18
Inheritance
• Notice that some inferences are now
allowed
Moby Dick is a whale; whales are mammals
⊢ Moby Dick is a mammal
Whale is a subclass of Mammal; Mammal is a
subclass of Vertebrate
⊢ Whale is a subclass of Vertebrate
• This is called inheritance
19
Prevented inheritance
• But some inferences are prevented
Moby Dick is a whale; Whale is an (OWL) class
⊬ Moby Dick is an (OWL) class
Mammal is a subclass of Vertebrate; Vertebrate
is a group
⊬ Mammal is a group
20
Lesson learnt
• In OWL we must distinguish when “is a”
means “rdf:type”, and when it means
“rdfs:subClassOf”
• There are patterns to deal with these
differences
• OWL2 allows more freedom
21
OWL exercise II:
disjointness and consistency
use Radon or Pellet to check the ontology after
each addition
> Whales are not humans
•
•
In formal languages, we can usually state when
two classes are disjoint
This provides greater clarity, and works fine for
formal checking, i.e. “coherency” or “consistency”
22
Consistency
• Equipped with the owl:disjointWith axiom,
we can now exclude the following:
≯ Moby Dick is a human
≯ Ahab is a whale
Since they would make an ontology
inconsistent
23
Coherence
• We can also exclude the following:
≯ Whamans are whales and humans
Since it would make the ontology
incoherent
24
OWL exercise III:
domain, ranges, inverses, subproperties
> Whales can be food for Japanese
humans
> Being able to be food for something
implies being able to be fed by something
> Moby Dick can be food for Yukio
> Hating something implies disliking it
25
Materialization
• Some new inferences are now allowed:
Moby Dick can be food for Yukio
⊢ Yukio can be fed by Moby Dick
Ahab hates Moby Dick
⊢ Ahab dislikes Moby Dick
• This is called materialization
26
Classification
Yukio can be fed by Moby Dick; (as far as
we know) only Japanese humans can be
fed by whales
⊢ Yukio is a Japanese human
• This is called classification
• But this is prevented:
⊬ Yukio can be food for Moby Dick
• Why?
27
Open World Assumption
• Since the Web is an open world, if we say something
that is not explicitly put in our axioms, we cannot
exclude it, and then we have to add a new axiom:
Yukio can be food for Moby Dick; whales can be food for
Japanese humans
⊢ Yukio is also a whale, and Moby Dick is also a Japanese
human
• But, if we had modelled JapaneseHuman as a
subclass of Human, this generates an inconsistency,
since Human and Whale are disjoint classes, and
JapaneseHuman is also disjoint with Whale, because
of inheritance
28
OWL exercise IV:
sameness and difference
• Due to the open world assumption, it is
important to explicitly declare if any two
individuals are the same or are different
(when this is known)
> Moby Dick is the same as “The White
Whale”
> Ahab is different from Yukio
29
Advanced modelling: restrictions and
definitions in OWL
• The formal semantics of OWL is currently
based on so called description logics. An
important feature of description logics is the
ability to declare “unnamed” constructs that are
interpreted as classes.
• > Let's create a new ontology “Aquatic
organisms”
30
OWL exercise V:
boolean class constructors
• The class of things that are mammals and
aquatic organisms
• The class including aquatic mammals, fishes
and crustaceans
• The class of things that are not fishes
not(Fish)
AquaLc
Organism
Mammal
Fish
AquaLc
Mammal
Crustacean
Fish
31
OWL exercise VI:
relational class constructors
• The class of things that only live in a marine habitat
– ∀liveIn.MarineHabitat
• The class of things that live in at least one marine habitat
– ∃liveIn.MarineHabitat
• The class of things that live in the Indian Ocean
– ∀liveIn.{IndianOcean}
• The class of things that live in either the Indian or Pacific
Ocean
– ∀liveIn.{IndianOcean PacificOcean}
• The class of things that have taxonomic species “Monodon
monoceros”
– ∃taxonomicSpecies.{MonodonMonoceros}
32
OWL exercise VII:
“enumerating” class constructors
• The class of the following things: Indian, Pacific, and
Artlantic Oceans
– {IndianOcean PacificOcean AtlanticOcean}
33
OWL exercise VII:
“enumerating” class constructors
• The class of the following things: Indian, Pacific, and
Artlantic Oceans
– {IndianOcean PacificOcean AtlanticOcean}
33
OWL exercise VIII
equivalence and automated subsumption/classification
• Differently from other conceptual modeling
languages, OWL allows to state formal
equivalence between two classes
• Equivalence works implicitly with class
constructors
– ontology APIs generate internal classes that
are equivalent to class constructors
• but equivalence can be stated explicitly.
... continued ...
> Aquatic mammals are mammals and aquatic
organisms
> Aquatic organisms only include aquatic
mammals, fishes and crustaceans
> Whales are not fishes
> Omnivore animals are animals that eat any
other animals or plants
> Carnivore animals are animals that only eat
other animals, and eat some of them
... continued ...
> Aquatic mammals are mammals and aquatic
organisms
> Aquatic organisms only include aquatic
mammals, fishes and crustaceans
> Whales are not fishes
> Omnivore animals are animals that eat any
other animals or plants
> Carnivore animals are animals that only eat
other animals, and eat some of them
Fuzzy OWL
• Not for all concepts or not in all contexts/
applications it is possible to assume crisp
conditions, under which something is e.g.
a legal subject, or an omnivore animal
• If a user needs to represent fuzzy
concepts, should use a fuzzy variety of
OWL
• But compare necessary conditions,
sufficient conditions, scope of the
ontology, and real fuzziness
36
... cont. ...
• Necessary condition on OmnivoreAnimal
– Omnivore animals eat any other animals or plants
• Sufficient condition to OmnivoreAnimal
– Animals that eat any other animals or plants are
omnivore animals
• Definition of OmnivoreAnimal
– Omnivore animals are animals that eat any other
animals or plants
• Fuzzy condition on OmnivoreAnimal
– Omnivore animals, under certain (but not necessarily
all) relevant circumstances, eat any other animal or
plant
37
OWL exercise IX
symmetry and transitivity
• Object properties can be symmetric, or
transitive.
• “Sibling” is an example of both symmetric
and transitive object property
... continued ...
> siblingOrder and siblingSpecies are symmetric
and transitive
> Cetacea and Artyodactyla are sibling orders
of superorder Laurasiatheria
> Within Cetacea, Monodon monoceros is a
sibling species of Orcynus Orca, which is a
sibling species of Balaenoptera musculus
... continued ...
> siblingOrder and siblingSpecies are symmetric
and transitive
> Cetacea and Artyodactyla are sibling orders
of superorder Laurasiatheria
> Within Cetacea, Monodon monoceros is a
sibling species of Orcynus Orca, which is a
sibling species of Balaenoptera musculus
OWL exercise X
datatype and annotation properties
When dealing with XSD datatypes, OWL
uses Datatype Properties
> Moby Dick is 23 metres long
When dealing with annotations, OWL uses
Annotation Properties
> Moby Dick has been inspired by a long
hunting for the albino sperm whale Mocha
Dick near the coast of Chile (more than 100
battles with whalers)
40
OWL exercise XI
imports
• Everything that is true of Cetaceans
ontology is true for Moby Dick ontology
OWL exercise XI
imports
• Everything that is true of Cetaceans
ontology is true for Moby Dick ontology
OWL Syntaxes
• Abstract Syntax
– Used in the definition of the language and the DL/Lite
semantics
• OWL in RDF (the “official” concrete syntax)
– RDF/XML presentation
• XML Presentation Syntax
– XML Schema definition
• Other, Human readable syntaxes
– Manchester OWL Syntax
– Sydney OWL Syntax
– Rabbit
borrowed from Sean Bechhofer’s SSSW08 slides
42
Common Misconceptions
•
•
•
•
•
Disjointness of primitives
Interpreting domain and range
And and Or
Quantification
Closed and Open Worlds
borrowed from Sean Bechhofer’s SSSW08 slides
43
Disjointness
• By default, primitive classes are not
disjoint.
• Unless we explicitly say so, the description
(Animal and Vegetable) is not inconsistent.
• Similarly with individuals -- the so-called
Unique Name Assumption (often present
in DL languages) does not hold, and
individuals are not considered to be
distinct unless explicitly asserted to be so.
borrowed from Sean Bechhofer’s SSSW08 slides
44
Domain and Range
• OWL allows us to specify the domain and range of properties.
• Note that this is not interpreted as a constraint.
• Rather, the domain and range assertions allow us to make
inferences about individuals.
• Consider the following:
– ObjectProperty: employs
Domain: Company
Range: Person
Individual: IBM
Facts: employs Jim
• If we haven’t said anything else about IBM or Jim, this is not
an error. However, we can now infer that IBM is a Company
and Jim is a Person.
borrowed from Sean Bechhofer’s SSSW08 slides
45
And/Or and Quantification
• The logical connectives And and Or often
cause confusion
– Tea or Coffee?
– Milk and Sugar?
• Quantification can also be contrary to our
intuition.
– Universal quantification over an empty set is true.
– Sean is a member of hasChild only Martian
– Existential quantification may imply the existence
of an individual that we don’t know the name of.
borrowed from Sean Bechhofer’s SSSW08 slides
46
OWL 2
• Several new features, two are especially
important
– Property chains
• Mustafa is brother of Saida; Saida is mother of
Rashid
• ⊢ Mustafa is uncle of Rashid
– Multiple interpretations of a constant
• Tutor(Meri)
• AllowedPersonnel(Tutor)
• Tutor(Alonzo,Meri)
47
© Copyright 2026 Paperzz