Semantic Web Ontology

jumentousmanlyInternet and Web Development

Oct 21, 2013 (3 years and 7 months ago)

103 views

Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
1
OWL (General)
OWL Lite
Examples
Semantic Web Ontology
1
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
2
Web Ontology Language (OWL)
!
RDF Schemas
!
Equality
!
Property
!
Restrictions
!
Class Axioms
2
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
3
OWL
!
Facilitates greater machine interpretability
of Web content
!
Provides additional vocabulary along with
a formal semantics
!
OWL has three sublanguages:
"
OWL Lite
"
OWL DL
"
OWL Full
3
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
4
Joining the W3C Club
!
Designed to meet requirements for Web Ontology
language
!
Recommended by W3C for the Semantic Web
!
Syntax built on
XML
"
No semantic constraints
!
XML Schema
"
restricts structure of XML documents
"
extends XML with datatypes
4
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
5
Growing Stack
!
RDF
"
data model for objects ("resources") and relations between
them
"
provides a simple semantics for this data model
"
can be represented in an XML syntax
!
RDF Schema
"
describes properties and classes of RDF resources
"
gives semantics for generalisation-hierarchies of them
!
OWL
"
adds more vocabulary for describing properties and classes,
e.g.:
!
relations between classes, richer typing of properties,
characteristics of properties, and enumerated classes
5
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
6
Three sub-languages
!
Designed for use by specific communities of
developers and users
!
OWL Lite

"
Provides a classification hierarchy and simple
constraints
"
For example, while it supports cardinality
constraints, it only permits cardinality values of
0 or 1
"
Simpler to provide tool support for OWL Lite
than its more expressive relatives
"
Provides a quick migration path
6
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
7
Three sub-languages
!
OWL DL
"
provides maximum expressiveness while retaining
computational completeness and decidability
"
includes all OWL language constructs, but they can be used
only under certain restrictions (for example, while a class may
be a subclass of many classes, a class cannot be an instance of
another class).
!
OWL Full
"
provides maximum expressiveness and the syntactic freedom
of RDF with no computational guarantees
"
For example, in OWL Full a class can be treated simultaneously
as a collection of individuals and as an individual in its own
right
"
allows an ontology to augment the meaning of the pre-defined
(RDF or OWL) vocabulary.
7
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
8
OWL Lite
The list of OWL Lite language
constructs is given below.
RDF Schema Features:

!
Class (Thing, Nothing)
!
rdfs:subClassOf
!
rdf:Property
!
rdfs:subPropertyOf
!
rdfs:domain
!
rdfs:range
!
Individual
(In)Equality:

!
equivalentClass
!
equivalentProperty
!
sameAs
!
differentFrom
!
AllDifferent
!
distinctMembers
Property Characteristics:

!
ObjectProperty
!
DatatypeProperty
!
inverseOf
!
TransitiveProperty
!
SymmetricProperty
!
FunctionalProperty
!
InverseFunctionalProperty
Property Restrictions:

!
Restriction
!
onProperty
!
allValuesFrom
!
someValuesFrom
8
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
9
OWL Lite
Restricted Cardinality:

!
minCardinality
(only 0 or 1)
!
maxCardinality
(only 0 or 1)
!
cardinality
(only 0 or 1)
Header Information:

!
Ontology
!
Imports
Class Intersection:

!
intersectionOf
Versioning:

!
versionInfo
!
priorVersion
!
backwardCompatibleWith
!
incompatibleWith
!
DeprecatedClass
!
DeprecatedProperty
Annotation Properties:

!
rdfs:label
!
rdfs:comment
!
rdfs:seeAlso
!
rdfs:isDefinedBy
!
AnnotationProperty
!
OntologyProperty
9
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
10
OWL DL and Full
!
These are the OWL DL and
OWL Full language constructs
that are in addition to or
expand those of OWL Lite
Class Axioms:

!
oneOf, dataRange
!
disjointWith
!
equivalentClass
(applied to class expressions)
!
rdfs:subClassOf
(applied to class expressions)
Boolean Combinations of
Class Expressions:

!
unionOf
!
complementOf
!
intersectionOf
!
Arbitrary Cardinality:

