Title: OWL: Web Ontology Language
1OWL Web Ontology Language
Slides are from Grigoris Antoniou, Frank van
Harmelen, A Semantic Web Primer
2Limitations of RDF Schema
- Equivalence of classes
- Two classes, same concept - people use different
words to represent the same thing. It would be
very useful to be able to state "this class is
equivalent to this second class". - E.g. One person may create an ontology with a
class called "Airplane". Another person may
create an ontology with a class called "Plane".
It would be useful to be able to indicate that
the two classes are equivalent. - Boolean combinations of classes
- Sometimes we wish to build new classes by
combining other classes using union,
intersection, and complement. - E.g. Person is the union of the classes Male and
Female persons. - Disjointness of classes
- Sometimes we wish to say that classes are
disjoint - e.g. male and female are disjoint classes
3Limitations of RDF Schema (continued)
- Cardinality constraints - oftentimes it is useful
to indicate the allowable number of occurrences
of a property - E.g. We would like to be able to express that a
River has only "one" officialLength property. - E.g. We would like to be able to express that an
Ocean has one maxDepth. - E.g. a person has exactly two parents, a course
is taught by at least one lecturer - Special characteristics of properties
- Transitive property (like greater than)
- Unique property (like is mother of)
- A property is the inverse of another property
(like eats and is eaten by)
4RDF Schemas Building Block to More Expressive
Ontology Languages
OWL
OWL
RDF Schema
RDF Schema was designed to be extended. The
ontology languages all use RDF Schema's basic
notions of Class, Property, domain, and range.
5What is OWL?
- OWL stands for Web Ontology Language
- OWL is built on top of RDF
- OWL is written in XML
- OWL is for processing information on the web
- OWL was designed to be interpreted by computers
- OWL was not designed for being read by people
- OWL is a web standard
- OWL has three sublanguages
- OWL Lite, DL, Full
The following slides are from Grigoris Antoniou,
Frank van Harmelen, A Semantic Web Primer
6Tradeoff between Expressive Power and Efficient
Reasoning Support
- The richer the language is, the more inefficient
the reasoning support becomes - Sometimes it crosses the border of
non-computability - We need a compromise
- A language supported by reasonably efficient
reasoners - A language that can express large classes of
ontologies and knowledge.
7OWL Sublanguages
- OWL Lite
- Simple constraints and classification hierarchy
- OWL DL (includes OWL Lite)
- Maximal expressiveness while retaining
computational completeness (all conclusions are
computable) - OWL Full (includes OWL DL)
- Maximal expressiveness
- Unlikely any reasoning software to support OWL
Full.
OWL Full
OWL DL
OWL Lite
8Reasoning About Knowledge in Ontology Languages
- Class membership
- If x is an instance of a class C, and C is a
subclass of D, then we can infer that x is an
instance of D. - Subclass and Equivalence of classes
- If class A is equivalent to class B, and class B
is equivalent to class C, then A is equivalent to
C, too. - Consistency
- X is an instance of classes A and B, but A and B
are disjoint. - This is an indication of an error in the
ontology.
9Uses for Reasoning
- Reasoning support is important for
- checking the consistency of the ontology and the
knowledge - checking for unintended relationships between
classes - automatically classifying instances in classes
- Checks like the preceding ones are valuable for
- designing large ontologies, where multiple
authors are involved - integrating and sharing ontologies from various
sources
10Reasoning support in OWL
- Semantics is a prerequisite for reasoning support
- Formal semantics and reasoning support are
usually provided by - mapping an ontology language to a known logical
formalism - using automated reasoners that already exist for
those formalisms - OWL is (partially) mapped on a description logic,
and makes use of reasoners such as FaCT and RACER
- Description logics are a subset of predicate
logic for which efficient reasoning support is
possible
11OWL Compatibility with RDF Schema
- All varieties of OWL use RDF for their syntax
- Instances are declared as in RDF, using RDF
descriptions and typing information - OWL constructors are specializations of their RDF
counterparts
RdfsResources
RdfsProperty
RdfsClass
OwlObjectProperty
OwlDatatypeProperty
owlClass
OWL
RDF/RDFS
XML Schema
12OWL Syntactic Varieties
- OWL builds on RDF and uses RDFs XML-based syntax
- Other syntactic forms for OWL have also been
defined - An abstract syntax, that is much more compact and
readable than the XML languages - A graphic syntax based on the conventions of UML
13OWL XML/RDF Syntax Header
- ltrdfRDF
- xmlnsowl "http//www.w3.org/2002/07/owl"
- xmlnsrdf "http//www.w3.org/1999/02/22-rdf-synt
ax-ns" - xmlnsrdfs"http//www.w3.org/2000/01/rdf-schema
" - xmlnsxsd "http//www.w3.org/2001/XLMSchemagt
14owlOntology
- An OWL ontology may start with a collection of
assertions for housekeeping purposes using
owlOntology element - ltowlOntology rdfabout""gt
- ltrdfscommentgtAn example OWL ontology
lt/rdfscommentgt - ltowlpriorVersion
- rdfresource"http//www.mydomain.org/uni-ns-old
"/gt - ltowlimports
- rdfresource"http//www.mydomain.org/persons"/gt
- ltrdfslabelgtUniversity Ontologylt/rdfslabelgt
- lt/owlOntologygt
- owlimports is a transitive property
15Classes
- Classes are defined using owlClass
- owlClass is a subclass of rdfsClass
- ltowlClass rdfIDassociateProfessorgt
- ltrdfssubClassOf rdfresourceacademicStaffMemb
er/gt - lt/owlClassgt
- owlequivalentClass defines equivalence of
classes - ltowlClass rdfID"faculty"gt
- ltowlequivalentClass rdfresource"academ
icStaffMember"/gt - lt/owlClassgt
- Disjointness is defined using owldisjointWith
- ltowlClass rdfabout"associateProfessor"gt
- ltowldisjointWith rdfresource"professor"/gt
- ltowldisjointWith rdfresource"assistantProfe
ssor"/gt - lt/owlClassgt
- owlThing is the most general class, which
contains everything - owlNothing is the empty class
16Properties
- In OWL there are two kinds of properties
- Object properties, which relate objects to other
objects - E.g. is-TaughtBy, supervises
- ltowlObjectProperty rdfID"isTaughtBy"gt
- ltrdfsdomain rdfresource"course"/gt
- ltrdfsrange rdfresource "academicStaffMember"/
gt - ltrdfssubPropertyOf rdfresource"involves"/gt
- lt/owlObjectPropertygt
- Data type properties, which relate objects to
datatype values - E.g. phone, age, etc.
- ltowlDatatypeProperty rdfID"age"gt
- ltrdfsrange rdfresource "http//www.w3.org/20
01/XLMSchemanonNegativeInteger"/gt - lt/owlDatatypePropertygt
OWL
RDF/RDFS
XML Schema
17Relations to other properties
- Equivalent property
- ltowlObjectProperty rdfID"lecturesIn"gt
- ltowlequivalentProperty rdfresource"teaches"/
gt - lt/owlObjectPropertygt
- Inverse property
- ltowlObjectProperty rdfID"teaches"gt
- ltrdfsrange rdfresource"course"/gt
- ltrdfsdomain rdfresource "academicStaffMember"
/gt - ltowlinverseOf rdfresource"isTaughtBy"/gt
- lt/owlObjectPropertygt
18Property restriction
- Value constraints put constrains on the range of
the property when applied to this particular
class description. - owlallValuesFrom specifies universal
quantification - owlhasValue specifies a specific value
- owlsomeValuesFrom specifies existential
quantification - Cardinality constraints the number of value a
property can take.
19owlallValuesFrom
- Define the class of persons whose parents are
both physicians. - ltowlRestrictiongt
- ltowlonProperty rdfresource"hasParent" /gt
- ltowlallValuesFrom rdfresource"Physician"
/gt - lt/owlRestrictiongt
- x (x, y) ? hasParent implies y ? Physician
- Example
- Suppose David hasParent Bill who is a Physician,
and David hasParent Rose who is a Phycisian - Conclusion David belongs to the class defined
above. - Semantics
- restriction(p allValuesFrom(r))
- x (x,y) ? p implies y ? r
20allValuesFrom
- FirstYearCourse is a course that must be taught
by professors - ltowlClass rdfabout"firstYearCourse"gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"isTaughtBy"/gt
- ltowlallValuesFrom rdfresource"Professor"/
gt - lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
-
- x (x,y) ?isTaughtBy implies y ? Professor
21owlsomeValuesFrom
- Define the class of persons who has at least one
physician parent. - ltowlRestrictiongt
- ltowlonProperty rdfresource"hasParent" /gt
- ltowlsomeValuesFrom rdfresource"Physician"
/gt - lt/owlRestrictiongt
- x ? (x, y) ? hasParent ? y ? Physician
- Semantics
- restriction(p someValuesFrom(e))
- x ? (x,y) ? p ? y ? e
22someValuesFrom
- AcademicStaff must teach at least one under
course. - ltowlClass rdfabout"academicStaffMember"gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"teaches"/gt
- ltowlsomeValuesFrom rdfresource"undergraduate
Course"/gt - lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
- x ? (x, y) ? Teaches ? y ? undergraduateCourse
- Example
- Suppose David Teaches 440, and David Teaches 569
- Question Is David an Academic Staff?
23owlhasValue
- ltowlClass rdfabout"mathCourse"gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"isTaughtBy
"/gt - ltowlhasValue rdfresource "949352"/gt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"hasParent" /gt
- ltowlhasValue rdfresource"Bill" /gt
- lt/owlRestrictiongt
- restriction(p value(i)), for i an individual ID
- x (x, i) ? p
24Cardinality restrictions
- We can specify minimum and maximum number using
owlminCardinality and owlmaxCardinality - It is possible to specify a precise number by
using the same minimum and maximum number - For convenience, OWL offers also owlcardinality
- E.g. Every course is taught by at least someone
- ltowlClass rdfabout"course"gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"isTaughtBy"/
gt - ltowlminCardinality rdfdatatype"xsdnonN
egativeInteger"gt - 1
- lt/owlminCardinalitygt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
25Special properties
- owlTransitiveProperty (transitive property)
- E.g. has better grade than, is ancestor of
- owlSymmetricProperty (symmetry)
- E.g. has same grade as, is sibling of
- owlFunctionalProperty defines a property that
has at most one value for each object - E.g. age, height, directSupervisor
- owlInverseFunctionalProperty defines a property
for which two different objects cannot have the
same value - ltowlObjectProperty rdfID"hasSameGradeAs"gt
- ltrdftype rdfresource"owlTransitiveProperty"
/gt - ltrdftype rdfresource"owlSymmetricProperty"/
gt - ltrdfsdomain rdfresource"student"/gt
- ltrdfsrange rdfresource"student"/gt
- lt/owlObjectPropertygt
26Boolean Combinations complementOf
- We can combine classes using Boolean operations
(union, intersection, complement) - ltowlClass rdfabout"course"gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlcomplementOf rdfresource"staffMembe
r"/gt - lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
27Boolean Combinations unionOf
- ltowlClass rdfID"peopleAtUni"gt
- ltowlunionOf rdfparseType"Collection"gt
- ltowlClass rdfabout"staffMember"/gt
- ltowlClass rdfabout"student"/gt
- lt/owlunionOfgt
- lt/owlClassgt
- The new class is not a subclass of the union, but
rather equal to the union - We have stated an equivalence of classes
28Boolean Combinations intersectionOf
- ltowlClass rdfID"facultyInCS"gt
- ltowlintersectionOf rdfparseType"Collection"gt
- ltowlClass rdfabout"faculty"/gt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"belongsTo"/gt
- ltowlhasValue rdfresource
"CSDepartment"/gt - lt/owlRestrictiongt
- lt/owlintersectionOfgt
- lt/owlClassgt
- Exercise describe the class of faculty who have
joint appointment in CS and ECE.
29Nesting of Boolean Operators
- Administrative staff staff members who are
neither faculty nor technical support staff. - ltowlClass rdfID"adminStaff"gt
- ltowlintersectionOf rdfparseType"Collection"gt
- ltowlClass rdfabout"staffMember"/gt
- ltowlcomplementOfgt
- ltowlunionOf rdfparseType"Collection"gt
- ltowlClass rdfabout"faculty"/gt
- ltowlClass rdfabout
"techSupportStaff"/gt - lt/owlunionOfgt
- lt/owlcomplementOfgt
- lt/owlintersectionOfgt
- lt/owlClassgt
staff
admin
tech
faculty
30Enumerations with owloneOf
- ltowloneOf rdfparseType"Collection"gt
- ltowlThing rdfabout"Monday"/gt
- ltowlThing rdfabout"Tuesday"/gt
- ltowlThing rdfabout"Wednesday"/gt
- ltowlThing rdfabout"Thursday"/gt
- ltowlThing rdfabout"Friday"/gt
- ltowlThing rdfabout"Saturday"/gt
- ltowlThing rdfabout"Sunday"/gt
- lt/owloneOfgt
- Now we have talked about three ways to describe a
class - Enumeration
- Set operation
- Property restriction
31Declaring instances
- Instances of classes are declared as in RDF
- ltrdfDescription rdfID"949352"gt
- ltrdftype rdfresource "academicStaffMember"/gt
- lt/rdfDescriptiongt
- Or alternatively, we can have the following
simplified notation - ltacademicStaffMember rdfID"949352"gt
- lt/academicStaffMembergt
32No Unique-Names Assumption
- OWL does not adopt the unique-names assumption of
database systems - If two instances have different names or IDs, it
does not imply that they are different
individuals - Suppose we state that each course is taught by at
most one staff member, and that a given course
is taught by two staff members - An OWL reasoner does not flag an error
- Instead it infers that the two resources are
equal.
33Distinct Objects
- To ensure that different individuals are indeed
recognized as such, we must explicitly assert
their inequality - ltlecturer rdfabout"949318"gt
- ltowldifferentFrom rdfresource"949352"/gt
- lt/lecturergt
- OWL provides a shorthand notation to assert the
pairwise inequality of all individuals in a given
list - ltowlallDifferentgt
- ltowldistinctMembers rdfparseType"Collection"gt
- ltlecturer rdfabout"949318"/gt
- ltlecturer rdfabout"949352"/gt
- ltlecturer rdfabout"949111"/gt
- lt/owldistinctMembersgt
- lt/owlallDifferentgt
34Data Types in OWL
- XML Schema provides a mechanism to construct
user-defined data types - E.g., the data type of adultAge includes all
integers greater than 18 - Such derived data types cannot be used in OWL
- The OWL reference document lists all the XML
Schema data types that can be used - These include the most frequently used types such
as string, integer, Boolean, time, and date.
35An African Wildlife Ontology Class Hierarchy
Animal
plant
carnivore
herbivore
tree
giraffe
lion
36An African Wildlife Ontology Properties
- ltowlTransitiveProperty rdfID"is-part-of"/gt
- ltowlObjectProperty rdfID"eats"gt
- ltrdfsdomain rdfresource"animal"/gt
- lt/owlObjectPropertygt
- ltowlObjectProperty rdfID"eaten-by"gt
- ltowlinverseOf rdfresource"eats"/gt
- lt/owlObjectPropertygt
37An African Wildlife Ontology Plants and Trees
- ltowlClass rdfIDanimal/gt
- ltowlClass rdfID"plant"gt
- ltrdfscommentgtPlants are disjoint from animals.
- lt/rdfscommentgt
- ltowldisjointWith"animal"/gt
- lt/owlClassgt
- ltowlClass rdfID"tree"gt
- ltrdfscommentgtTrees are a type of plant.
- lt/rdfscommentgt
- ltrdfssubClassOf rdfresource"plant"/gt
- lt/owlClassgt
38An African Wildlife Ontology Branches
- ltowlClass rdfID"branch"gt
- ltrdfscommentgtBranches are parts of trees.
lt/rdfscommentgt - ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"is-part-of"/gt
- ltowlallValuesFrom rdfresource"tree"/gt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
39An African Wildlife Ontology Leaves
- ltowlClass rdfID"leaf"gt
- ltrdfscommentgtLeaves are parts of branches.
lt/rdfscommentgt - ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"is-part-of"/gt
- ltowlallValuesFrom rdfresource"branch"/gt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
40An African Wildlife Ontology Carnivores
- ltowlClass rdfID"carnivore"gt
- ltrdfscommentgt
- Carnivores are exactly those animals
that eat also animals. - lt/rdfscommentgt
- ltowlintersectionOf rdfparsetype"Collection"gt
- ltowlClass rdfabout"animal"/gt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"eats"/gt
- ltowlsomeValuesFrom rdfresource"animal"/gt
- lt/owlRestrictiongt
- lt/owlintersectionOfgt
- lt/owlClassgt
41An African Wildlife Ontology Herbivores
- ltowlClass rdfID"herbivore"gt
- ltrdfscommentgt Herbivores are exactly those
animals - that eat only plants or parts of plants.
- ltowlintersectionOf rdfparseTypeCollectiongt
- ltowlClass rdfaboutanimal/gt
- ltowlRestrictiongt
- ltowlonProperty rdfresourceeats/gt
- ltowlallValuesFromgt
- ltowlClassgt
- ltowlunionOf rdfparseTypeCollecti
ongt - ltowlClass rdfresourceplant/gt
- ltowlRestrictiongt
- ltowlonProperty
rdfresourceis_part_of/gt - ltowlallValuesFrom
rdfresourceplant/gt - lt/owlRestrictiongt
- lt/owlunionOfgt
- lt/classgt
- lt/owlallValuesFromgt
- lt/owlRestrcitiongt
42An African Wildlife Ontology Giraffes
- ltowlClass rdfID"giraffe"gt
- ltrdfscommentgtGiraffes are herbivores, and they
eat only leaves. - lt/rdfscommentgt
- ltrdfssubClassOf rdftype"herbivore"/gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"eats"/gt
- ltowlallValuesFrom rdfresource"leaf"/gt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
43An African Wildlife Ontology Lions
- ltowlClass rdfID"lion"gt
- ltrdfscommentgtLions are animals (carnivores)
that eat only herbivores. - lt/rdfscommentgt
- ltrdfssubClassOf rdftype"carnivore"/gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"eats"/gt
- ltowlallValuesFrom rdfresource"herbivore"/gt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
44An African Wildlife Ontology Tasty Plants
- ltowlClass rdfID"tasty-plant"gt
- ltrdfscommentgtPlants eaten both by herbivores
and carnivores lt/rdfscommentgt - ltrdfssubClassOf rdfresourceplant/gt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresourceeaten_by/gt
- ltowlsomeValuesFromgt ltowlClass
rdfaboutherbivore/gt - lt/owlsomeValuefromgt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresourceeaten_by/gt
- ltowlsomeValuesFromgt ltowlClass
rdfaboutcarnivore/gt - lt/owlsomeValuefromgt
- lt/owlRestrictiongt
- lt/rdfsSublassOfgt
- lt/owlClassgt
45Closed World Assumption
- OWL currently adopts the open-world assumption
- A statement cannot be assumed true on the basis
of a failure to prove it - On the huge and only partially knowable WWW, this
is a correct assumption - Closed-world assumption a statement is true when
its negation cannot be proved - tied to the notion of defaults, leads to
nonmonotonic behaviour
46Summary
- OWL is the proposed standard for Web ontologies
- OWL builds upon RDF and RDF Schema
- (XML-based) RDF syntax is used
- Instances are defined using RDF descriptions
- Most RDFS modeling primitives are used
- Formal semantics and reasoning support is
provided through the mapping of OWL to logics - Predicate logic and especially description logics
have been used for this purpose - While OWL is sufficiently rich to be used in
practice, extensions are in the making - They will provide further logical features,
including rules
47Look back at the definition for ontology
- An ontology is a formal, explicit specification
of a shared conceptualization - Gruber - Conceptualization refers to an abstract model of
phenomena. - Explicit means that the type of concepts used,
and the constraints on their use are explicitly
defined. - Formal refers to the fact that the ontology
should be machine readable. - Shared reflects that ontology should capture
consensual knowledge accepted by the communities.