Dr. Alexandra I. Cristea
http://www.dcs.warwick.ac.uk/~acristea/
CS 253: Topics in Database Systems: C5
4
OWL is a Web Standard
• OWL became a W3C (World Wide Web Consortium) Recommendation in February 2004.
5
What (else) is OWL?• OWL stands for Web Ontology Language • OWL is built on top of RDF • 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 written in XML • OWL is a web standard • OWL has three sublanguages
6
What is an Ontology?• Ontology is about the exact description
of things and their relationships and an inference mechanism for it.
• For the web, ontology is about the exact description of web information and relationships between web information and reasoning with it.
• dictionary taxonomy ontology
7
a philosophical discipline—a branch of philosophy that
deals with the nature and the organisation of reality
• Science of Being (Aristotle, Metaphysics, IV, 1)
• Tries to answer the questions:
What characterizes being?Eventually, what is being?
Ontology: Origins and HistoryOntology in Philosophy
8
Ontology in Linguistics
“Tank“
ReferentFormStands for
Relates toactivates
Concept
[Ogden, Richards, 1923]?
9
• An ontology is an engineering artifact: – It is constituted by a specific vocabulary used to describe a
certain reality, plus – a set of explicit assumptions regarding the intended
meaning of the vocabulary.
• Thus, an ontology describes a formal specification of a certain domain:– Shared understanding of a domain of interest– Formal and machine manipulable model of a domain of
interest
“An explicit specification of a conceptualisation” [Gruber93]
Ontology in Computer Science
10
The Semantic WebShared ontologies help to exchange data
and meaning between web-based services
(Image by Jim Hendler)
11
Wine Example ScenarioTell me what wines I should buy to serve
with each course of the following menu.
Wine Agent
Grocery Agent
Books Agent
I recommend Chardonney or
DryRiesling
12
Ontologies in the Semantic Web
• Provide shared data structures to exchange information between agents
• Can be explicitly used as annotations in web sites
• Can be used for knowledge-based services using other web resources
• Can help to structure knowledge to build domain models (for other purposes)
13
History of the Semantic Web• Web was “invented” by Tim Berners-Lee (amongst
others), a physicist working at CERN• TBL’s original vision of the Web was much more
ambitious than the reality of the existing (syntactic) Web:
“... a goal of the Web was that, if the interaction between person and hypertext could be so intuitive that the machine-readable information space gave an accurate representation of the state of people's thoughts, interactions, and work patterns, then machine analysis could become a very powerful management tool, seeing patterns in our work and facilitating our working together through the typical problems which beset the management of large organizations.”
TBL (and others) have since been working towards realising this vision, which has become known as the Semantic Web
E.g., article in May 2001 issue of Scientific American…
14
• Realising the complete “vision” is too hard for now (probably)
• But we can make a start by adding semantic annotation to web resources
Scientific American, May 2001:
16
The Syntactic Web is…• A hypermedia, a digital library
– A library of documents called (web pages) interconnected by a hypermedia of links
• A database, an application platform– A common portal to applications accessible through web pages, and
presenting their results as web pages
• A platform for multimedia– BBC Radio 4 anywhere in the world! Terminator 3 trailers!
• A naming scheme– Unique identity for those documents
A place where computers do the presentation (easy) and people do the linking and interpreting (hard).
Why not get computers to do more of the hard work?
[Goble 03]
17
Hard Work using the Syntactic Web…
Find images of Peter Patel-Schneider, Frank van Harmelen and Alan Rector…
Rev. Alan M. Gates, Associate Rector of the Church of the Holy Spirit, Lake Forest, Illinois
18
Impossible(?) via the Syntactic Web…• Complex queries involving background knowledge
– Find information about “animals that use sonar but are not either bats or dolphins”
• Locating information in data repositories– Travel enquiries– Prices of goods and services– Results of human genome experiments
• Finding and using “web services”– Visualise surface interactions between two proteins
• Delegating complex tasks to web “agents”– Book me a holiday next weekend somewhere warm, not too
far away, and where they speak French or English
, e.g., Barn Owl
19
What is the Problem?• Consider a typical web page:
• Markup consists of: – rendering
information (e.g., font size and colour)
– Hyper-links to related content
• Semantic content is accessible to humans but not (easily) to computers…
20
What information can we see…WWW2002The eleventh international world wide web conferenceSheraton waikiki hotelHonolulu, hawaii, USA7-11 may 20021 location 5 days learn interactRegistered participants coming fromaustralia, canada, chile denmark, france, germany, ghana, hong kong,
india, ireland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switzerland, the united kingdom, the united states, vietnam, zaire
Register nowOn the 7th May Honolulu will provide the backdrop of the eleventh
international world wide web conference. This prestigious event …Speakers confirmedTim berners-lee
22
Solution: XML markup with “meaningful” tags?
<name>
</name>
<location>
</location>
<date> </date>
<slogan> </slogan>
<participants>
25
Need to Add “Semantics”• External agreement on meaning of annotations
– E.g., Dublin Core• Agree on the meaning of a set of annotation tags
– Problems with this approach• Inflexible• Limited number of things can be expressed
• Use Ontologies to specify meaning of annotations– Ontologies provide a vocabulary of terms– New terms can be formed by combining existing ones– Meaning (semantics) of such terms is formally specified– Can also specify relationships between terms in multiple
ontologies
26
Structure of an OntologyOntologies typically have two distinct components:• Names for important concepts in the domain
– Elephant is a concept whose members are a kind of animal– Herbivore is a concept whose members are exactly those
animals who eat only plants or parts of plants – Adult_Elephant is a concept whose members are exactly
those elephants whose age is greater than 20 years
• Background knowledge/constraints on the domain– Adult_Elephants weigh at least 2,000 kg– All Elephants are either African_Elephants or
Indian_Elephants– No individual can be both a Herbivore and a Carnivore
28
A Semantic Web — First Steps• Extend existing rendering markup with semantic
markup– Metadata annotations that describe content/function of web
accessible resources
• Use Ontologies to provide vocabulary for annotations– “Formal specification” is accessible to machines
• A prerequisite is a standard web ontology language– Need to agree common syntax before we can share
semantics– Syntactic web based on standards such as HTTP and HTML
Make web resources more accessible to automated processes
29
Ontology Design and Deployment• Given key role of ontologies in the Semantic Web, it will be
essential to provide tools and services to help users:– Design and maintain high quality ontologies, e.g.:
• Meaningful — all named classes can have instances• Correct — captured intuitions of domain experts• Minimally redundant — no unintended synonyms• Richly axiomatised — (sufficiently) detailed descriptions
– Store (large numbers) of instances of ontology classes, e.g.:• Annotations from web pages
– Answer queries over ontology classes and instances, e.g.:• Find more general/specific classes• Retrieve annotations/pages matching a given description
– Integrate and align multiple ontologies (merging)
31
Ontology Languages• Wide variety of languages for “Explicit Specification”
– Graphical notations• Semantic networks• Topic Maps (see http://www.topicmaps.org/)• UML• RDF
– Logic based• Description Logics (e.g., OIL, DAML+OIL, OWL)• Rules (e.g., RuleML, Prolog)• First Order Logic (e.g., KIF)• Conceptual graphs• (Syntactically) higher order logics (e.g., LBase)• Non-classical logics (e.g., Flogic, Non-Mon, modalities)
– Probabilistic/fuzzy• Degree of formality varies widely
– Increased formality makes languages more amenable to machine processing (e.g., automated reasoning)
32
• Objects/Instances/Individuals– Elements of the domain of discourse– Equivalent to constants in FOL
• Types/Classes/Concepts– Sets of objects sharing certain characteristics– Equivalent to unary predicates in FOL
• Relations/Properties/Roles– Sets of pairs (tuples) of objects– Equivalent to binary predicates in FOL
• Such languages are/can be:– Well understood– Formally specified– (Relatively) easy to use– Amenable to machine processing
Many languages use “OO” model based on:
33
Web “Schema” Languages• Existing Web languages extended to facilitate content
description– XML XML Schema (XMLS)– RDF RDF Schema (RDFS)
• XMLS not an ontology language– Changes format ~ DTDs (document schemas) for XML– Adds an extensible type hierarchy
• Integers, Strings, etc.• Can define sub-types, e.g., positive integers
• RDFS is recognisable as an ontology language– Classes and properties– Sub/super-classes (and properties)– Range and domain (of properties)
34
Why OWL?• OWL is a part of the "Semantic Web Vision" -
a future where:
• Web information has exact meaning
• Web information can be processed by computers
• Computers can integrate information from the web
35
OWL was designed for Processing Information
• OWL was designed to provide a common way to process the content of web information (instead of displaying it).
• OWL was designed to be read by computer applications (instead of humans).
36
OWL is Different from RDF
• OWL , RDF similar
• but OWL – stronger language – greater machine interpretability – larger vocabulary – stronger syntax.
37
OWL Sublanguages
• OWL has three sublanguages:– OWL Lite
• hierarchy + simple constraints + cardinality {0,1}
– OWL DL (includes OWL Lite) • complete, decidable• Type separations (class <> property <> individual)
– OWL Full (includes OWL DL) • aug. meaning RDF..
38
OWL is Written in XML
• By using XML, OWL information can easily be exchanged between different types of computers using different types of operating system and application languages.
• Oh yes, there is a namespace:
xmlns:owl ="http://www.w3.org/2002/07/owl#"
39
(more on) OWL
• Based on predecessors (DAML+OIL)
• A Web Language: Based on RDF(S)
• An Ontology Language: Based on logic
40
OWL Ontologies• What’s inside an OWL ontology
– Classes + class-hierarchy– Properties (Slots) / values– Relations between classes
(inheritance, disjoints, equivalents)– Restrictions on properties (type, cardinality)– Characteristics of properties (transitive, …)– Annotations– Individuals
• Reasoning tasks: classification, consistency checking
41
OWL Use Cases
• At least two different user groups– OWL used as data exchange language
(define interfaces of services and agents)– OWL used for terminologies or knowledge models
• OWL DL is the subset of OWL (Full) that is optimized for reasoning and knowledge modeling
42
OWL Example (Airport)• OWL Resource: http://www.daml.org/2001/10/html/airport-ont• Class: Airport • Properties:• elevation • iataCode • icaoCode • latitude • location • longitude • name • Produced using dumpont2.java
43
Scenario
• Semantic Web for Tourism/Traveling
• Goal: Find matching holiday destinations for a customer
I am looking for a comfortable destination
with beach access
Tourism Web
44
Scenario Architecture
• A search problem: Match customer’s expectations with potential destinations
• Required: Web Service that exploits formal information about the available destinations– Accommodation (Hotels, B&B, Camping, ...)– Activities (Sightseeing, Sports, ...)
45
Tourism Semantic Web
• Open World:– New hotels are being added– New activities are offered
• Providers publish their services dynamically
• Standard format / grounding is needed → Tourism Ontology
46
Tourism Semantic Web
OWLMetadata
(Individuals)
OWLMetadata
(Individuals)
OWLMetadata
(Individuals)
OWLMetadata
(Individuals)
Tourism Ontology
Web Services
Destination
AccomodationActivity
47
OWL (in Protégé)
• Individuals (e.g., “FourSeasons”)
• Properties– ObjectProperties (references)– DatatypeProperties (simple values)
• Classes (e.g., “Hotel”)
48
Individuals (Instances)
• Represent objects in the domain
• Specific things
• Two names could represent the same “real-world” individual
SydneysOlympicBeachBondiBeach
Sydney
49
Example of Individuals
<Region rdf:ID="CentralCoastRegion" />
equivalent to:
<owl:Thing rdf:ID="CentralCoastRegion" />
<owl:Thing rdf:about="#CentralCoastRegion"> <rdf:type rdf:resource="#Region"/>
</owl:Thing>
50
ObjectProperties
• Link two individuals together
• Relationships (0..n, n..m)
Sydney
BondiBeachhasPart
FourSeasonshasAccomodation
51
Example Property
<owl:ObjectProperty rdf:ID="course"> <rdfs:domain rdf:resource="#Meal" /> <rdfs:range rdf:resource="#MealCourse" />
</owl:ObjectProperty>
52
Property Domain & Range• If a relation is:
subject_individual hasProperty object_individual
• The domain is the class of the subject individual• The range is the class of the object individual (or a
datatype if hasProperty is a Datatype Property)
DomainClass RangeClasshasProperty
hasProperty
hasProperty
53
Example Cardinality<owl:Class rdf:ID="Wine"> <rdfs:subClassOf rdf:resource="&food;PotableLiquid"/>
<rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#madeFromGrape"/> <owl:minCardinality
rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality> </owl:Restriction>
</rdfs:subClassOf> ... </owl:Class>
<owl:Restriction> <owl:onProperty rdf:resource="#madeFromGrape"/> <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality> </owl:Restriction>
54
Inverse Properties
• Represent bidirectional relationships
• Adding a value to one property also adds a value to the inverse property (!)
Sydney
BondiBeachhasPart
isPartOf
55
Inverse Property Example
<owl:ObjectProperty rdf:ID="hasMaker">
<rdf:type rdf:resource="&owl;FunctionalProperty" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="producesWine"> <owl:inverseOf rdf:resource="#hasMaker" />
</owl:ObjectProperty>
56
Transitive Properties
• If A is related to B and B is related to C then A is also related to C
• Often used for part-of relationships
Sydney
BondiBeach
hasPart
NewSouthWales
hasPart
hasPart (derived)
57
Transitive Property Example<owl:ObjectProperty rdf:ID="locatedIn">
<rdf:type rdf:resource="&owl;TransitiveProperty" /> <rdfs:domain rdf:resource="&owl;Thing" /> <rdfs:range rdf:resource="#Region" />
</owl:ObjectProperty>
<Region rdf:ID="SantaCruzMountainsRegion"> <locatedIn rdf:resource="#CaliforniaRegion" />
</Region>
<Region rdf:ID="CaliforniaRegion"> <locatedIn rdf:resource="#USRegion" />
</Region>
58
Sub-properties Example<owl:ObjectProperty rdf:ID="hasWineDescriptor">
<rdfs:domain rdf:resource="#Wine" /> <rdfs:range rdf:resource="#WineDescriptor" />
</owl:ObjectProperty> <owl:ObjectProperty rdf:ID="hasColor">
<rdfs:subPropertyOf rdf:resource="#hasWineDescriptor" /> <rdfs:range rdf:resource="#WineColor" /> ...
</owl:ObjectProperty>
59
DatatypeProperties
• Link individuals to primitive values(integers, floats, strings, booleans etc)
• Often: AnnotationProperties without formal “meaning”
Sydney
hasSize = 4,500,000isCapital = truerdfs:comment = “Don’t miss the opera house”
60
Classes• Sets of individuals with common
characteristics
• Individuals are instances of at least one class
City
Sydney
Beach
Cairns
BondiBeach
CurrawongBeach
61
Examples of Classes in OWL
<owl:Class rdf:ID="Winery"/>
<owl:Class rdf:ID="Region"/>
<owl:Class rdf:ID="ConsumableThing"/>
62
Range and Domain• Property characteristics
– Domain: “left side of relation” (Destination)– Range: “right side” (Accomodation)
Sydney
BestWestern
FourSeasonshasAccomodation
DestinationAccomodation
hasAccomodation
63
Example Propery, Domain & Range
<owl:ObjectProperty rdf:ID="madeFromGrape">
<rdfs:domain rdf:resource="#Wine"/>
<rdfs:range rdf:resource="#WineGrape"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="course"> <rdfs:domain rdf:resource="#Meal" /> <rdfs:range rdf:resource="#MealCourse" />
</owl:ObjectProperty>
64
Domains
• Individuals can only take values of properties that have matching domain– “Only Destinations can have Accommodations”
• Domain can contain multiple classes
• Domain can be undefined:Property can be used everywhere
65
Superclass Relationships• Classes can be organized in a hierarchy
• Direct instances of subclass are also (indirect) instances of superclasses
Cairns
Sydney
Canberra
Coonabarabran
66
Example Subclasses<owl:Class rdf:ID="PotableLiquid"> <rdfs:subClassOf rdf:resource="#ConsumableThing" /> …
</owl:Class>
<owl:Class rdf:ID="Wine"> <rdfs:subClassOf rdf:resource="&food;PotableLiquid"/> <rdfs:label xml:lang="en">wine</rdfs:label> <rdfs:label xml:lang="fr">vin</rdfs:label> ... </owl:Class>
67
Class Relationships
• Classes can overlap arbitrarily
City
Sydney
CairnsBondiBeach
RetireeDestination
68
Class Disjointness• All classes could potentially overlap
• In many cases we want to make sure they don’t share instances
Sydney
UrbanArea RuralArea
SydneyWoomera
CapeYork
disjointWith
City Destination
69
Example disjoint
<owl:Class rdf:about="#Man"> <owl:disjointWith rdf:resource="#Woman"/>
</owl:Class>
70
Class versus Individual (Instance)• Levels of representation:
– In certain contexts a class can be considered an instance of something else.
– Grape, set of all grape varietals. CabernetSauvingonGrape is an instance of this class, but could be considered a class, the set of all actual Cabernet Sauvignon grapes.
• Subclass vs. instance: easy to confuse instance-of relationship with subclass relationship! – CabernetSauvignonGrape as individual & instance of Grape,
or subclass of Grape. – But: Grape class is the set of all grape varietals, any
subclass should be a subset. – CabernetSauvignonGrape is an instance of Grape, It does
not describe a subset of Grape varietals, it is a grape varietal.
71
Class Descriptions• Classes can be described by their
logical characteristics
• Descriptions are “anonymous classes”Things with three star accomodation
Things with sightseeing opportunities
RetireeDestination
SydneySanJose
BlueMountains
72
Class Descriptions
• Define the “meaning” of classes
• Anonymous class expressions are used– “All national parks have campgrounds.”– “A backpackers destination is a destination
that has budget accommodation and offers sports or adventure activities.”
• Expressions mostly restrict property values (OWL Restrictions)
73
Class Descriptions: Why?
• Based on OWL’s Description Logic support
• Formalize intentions and modeling decisions (comparable to test cases)
• Make sure that individuals fulfill conditions
• Tool-supported reasoning
74
Reasoning with Classes
• Tool support for 3 types of reasoning exists:– Consistency checking:
Can a class have any instances?
– Classification:Is A a subclass of B?
– Instance classification:Which classes does an individual belong to?
75
Restrictions (Overview)
• Define a condition for property values– allValuesFrom– someValuesFrom– hasValue– minCardinality– maxCardinality– cardinality
• An anonymous class consisting of all individuals that fulfill the condition
76
Cardinality Restrictions• Meaning: The property must have at least/at
most/exactly x values• is the shortcut for and• Example: A FamilyDestination is a
Destination that has at least one Accomodation and at least 2 Activities
77
allValuesFrom Restrictions• Meaning: All values of the property must
be of a certain type
• Warning: Also individuals with no values fulfill this condition (trivial satisfaction)
• Example: Hiking is a Sport that is only possible in NationalParks
78
Value constraints
<owl:Restriction>
<owl:onProperty rdf:resource="#hasParent" /> <owl:allValuesFrom rdf:resource="#Human" />
</owl:Restriction>
79
someValuesFrom Restrictions• Meaning: At least one value of the property
must be of a certain type
• Others may exist as well
• Example: A NationalPark is a RuralArea that has at least one Campground and offers at least one Hiking opportunity
80
hasValue Restrictions• Meaning: At least one of the values of
the property is a certain value
• Similar to someValuesFrom but with Individuals and primitive values
• Example: A PartOfSydney is a Destination where one of the values of the isPartOf property is Sydney
81
Enumerated Classes• Consist of exactly the listed individuals
OneStarRating
TwoStarRatingThreeStarRating
BudgetAccomodation
82
Example Description: Enumeration
<owl:Class> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#Eurasia"/> <owl:Thing rdf:about="#Africa"/> <owl:Thing rdf:about="#NorthAmerica"/> <owl:Thing rdf:about="#SouthAmerica"/> <owl:Thing rdf:about="#Australia"/> <owl:Thing rdf:about="#Antarctica"/>
</owl:oneOf> </owl:Class>
83
Logical Class Definitions
• Define classes out of other classes– unionOf (or)– intersectionOf (and)– complementOf (not)
• Allow arbitrary nesting of class descriptions (A and (B or C) and not D)
84
unionOf• The class of individuals that belong to
class A or class B (or both)
• Example: Adventure or Sports activities
Adventure Sports
85
intersectionOf• The class of individuals that belong to
both class A and class B
• Example: A BudgetHotelDestination is a destination with accomodation that is a budget accomodation and a hotel
BudgetAccomodation
Hotel
86
Implicit intersectionOf• When a class is defined by more than one class
description, then it consists of the intersection of the descriptions
• Example: A luxury hotel is a hotel that is also an accommodation with 3 stars
AccomodationWith3StarsHotel
LuxuryHotel
87
complementOf• The class of all individuals that do not belong to
a certain class
• Example: A quiet destination is a destination that is not a family destination
Destination
FamilyDestination
QuietDestination (grayed)
88
Class Conditions• Necessary Conditions:
(Primitive / partial classes)“If we know that something is a X,then it must fulfill the conditions...”
• Necessary & Sufficient Conditions:(Defined / complete classes)“If something fulfills the conditions...,then it is an X.”
89
Class Conditions (2)
QuietDestination
NationalPark
(not everything that fulfills theseconditions is a NationalPark)
(everything that fulfills theseconditions is a QuietDestination)
90
ClassificationNationalPark
BackpackersDestination
• A RuralArea is a Destination
• A Campground is BudgetAccomodation
• Hiking is a Sport• Therefore:
Every NationalPark is a Backpackers-Destination
(Other BackpackerDestinations)
92
Putting it All Together
• Ontology has been developed
• Published on a dedicated web address
• Ontology provides standard terminology
• Other ontologies can extend it
• Users can instantiate the ontology to provide instances– specific hotels– specific activities
93
Ontology Import
• Adds all classes, properties and individuals from an external OWL ontology into your project
• Allows to create individuals, subclasses, or to further restrict imported classes
• Can be used to instantiate an ontology for the Semantic Web
94
Tourism Semantic Web (2)
OWLMetadata
(Individuals)Tourism Ontology
Web Services
Destination
AccommodationActivity
95
OWL File<?xml version="1.0"?><rdf:RDF xmlns="http://protege.stanford.edu/plugins/owl/owl-
library/heli-bunjee.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:travel="http://protege.stanford.edu/plugins/
owl/owl-library/travel.owl#" xml:base="http://protege.stanford.edu/plugins/owl/owl-
library/heli-bunjee.owl">
[. . .]</rdf:RDF>
96
OWL File: [. . .] OWL body in RDF wrap <owl:Ontology rdf:about=""> <owl:imports rdf:resource="http://protege.stanford.edu/
plugins/owl/owl-library/travel.owl"/> </owl:Ontology>
<owl:Class rdf:ID="HeliBunjeeJumping"> <rdfs:subClassOf rdf:resource="http://protege.stanford. edu/plugins/owl/owl-library/travel.owl#BunjeeJumping"/> </owl:Class>
<HeliBunjeeJumping rdf:ID="ManicSuperBunjee">
[***]
</HeliBunjeeJumping>
97
OWL File [***] in HeliBunjeeJumping
<travel:isPossibleIn> <rdf:Description rdf:about="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl#Sydney"> <travel:hasActivity rdf:resource="#ManicSuperBunjee"/> </rdf:Description> </travel:isPossibleIn> <travel:hasContact> [ +++ ] </travel:hasContact> <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Manic super bunjee now offers nerve wrecking jumps from 300 feet right out of a helicopter. Satisfaction guaranteed.</rdfs:comment>
98
OWL File [+++] in travel:hasContact
<travel:Contact rdf:ID="MSBInc"> <travel:hasEmail rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[email protected] </travel:hasEmail> <travel:hasCity rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Sydney</travel:hasCity> <travel:hasStreet rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Queen Victoria St</travel:hasStreet> <travel:hasZipCode rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1240</travel:hasZipCode> </travel:Contact>
99
Problems with RDFSRDFS too weak to describe resources in sufficient detail
– No localised range and domain constraints• Can’t say that the range of hasChild is person when applied to
persons and elephant when applied to elephants
– No existence/cardinality constraints• Can’t 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• Can’t say that isPartOf is a transitive property, that hasPart is the
inverse of isPartOf or that touches is symmetrical
Difficult to provide reasoning support– No “native” reasoners for non-standard semantics– May be possible to reason via FO axiomatisation
100
Web Ontology Language RequirementsDesirable features identified for Web Ontology
Language:
Extends existing Web standards – Such as XML, RDF, RDFS
• Easy to understand and use– Should be based on familiar KR idioms
• Formally specified
• Of “adequate” expressive power
• Possible to provide automated reasoning support
101
From RDF to OWL• Two languages developed to satisfy above requirements
– OIL: 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 Proposed Recommendation
102
OWL Language• Three species of OWL
– OWL full is union of OWL syntax and RDF– OWL DL restricted to FOL fragment (¼ DAML+OIL)– OWL Lite is “easier to implement” subset of OWL DL
• Semantic layering– OWL DL ¼ OWL full within DL fragment– DL semantics officially definitive
• 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)
103
(In)famous “Layer Cake”
Data Exchange
Semantics+reasoning
Relational Data ?
?
???
???
???
• Relationship between layers is not clear• OWL DL extends “DL subset” of RDF
104
OWL built-in classes
• owl:FunctionalProperty, owl:InverseFunctionalProperty, owl:SymmetricProperty, owl:TransitiveProperty, owl:DeprecatedClass, owl:DeprecatedProperty
105
OWL built in properties• owl:equivalentClass, owl:disjointWith,
owl:equivalentProperty, owl:inverseOf, owl:sameAs, owl:differentFrom, owl:complementOf, owl:unionOf, owl:intersectionOf, owl:oneOf, owl:allValuesFrom, owl:onProperty, owl:someValuesFrom, owl:hasValue, owl:minCardinality, owl:maxCardinality, owl:cardinality, owl:distinctMembers
• annotation properties: owl:versionInfo, rdfs:label, rdfs:comment, rdfs:seeAlso, rdfs:isDefinedBy
• ontology properties: owl:imports, owl:priorVersion, owl:backwardCompatibleWith, owl:incompatibleWith
106
OWL Class Constructors
• XMLS datatypes as well as classes in
• Arbitrarily complex nesting of constructors
107
RDFS Syntax
<owl:Class> <owl:intersectionOf rdf:parseType=" collection"> <owl:Class rdf:about="#Person"/> <owl:Restriction> <owl:onProperty rdf:resource="#hasChild"/> <owl:toClass> <owl:unionOf rdf:parseType=" collection"> <owl:Class rdf:about="#Doctor"/> <owl:Restriction> <owl:onProperty rdf:resource="#hasChild"/> <owl:hasClass rdf:resource="#Doctor"/> </owl:Restriction> </owl:unionOf> </owl:toClass> </owl:Restriction> </owl:intersectionOf></owl:Class>
E.g., Person hasChild.Doctor hasChild.Doctor:
109
XML Schema Datatypes in OWL
• OWL supports XML Schema primitive datatypes– E.g., integer, real, string, …
• Strict separation between “object” classes and datatypes– Disjoint interpretation domain for datatypes
– Disjoint “object” and datatype properties
110
Why 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
111
OWL query language: OWL-QL
• OWL Query Language (OWL-QL) is an updated version of the DAML Query Language (DQL).
• It is intended to be a candidate standard language and protocol for query-answering dialogues among Semantic Web computational agents.
112
AcknowledgementsThanks to various people from
whom I “borrowed” material:
– Jeen Broekstra– Carole Goble– Frank van Harmelen– Austin Tate– Raphael Volz
And thanks to all the people from whom they borrowed it
Top Related