!
minCardinality
!
maxCardinality
!
cardinality
!
Filler Information:

!
hasValue
10
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
11
RDF Schema Features
!
Class
Classes can be made to be equivalent to or
subclasses of intersections of other classes or
restrictions. There is a built-in most general class
named
Thing
that is the class of all individuals
and the superclass of all classes.
!
rdf:Property
A term that will be used as a
relationship between individuals is a property.
!
rdfs:subClassOf

Class hierarchies may be
created by stating that classes are subclasses of
other classes.
!
rdfs:subPropertyOf

Property hierarchies may
be created by stating that some properties are
subproperties of other properties.
11
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
12
RDF Schema Features’
!
rdfs:domain
Properties may be stated to have
domains
!
rdfs:range
Properties may be stated to have
ranges.
!
Individual
: Individuals may be described as an
instance of a class and properties may also be
used to relate one individual to another. For
example, an individual named Deborah may be
described as an instance of the class person and
the property hasEmployer may be used to relate
the individual Deborah to the individual
StanfordUniversity.
12
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
13
Equality and Inequality
!
sameClassAs
Two classes may be stated to be the
same (i.e., they may be stated to be different
names for the same set of individuals). This can
be used e.g. for creating synonymous classes.
!
samePropertyAs
Two properties may be stated to
be the same. This may be used to create
synonymous properties.
!
sameIndividualAs
Two individuals may be stated
to be the same. This may be used to create a
number of different names that may be used to
refer to the same individual.
!
differentIndividualFrom
Two individuals may
be stated to be different from each other.
13
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
14
Property Characteristics
!
inverseOf
One property may be stated to
be the inverse of another property.
!
TransitiveProperty
Properties may be
stated to be transitive.
!
SymmetricProperty
Properties may be
stated to be symmetric.
14
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
15
Property Characteristics’
!
FunctionalProperty
(unique) Properties may be stated to
have unique values. If a property is a FunctionalProperty,
then it has no more than one value. It may have no values.
This has been referred to as a unique property. Another
way of saying this is that the property's minimum
cardinality is zero and its maximum cardinality is 1.
!
InverseFunctionalProperty
(unambiguous): Properties
may be stated to be inverse functional. If a property is
inverse functional then the inverse of the property is
functional. Thus the inverse of the property has at most
one value. This has also been referred to as an
unambiguous property.
15
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
16
Property Characteristics’
!
allValuesFrom
(universal local range
restrictions; toClass in DAML+OIL):
allValuesFrom
is stated on a property with
respect to a class. A property on a particular class
may have a local range restriction associated with
it.
!
someValuesFrom
(existential local range
restrictions; hasClass in DAML+OIL)
someValuesFrom
is stated on a property with
respect to a class. A property on a particular class
may have a restriction that at least one value for
that property is of a certain type.
16
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
17
Restricted Cardinality
!
minCardinality
(restricted to 0 or 1) Cardinality is stated
on a property with respect to a particular class. If a
minCardinality
of 1 is stated on a property with respect to a
class, then any instance of that class will be related to at
least one individual by that property. This is another way of
saying that the property is
required
for all individual
instances of the class.
!
maxCardinality
(restricted to 0 or 1) Cardinality is stated
on a property with respect to a particular class. If a
maxCardinality
of 1 is stated on a property with respect to
a class, then any instance of that class will be related to at
most one individual by that property. This is sometimes
called a functional or unique property.
!
cardinality
(restricted to 0 or 1) Cardinality is provided
as a convenience when it is useful to state that a property
on a class has both
minCardinality
0 and
maxCardinality
0
or both
minCardinality
1 and
maxCardinality
1.
17
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
18
Datatypes
!
Datatypes
:
OWL uses the RDF mechanisms
for data values. The built-in OWL datatypes are
taken largely from the XML Schema datatypes.
!
For example, the range of a property might be
&xsd;positiveInteger
18
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
19
Header Information
!
imports
Each imports statement references another OWL
ontology containing definitions that apply to the current
ontology. Each reference consists of a URI specifying from
where the ontology is to be imported from. Imports
statements are transitive.
!
Dublin Core Metadata
Ontologies also have a non-logical
component (not yet specified) that can be used to record
authorship, and other non-logical information associated
with a ontology. A prime candidate is to associate with the
ontology attributes from the Dublin Core Metadata
standard.
!
versionInfo
The versionInfo element generally contains a
string giving information about this version, for example
RCS/CVS keywords. This element does not contribute to
the logical meaning of the ontology.
19
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
20
Class Axioms
!
oneOf
(enumerated classes) Classes can be described by
enumeration of the individuals that make up the class. The
members of the class are exactly the set of enumerated
individuals; no more, no less.
!
disjointWith
The full OWL language allows the statement
that classes are disjoint, for example stating that man and
woman are disjoint classes, that is, they are disjoint with
each other. From this a reasoner could conclude an
inconsistency when an individual is stated to be an instance
of both and similarly could deduce that if A is an instance of
Man, then A is
not
an instance of Woman.
!
sameClassAs
applied to class expressions
!
rdfs:subClassOf
applied to class expressions
20
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
21
Boolean Combinations
!
unionOf
!
intersectionOf
!
complementOf
!
OWL allows arbitrary Boolean combinations of classes:
IntersectionOf
,
UnionOf
, and
complementOf
.
!
For example, taking the intersection of the class of UK
citizens with the class of senior citizens describes the class
of UK senior citizens. Using complement, we could state
that children are not senior citizens (i.e., the class children
is a subclass of the complement of senior citizens).
Citizenship of the European Union could be described as the
union of the citizenship of all member states.
21
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
22
Ontology consists of set of axioms, e.g., asserting facts about classes:
<owl:Class rdf:ID="Animal" />
<owl:Class rdf:ID="Man">
<rdfs:subClassOf rdf:resource="#Person"/>
<rdfs:subClassOf rdf:resource="#Male"/>
</owl:Class>
<owl:Class rdf:ID="MarriedPerson">
<owl:intersectionOf>
<owl:Class rdf:about="#Person"/>
<owl:Restriction owl:cardinality="1">
<owl:onProperty rdf:resource="#hasSpouse"/>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
Example 1: classes
22
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
23
Can assert facts about object properties:
<owl:ObjectProperty rdf:ID="hasParent" />
<owl:ObjectProperty rdf:ID="hasFather">
<rdfs:subPropertyOf rdf:resource="#hasParent"/>
<rdfs:range rdf:resource="#Male"/>
</owl:ObjectProperty>
<owl:TransitiveProperty rdf:ID="descendant" />
<owl:ObjectProperty rdf:ID="hasChild">
<owl:inverseOf rdf:resource="#hasParent" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="hasMom">
<owl:samePropertyAs rdf:resource="#hasMother" />
</owl:ObjectProperty>
Example 2: Properties
23
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
24
Can assert facts about individuals, e.g.:
<Person rdf:ID="John" />
<Person rdf:ID="Mary" />
<rdf:Description rdf:about="#John">
<hasParent rdf:resource="#Mary"/>
<age>25</age>
</rdf:Description>
<rdf:Description rdf:about="#Clinton">
<sameIndividualAs rdf:resource="#BillClinton"/>
</rdf:Description>
Example 3: Individuals
24
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
25
allValuesFrom
!
Example:
<owl:Restriction>
<owl:onProperty rdf:resource="#hasParent" />
<owl:allValuesFrom rdf:resource="#Person" />
</owl:Restriction>
!
Class of all individuals whose parents are persons
!
Analogous to universal quantification (
!
) in FOL
25
Lecture 15
Slides Created by W. Song, CS, University of Durham. Modified by P. Shaw, CS, University of Durham
26
someValuesFrom
!
Example:
<owl:Restriction>
<owl:onProperty rdf:resource=“#hasSibling” />
<owl:someValuesFrom rdf:resource=“#DU_students” />
</owl:Restriction>
!
Class of individuals that have some siblings (at least one)
that are Durham University students
!
Analogous to existential quantification (
"
) in FOL
!
Individuals with no relevant property assertions may still be
members of the class (incomplete knowledge)
26