You are on page 1of 32

SEMANTIC WEB TECHNOLOGIES

Instructor : Amna Basharat Haider


Lecture :6
Date : 3rd February, 2009
A LITTLE RECAP!

FAST-NU, Islamabad Fall 2008 - Lecture 1 Instructor: Amna Basharat Haider


Semantic Web Technologies

Problems with current search engines

• Current search engines = keywords:


▫ high recall, low precision
▫ sensitive to vocabulary
▫ insensitive to implicit content
Semantic Web Technologies

Search engines
g on the Semantic Web

• concept search instead of keyword search


g g of queries
• semantic narrowing/widening q
• query-answering over >1 document
• document
d t transformation
t f ti operators
t
Semantic Web Technologies

Semantic Web Wedding Cake

5
LOOKING BACK ON XML!
Semantic Web Technologies

XML: User definable and domain specific


p markup
p

HTML:
<H1>Introduction to AI</H1>
<UL> <LI>Teacher: Frank van Harmelen
<LI>Students: 1AI, 1I
<LI>Requirements:
LI R i t none
</UL>

XML:
<course>
<title>Introduction to AI</title>
<teacher>Frank van Harmelen</teacher>
<students>1AI, 1I</students>
<req>none</req>
</course>
/
Semantic Web Technologies

XML: document = labelled tree


• node = label + attr/values + contents
<course date=“...”>
course
<title>...</title>
<teacher>...</teacher> =
<name>...</name> titl teacher
title t h students
t d t
<http>...</http>
<students>...</students>
name http
p
</course>

• XML Schema: ggrammars for describing


g
legal trees and datatypes
• So:
why not use XML to represent semantics?
Semantic Web Technologies

Syntax versus Semantics


• Syntax:
y the structure of your
y data
• Semantics: the meaning of your data
• Two conditions necessary y for
interoperability:
▫ Adopt a common syntax: this enables
applications to parse the data.
▫ Adopt a means for understanding the
semantics: this enables applications to use the
data.
Semantic Web Technologies

Drawbacks of XML
• XML is a universal metalanguage for defining markup

• It provides a uniform framework for interchange of


data and metadata between applications

• However, XML does not provide any means of talking


about the semantics (meaning) of data

• E.g., there is no intended meaning associated with


the nesting of tags
▫ It is up to each application to interpret the nesting.
Semantic Web Technologies

Nesting of Tags in XML


David Billington is a lecturer of Discrete Maths

<course name="Discrete Maths">


<lecturer>David Billington</lecturer>
</course>

<lecturer name=
name="David
David Billington
Billington">
>
<teaches>Discrete Maths</teaches>
</lecturer>

Opposite nesting, same information!


Semantic Web Technologies

XML and Semantics?


<Predator>

</Predator>
• Predator: a medium
medium-altitude,
altitude, long
long-endurance
endurance
unmanned aerial vehicle system.
• Predator : one that victimizes, plunders, or
destroys, especially for one's own gain.
• Predator : an organism that lives by preying
on other organisms.
• Predator: a company which specializes in
camouflage attire.
Semantic Web Technologies

XML: limitations for semantic markup

• XML makes no commitment on:


n Domain-specific ontological vocabulary
o Ontological modeling primitives
• Requires pre-arranged agreement on n & o
• Only
O l ffeasible
ibl for
f closed
l d collaboration
ll b i
▫ agents in a small & stable community
▫ pages on a small & stable intranet
• Not suited for sharing Web-resources
GOING ON TO RDF NOW!

FAST-NU, Islamabad Fall 2008 - Lecture 1 Instructor: Amna Basharat Haider


Semantic Web Technologies

RDF basics…
• RDF:
▫ is a W3C standard
standard, which provides tool to describe
Web resources
▫ provides interoperability between applications that
exchange machine-understandable information

• RDF Schema:
▫ is a W3C standard which defines vocabulary for
RDF
▫ organizes this vocabulary in a typed hierarchy
▫ capable to explicitly declare semantic relations
between vocabulary terms
Semantic Web Technologies

What is RDF ?
• RDF is a data model
x the model is domain-neutral,
domain neutral application
application-neutral
neutral
and ready for internationalization (i18n)
x the model can be viewed as directed, labeled
graphs or as an object-oriented model
(object/attribute/value)

• RDF data model is an abstract, conceptual


layer
y independent
p of XML
x consequently, XML is a transfer syntax for RDF,
not a component of RDF
Semantic Web Technologies

RDF model
„ RDF “statements” consist of
resources ((= nodes)) = subject
j
which have properties = predicate
which have values (= nodes,strings) = object

resource value
property

