Professional Documents
Culture Documents
Semantic Web: Department of Computer Science Institute For System Architecture, Chair For Computer Networks
Semantic Web: Department of Computer Science Institute For System Architecture, Chair For Computer Networks
Semantic Web
Classical Web approach
web content
((X)HTML, XML,
AJAX applications …)
publisher
user
Search engine
databases ...
2
Example for a problem…
Advertisement?
Useful information?
Advertisement?
Useful information?
There needs to be
a universal way to
add information
about information
Pages have to
be annotated with
metadata 3
The Semantic Web vision
• By adding additional information about data, web content becomes
machine processable and thus computer programs and especially
software agents can do special tasks based on the published
information
• Resources are not only connected by hyperlinks but by semantics and
semantic links
• Applications combine information from different sources and do
reasoning in order to generate additional information
annotated
person
website
annotated annotated
website website
search engine
Search engine
3 Additional data
1 4
Hospital’s Website
6 5
agent
2
Appointment
calendar
5
Necessary components
6
Semantic Web stack
Trust RIF:
Rule Interchange Format
Allows uniform
Proof representation of rule
systems for automated
Unifying logic inference of further
knowledge out of existing
SPARQL
knowledge that is
OWL Rules: RIF
Encryption
Signature
represented in RDF
RDF Schema
Unicode:
A character code that
Data interchange: RDF defines every character in
most of the speaking
XML languages in the world;
e.g. XML uses UTF-8 (1
Byte encoded Unicode
URI Unicode
characters) as default
8
RDF Model
predicate
subject (property) object
(resource that has a special property) (value of the property)
http://www.somedomain.com/term#author
http://www.somedomain.com/index.html Arthur Dent
9
RDF Model
http://www.hospital.org/department#orthopaedy
http://www.hospital.org/term#consultationHour http://www.hospital.org/term#hasHead
.
http://www.hospital.org/term#name http://www.hospital.org/term#age
http://www.hospital.org/term#title
Dr.
10
RDF/XML
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
namespace
xmlns:term="http://www.hospital.org/term#" declaration
xml:base="http://www.hospital.org/staffid#">
<rdf:Description rdf:about="http://www.hospital.org/departments#orthopaedy">
<term:consultationHour>03.00 p.m.</term:consultationHour>
<term:hasHead rdf:resource="2342"/>
</rdf:Description>
<rdf:Description rdf:ID="2342"> RDF statements
<term:name>Juri Schiwago</term:name>
<term:age rdf:datatype="&xsd;integer">42</term:age>
<term:title rdf:datatype="&xsd;string">Dr.</term:title>
</rdf:Description>
</rdf:RDF>
11
RDF Schema
Staff
RDFS member
classes rdfs:subClassOf rdfs:subClassOf
Administratio Technical
n staff rdfs:subClassOf support staff
member member
Academic rdfs:domain
staff
hasHead member
rdfs:range hasName
rdfs:domain
rdfs:range
department &xsd;string
type type
RDF type
instances
hasName
Juri
http://www.hospital.org/staffid#2342
Schiwago
13
RDF Schema
<?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#">
<rdf:Description rdf:ID="StaffMember">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
</rdf:Description>
<rdfs:Class rdf:ID="AcademicStaffMember">
<rdfs:subClassOf rdf:resource="#StaffMember"/>
</rdfs:Class>
<rdf:Property rdf:ID="hasHead">
<rdfs:domain rdf:resource="Department"/>
<rdfs:range rdf:resource="AcademicStaffMember"/>
</rdf:Property>
...
</rdf:RDF>
14
Instantiating RDFS classes
<?xml version="1.0"?>
<term:AcademicStaffMember rdf:ID="2342"/>
<term:hasName rdf:datatype="&xsd;string">
Juri Schiwago
</term:hasName>
</term:AcademicStaffMember>
</rdf:RDF>
15
Shortcomings of RDFS
16
OWL
connected
knowledge semantics
OWL ontology
RDFS abstraction
RDF Relational model
XML Data Exchange
structure syntax
17
OWL
18
OWL
<?xml version="1.0"?>
<rdf:RDF
xmlns:owl = "http://www.w3.org/2002/07/owl#"
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs= "http://www.w3.org/2000/01/rdf-schema#">
<owl:Ontology rdf:about="">
<owl:priorVersion>
<owl:Ontology rdf:about="http://www.somedomain.org/oldontology"/>
</owl:priorVersion>
<owl:imports rdf:resource="http://www.somedomain.org/furtherontology"/>
<rdfs:label>Hospital Ontology</rdfs:label>
</owl:Ontology>
...
<owl:Class rdf:Id="AcademicStaffMember">
<rdfs:subClassOf rdf:resource="#Person" />
<owl:disjointWith rdf:resource="AdministrativeStaffMember"/>
</owl:Class>
...
<owl:Class rdf:Id="Department">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasHead"/>
<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
</owl:Restriction>
</rdfs:subClassOf>
...
</owl:Class>
</rdf:RDF>
19
OWL sublanguages
OWL DL
OWL Lite
20
SPARQL
Result:
hour
3.00 pm
21
Example Schema: Friend of a Friend
isbn:3257204205 isbn:3257204205
http://www.hawking.org.uk http://www.hawking.org.uk
foaf:Person
isbn:3257204205 isbn:3257204205
http://www.hawking.org.uk http://www.hawking.org.uk
24
Web content annotation possibilities
3. Embedded annotations
example.html
RDF data can be embedded in:
some RDF statements
– the html-header
– an <object>- or <script>-tag
– an html-comment
– by using RDFa 25
Data integration
Personal information base
Appointment Personal Past Social
calendar interests activities connections
Logic ontology2.owl
RDF
HTML
Document
RDF arbitrary software RDF
By using OWL and RDF it is possible to bring data from includes
different data sources to an uniform representation information flow
which can be used by arbitrary software that is aware of
the semantics (e.g. knows OWL description) uses 26
Further approaches
28
RDFa example
<ul class="vcard">
<li class="fn">Smith</li> Name
<li class="org">ACME Company</li> Associated
<li class="tel">1234-4321</li> organization
<li><a class="url„ href="http://example.com/">
Website
http://example.com/
associated to
</a> entity
</li>
</ul>
30
Microdata
31
Microdata
• Three further attributes have been intoduced:
• itemid: specifies unique identifier of the item
• itemtype: valid URL of a vocabulary used for items and properties
• itemref : associates properties that are not descendants of the
element with the itemscope attribute with the item (via item id)
• Vocabulary is described informally
<div itemscope itemtype="http://data-vocabulary.org/Person"
itemid="urn:uuid:f3373a7b-4958-4e55-8820-d03a191fb76a">
The name of the customer is
<span itemprop="name">Bob Michael</span>
His homepage is available here:
<a href="http://www.example.com" itemprop="url">
www.example.com</a>
He has got a <span itemprop="title">Phd</span> title from
<span itemprop="affiliation">ACME University</span>.
</div>
<p itemscope
itemref="urn:uuid:f3373a7b-4958-4e55-8820-
d03a191fb76a">The customer works at
<span itemprop="affiliation">ACME Company</span>.
</p>
32
Conclusion…
Knowledge engineer
RDFa
RDF RDFS OWL
<html> reference information data data Microdata <html>
… include …
</html> Microformats </html>
<html>
<html>
…
<html>
…
</html> extraction of
personalised extraction of …
</html>
information (semi)structured </html> unstructured
data data
33
References
Links at W3C:
Microdata http://www.w3.org/TR/microdata/
specification
34