0% found this document useful (0 votes)
19 views16 pages

Semantic Web Lecture 5

The document discusses the Semantic Web, focusing on RDF Schema and ontologies. It explains how RDF allows for the representation of resources and their relationships through triples, and how RDF Schema extends this by defining vocabularies and class hierarchies. Additionally, it contrasts databases with ontologies, highlighting the latter's ability to store more complex information and facilitate knowledge sharing.

Uploaded by

sranjaonline
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views16 pages

Semantic Web Lecture 5

The document discusses the Semantic Web, focusing on RDF Schema and ontologies. It explains how RDF allows for the representation of resources and their relationships through triples, and how RDF Schema extends this by defining vocabularies and class hierarchies. Additionally, it contrasts databases with ontologies, highlighting the latter's ability to store more complex information and facilitate knowledge sharing.

Uploaded by

sranjaonline
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

The Semantic Web –

WEEK 5: RDF Schema +


Ontologies
The “Layer Cake” Model –
[From Rector & Horrocks
Semantic Web cuurse]
Recap
•‘Resources’ on the web are things that have a URI, like a web
page (a URL), a fragment of a web page (ie a URL followed
by a fragment identifier), a book, a person, a web service etc
•Last week we met RDF – a way of writing descriptions of
resources by using attributes (or property/predicate names)
and values. Hence we defined an RDF document to consist of
triples of the form
resource, attribute, value
Or in logic
subject, predicate, object
•An RDF document can be drawn as a directed, labeled graph
The Semantic Web
Classes and Properties

RDF is a kind of simple, ‘flat’ relational database
language. For web applications we need the kind of
structuring and representational capability of an OODB.


It is desirable that we can represent common object
classes (eg Person, Book, Company, Product) and
common properties of these classes. We also want to
make our class definitions explicit and SHARE them.


RDF does not give any ‘meaning’ to attributes or resources

The Semantic Web


RDF -> RDF Schema

RDF(S) allows users to define vocabularies of
terms, using Class, Property, type, subClassOf,
subPropertyOf, range, domain

Resources can be members of classes, and


classes can be put into a class hierarchy

So we expect triples of this form:


<resource> type Class
<resource> type <class>
<class> subClassOf <class>

The Semantic Web


Properties can have Sub-Properties

We expect triples of this form:


<resource> type Property
<Property> subPropertyOf Property>

x subPropertyOf y

Means..

“all pairs of resources which are related by x are also


related by y”

So motherof is a sub-property of what ??

The Semantic Web


Properties can have defined range and
domains
Domain and range give properties of properties ie the
class of thing that the property can be applied to
(domain) and the class of things that could be the value
(ranges)

So we expect triples of this form:

<Property> domain <Class>

<Property> range <Class>

Eg fatherof range Person


The Semantic Web
RDF Schema example
Cat type Class
hasParent type Property
Kitten subClassOf Cat
Dyllan type Kitten
sameLitter range Cat
sameLitter domain Cat

The Semantic Web


RDFS – another example -
longhand
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base= "http://www.animals.fake/animals">
<rdf:Description rdf:ID="animal">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-
schema#Class"/>
</rdf:Description>
<rdf:Description rdf:ID="horse">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-
schema#Class"/>
<rdfs:subClassOf rdf:resource="#animal"/>
</rdf:Description>
<rdf:Description rdf:ID="dog">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-
schema#Class"/>
<rdfs:subClassOf rdf:resource="#animal"/>
</rdf:Description>
</rdf:RDF> The Semantic Web
RDFS – example – shorter (type
implicit)
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf= "http://www.w3.org/1999/02/22-
rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-
schema#" xml:base=
"http://www.animals.fake/animals">
<rdfs:Class rdf:ID="animal" />
<rdfs:Class rdf:ID="horse">
<rdfs:subClassOf rdf:resource="#animal"/>
</rdfs:Class>
<rdfs:Class rdf:ID="dog">
<rdfs:subClassOf rdf:resource="#animal"/>
</rdfs:Class>
</rdf:RDF>
The Semantic Web
example – even shorter
Animal type class
Horse type class
Horse subClassOf Animal
Dog subClassOf Animal

.. Bit of an ontology!

The Semantic Web


Ontologies – many defns

An ‘Ontology’ is
--- an agreed on, shared, common understanding of a domain written as an
explicit, formal specification.
-- a specification of a conceptualization, where a conceptualization is “an
abstract, simplified view of the world”
-- etc

Because of the taxonomic nature of things, the specification is often written


in terms of classes and properties etc


RDFS can be used as an ontology language as it has Classes and
properties, Sub/super-classes, range and domain


Ontologies are often used to share the common meanings of terms
used in semantic web pages.

The Semantic Web


Ontologies – from philosopy

ONTOLOGY - “The systematic study of existence”


“the science or study of being”

EPISTEMOLOGY - “The study of knowledge”

The Semantic Web


Ontologies - history

First used for Knowledge-Sharing and Knowledge
Re-Use in KBS.
They can be as simple as a ‘concept hierarchy’ or as
complex as an axiomatic theory of sets.

There are various “kinds” of ontology: eg –
-- representation ontology (axiomatization of basic
operations used in many applications) or --
-- application ontology (capturing a taxonomy of the
animal kingdom).

The Semantic Web


Databases vs Ontologies
Databases are
- Large bodies of persistent data
- Interpreted as a list of facts
- Generally stored relationally in tables (OO
databases may never catch on…)
- Complete with highly optimised access procedures
and interface mechanisms

The Semantic Web


Databases vs Ontologies
In comparison, ontologies

- Can store more information than factual eg


quantified (Fred has at least one pet) or disjunctive
(Bill is a boy or a girl)
- Come with implied reasoning mechanisms
- Are more akin to OO DBs
- Classes and properties may have more than one
description / definition

The Semantic Web


Conclusions
- RDF schema + languages above it are considered
suitable languages for Semantic Web encoding
- Ontologies are used to encode and share
knowledge in the Semantic Web

The Semantic Web

You might also like