“http://www.w3.org/TR/REC-rdf-syntax/ has the author Ora Lassila”

http://www.w3.org/TR/REC-rdf-syntax/
author

“Ora Lassila”
Semantic Web Technologies

RDF Model Example


“W3C”

dc:Publisher

h
http://www.w3.org/TR/REC-rdf-syntax/
// 3 /TR/REC df /
dc:Creator

dc:Date
“Ora Lassila”


“1999-02-22”
Semantic Web Technologies

RDF – Semantic Web over Web Resources


John

has homepage
has_homepage
Director
has_job

Ontology to_be_friends
_with

has_job has_homepage
Secretary
Mary
BASIC IDEAS OF RDF
Detailed!
Semantic Web Technologies

Basic Ideas of RDF

• Basic building block: object-attribute-value


triple
▫ It is
i called
ll d a statement
t t t
▫ Sentence about Billington is such a
statement
• RDF has been given a syntax in XML
▫ This syntax inherits the benefits of XML
▫ Other
Oth syntactic
t ti representations
t ti off RDF
possible
Semantic Web Technologies

Basic Ideas of RDF (2)


• The fundamental concepts of RDF are:
▫ resources
▫ properties
▫ statements
Semantic Web Technologies

Resources
• We can think of a resource as an object, a
“thing”
thing we want to talk about
▫ E.g. authors, books, publishers, places, people,
hotels

• Every resource has a URI, a Universal


Resource Identifier

• A URI can be
b
▫ a URL (Web address) or
▫ some other kind of unique identifier
Semantic Web Technologies

Resources
• All things being described by RDF expressions
are called resources:
▫ entire Web page;
▫ a specific XML element;
▫ whole collection of pages;
▫ an object that is not directly accessible via the
Web.
Semantic Web Technologies

Resources and URIs


• A resource can be anything that has identity
• Uniform Resource Identifiers (URI)*
(URI) provide a simple
and extensible means for identifying a resource

• Not all resources are network "retrievable"; e.g.,


human beings, corporations, and books in a library
can also be considered resources

* The term "Uniform Resource Locator" (URL) refers to the


subset
b t off URI that
th t identify
id tif resources via
i a representation
t ti off
their primary access mechanism (e.g., their network "location"),
rather than identifying the resource by name or by some other
attribute(s) of that resource.
resource
Semantic Web Technologies

URI

Venn diagram of Uniform Resource Identifier (URI) scheme categories.


Schemes in the URL ((locator)) and URN ((name)) categories
g both function as
resource IDs, so URL and URN are subsets of URI. They are also, generally,
disjoint sets. However, many schemes can't be categorized as strictly one
or the other, because all URIs can be treated as names, and some schemes
embody y aspects
p of both categories
g – or neither.
Semantic Web Technologies

Properties
• Properties are a special kind of resources

• They describe relations between resources


▫ E.g.
E g “written
written by
by”, “age”
age , “title”
title , etc.
etc

• Properties are also identified by URIs

• Advantages of using URIs:


▫ Α global,
global worldwide,
worldwide unique naming scheme
▫ Reduces the homonym problem of distributed data
representation
Semantic Web Technologies

Statements
• Statements assert the properties of resources

• A statement is an object-attribute-value
triple
▫ It consists of a resource, a property, and a
value

• Values can be resources or literals


▫ Literals are atomic values (strings)
( g )
Semantic Web Technologies

RDF Statement
• Subject of an RDF statement is a resource

• Predicate of an RDF statement is a property


of a resource

• Object of an RDF statement is the value of a


property of a resource
Semantic Web Technologies

Example of RDF Statement


Ora Lassila is the creator of the resource
http://www.w3.org/Home/Lassila.
Subject (resource) http://www.w3.org/Home/Lassila
Predicate (property) Creator
Object (literal) “Ora
Ora Lassila”
Lassila
Semantic Web Technologies

RDF Example (serialization syntax)

Ora Lassila is the creator of the resource


http://www.w3.org/Home/Lassila.

<rdf:RDF>
<rdf:Description about=
"http://www.w3.org/Home/Lassila">
<s:Creator>Ora Lassila</s:Creator>
</rdf:Description>
</rdf:RDF> 's' is a specific namespace prefix, e.g.
xmlns:s="http://description.org/schema/"
Semantic Web Technologies

RDF Example (abbreviated syntax)

Ora Lassila is the creator of the resource


http://www.w3.org/Home/Lassila.

<rdf:RDF>
< df D
<rdf:Description
i ti
about="http://www.w3.org/Home/Lassila"
s:Creator="Ora
s:Creator Ora Lassila
Lassila" />
</rdf:RDF>

You might also like