Web Ontology Language OWL
OWL (Web Ontology Language)
OWL is an ontology language standard for web applications of ontologies (the
semantic web). However, OWL is used in “web-independent” applications as
well.
• OWL 1 language is a W3C Recommendation since February 2004.
• OWL 2 language is a new version, it is a W3C Recommendation since Oc-
tober 2009.
The World Wide Web Consortium (W3C), founded by Tim Berners-Lee, is an in-
ternational community that develops standards for the Web. Another example
of a W3C Recommendation is XML.
Ontology Languages 2
Overview
From the overview of OWL2: The OWL 2 Web Ontology Language, informally
OWL 2, is an ontology language for the Semantic Web with formally defined
meaning. OWL 2 ontologies provide
• classes,
• properties,
• individuals, and
• data values
and are stored as Semantic Web documents. OWL 2 ontologies can be used
along with information written in RDF, and OWL 2 ontologies themselves are
primarily exchanged as RDF documents.
OWL 2 has five languages: OWL2 Full, OWL2 DL, and the profiles OWL2 QL, OWL2
EL, and OWL2 RL.
Ontology Languages 3
OWL2 Full and OWL2 DL
• OWL Full
– very expressive language;
– slightly problematic semantics;
– is fully upward-compatible with RDF (syntactically and semantically):
• any legal RDF document is also a legal OWL Full document
• any valid RDF/S conclusion is also a valid OWL Full conclusion
– is undecidable (no complete (or efficient) reasoning support)
• OWL DL
– is a sublanguage of OWL Full corresponding approximately to SHOIQ
with XML datatypes;
– often permits reasonably efficient reasoning support (but not tractable).
Ontology Languages 4
OWL 2 Profiles
OWL 2 Profiles are sub-languages of OWL 2 that have advantages in particular
application scenarios.
• OWL 2 EL is based on the description logic EL. It enables polynomial time
algorithms for all the standard reasoning tasks; it is particularly suitable for
applications where very large ontologies are needed, and where expres-
sive power can be traded for performance guarantees.
• OWL 2 QL is based on description logics similar to DL-Lite. It enables con-
junctive queries to be answered in LogSpace (more precisely, AC0) us-
ing standard relational database technology; it is particularly suitable for
applications where relatively lightweight ontologies are used to organize
large numbers of individuals and where it is useful or necessary to access
the data directly via relational queries (e.g., SQL).
Ontology Languages 5
OWL 2 Profiles
• OWL 2 RL enables the implementation of polynomial time reasoning al-
gorithms using rule-extended database technologies operating directly
on RDF triples; it is particularly suitable for applications where relatively
lightweight ontologies are used to organize large numbers of individuals
and where it is useful or necessary to operate directly on data in the form
of RDF triples.
Ontology Languages 6
The OWL language
There are different syntactic forms of OWL:
• RDF’s XML-based syntax (primary syntax for OWL)
• an XML-based syntax that does not follow the RDF conventions
(more easily read by human users) see http://www.w3.org/TR/owl-xmlsyntax/
• an abstract syntax (used in the language specification document)
(much more compact and readable) see http://www.w3.org/TR/owl-semantics/
• a graphic syntax based on the conventions of UML
(Unified Modelling Language)
(an easy way for people to become familiar with OWL)
• ... (?)
Ontology Languages 7
XML/RDF-based: OWL ontologies (header)
<rdf:RDF xmlns:owl=00 http://www.w3.org/2002/07/owl#00
xmlns:rdf =00 http://www.w3.org/1999/02/22-rdf-syntax-ns#00
xmlns:rdfs=00 http://www.w3.org/2000/01/rdf-schema#00
xmlns:xsd=00 http://www.w3.org/2001/XMLSchema#00
xml:base=00 http://www.dcs.bbk.ac.uk/00 >
<owl:Ontology rdf:about =0000 >
<rdfs:comment >An example OWL ontology</rdfs:comment>
<owl:priorVersion rdf:resource=00 http://www.dcs.bbk.ac.uk/uni-old-ns00 / >
<owl:imports rdf:resource=00 http://www.dcs.bbk.ac.uk/person00 / >
<rdfs:label >SCSIS Ontology</rdfs:label>
</owl:Ontology>
...
</rdf:RDF>
Ontology Languages 8
XML/RDF-based: The OWL language (classes)
Classes are defined using an owl:Class element
(owl:Class is a subclass of rdfs:Class)
.
<owl:Class rdf:ID=00 professor00 >
<rdfs:subClassOf rdf:resource=00 #academicStaff00 / >
</owl:Class>
professor
academicStaff
. .
<owl:Class rdf:about =00 #professor00 >
<owl:disjointWith rdf:resource=00 #lecturer00 / >
</owl:Class> lecturer professor
.
Instead of going through XML/RDF-based syntax, a bit more about abstract
syntax (for obvious reasons).
Ontology Languages 9
OWL: abstract syntax
For details see http://www.w3.org/TR/owl-semantics/syntax.html#2.3.2.1
Ontology Languages 10
OWL constructs for classes vs DL concepts
OWL construct DL Example
owl:Thing >
owl:Nothing ⊥
intersectionOf(C1 . . . Cn ) C1 u · · · u Cn Human u Male
unionOf(C1 . . . Cn ) C1 t · · · t Cn Doctor t Lawyer
complementOf(C) ¬C ¬Male
oneOf(a1 . . . an ) {a1 , . . . , an } {john, mary}
restriction(r allValuesFrom(C)) ∀r.C ∀hasChild.Doctor
restriction(r someValuesFrom(C)) ∃r.C ∃hasChild.Doctor
restriction(r minCardinality(C)) ≥ n r.C ≥ 2 hasChild.Lawyer
restriction(r maxCardinality(C)) ≤ n r.C ≤ 2 hasChild.Lawyer
restriction(r value(a)) ∃r.{a} ∃citizen of.{France}
and XML Schema datatypes: int, string, real, etc.
Ontology Languages 11
OWL class relationships vs DL inclusions
OWL axiom DL Example
Class(A partial C1 . . . Cn )) A v C1 u . . . C n Human v Physical Object
Class(A complete C1 . . . Cn )) A ≡ C1 u . . . C n Man ≡ Human u Male
SubClassOf(C1 C2 ) C1 v C2 Human v Animal u Biped
EquivalentClasses(C1 C2 ) C1 ≡ C2 Man ≡ Human u Male
DisjointClasses(C1 C2 ) C1 v ¬C2 Male v ¬Female
SameIndividual(a1 a2 ) {a1 } ≡ {a2 } PresidentBush=G.W.Bush
DifferentIndividual(a1 a2 ) {a1 } v ¬{a2 } Bush6=Obama
Ontology Languages 12
Object Properties vs Role Inclusions
property R and its inverse R−
SubPropertyOf(R S) RvS .
b
EquivalentProperty(R S) R≡S b b b
ObjectProperty(R ...) .
super(S) RvS
inverseOf(S) R ≡ S− R is functional
.
b
Transitive transitive(R) b b b
Functional > v (≤ 1 R >)
++ +
InverseFunctional > v (≤ 1 R− >) .
R is inverse functional
Symmetric R− v R .
b
b b b
range(C) > v ∀R.C
+
domain(C) ∃R.> v C
.
Ontology Languages 13
OWL vs DL: Domain and Range Constraints
ObjectProperty(R range(C)) ObjectProperty(R domain(D))
> v ∀R.C ∃R.> v D
. .
b
+
b
b
b C ∃R.>
b D
b b
. .
NB: another way to represent
the domain constraint:
> v ∀R− .D
Ontology Languages 14
From DL to OWL
Note that DL inclusions can be represented in OWL in various ways. For instance,
AvB (A and B are concept names)
corresponds to
1. Class(A partial B)
2. SubClassOf(A B)
3. DisjointClasses(A complementOf(B))
> v ≤ 1R (R is a role name)
corresponds to
1. ObjectProperty(R functional)
2. SubClassOf(owl:Thing restriction(R maxCardinality(1)))
3. DisjointClasses(owl:Thing
complementOf(restriction(R maxCardinality(1))))
Ontology Languages 15