1. Wissenstechnologie WS 08/09
Michael Granitzer
IWM TU Graz & Know-Center
Know Center
http://kmi tugraz at
http://kmi.tugraz.at http://www.know-center.at
http://www know center at
This work is licensed under the Creative Commons Attribution 2.0 Austria License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/at/.
2. Today
Topics of the practical excercise
Overview Semantic Web (Rep)
The Semantic Web Stack
• U i d URI
Unicode,
• XML, XML Schema, Namespaces
• Resource Description Framework 2
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
3. Organization – Practical Excercise
Practical/technical or theoretical working out of particular topics in groups
of 2-4
f
Announced also on the blog
http://kmi.tugraz.at/blogs/wissenstechnologie/ubungsthemen/
Passwort: wt08
Details: http://kmi.tugraz.at/blogs/wissenstechnologie/prufungsmodus/
Practical/technical Exercise
act ca /tec ca e c se
– Documentation (10%)
– Implementation (45%)
– Presentation 8.01. or 11.12. (45%)
Theoretical Excercise
– Literature Gathering (Bibsonomy) (10%).
– Written Summary (3500 words per group member) (45%)
– Presentation 8.01. or 11.12. (45%)
3
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
4. Organization – Scheduling
Milestone Theoretical Technical How?
Exercise Exercise
Next Week Topic presentation In the lecture/ on
(8.10.08) the blog
22.10.08 Topic selection and group via E-Mail to me
announcement
24.11.08 Gathering of Requirements Bibsonomy/ Google
relevant Literature Definition finished Docs
finished
11 12 08 &
11.12.08 Oral t ti
O l presentation O l presentation
Oral t ti
08.01.09 of results & of results &
feedback from my feedback from my
side side
29.01.09 Delivery of final Delivery of final Via Google Docs
results results
4
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
5. Excercise Topics Topics of the practical
Schriftlich theoretische A b it
S h iftli h th ti h Arbeiten excercise
1. Überblick über Ontology Alignment und Ontology Matching Methoden
2. Eigenschaften, Indexstrukturen und erfolgreiche Anwendung von RDF
Triple Stores
3. Semantische Suchmaschinen im Ü
Überblick
4. Viral Marketing: Ausnutzung von Netzwerkeffekten im Marketing
5.
5 Suchtechniken für Blogs und Folksonomies
6. Überblick und Anwendung von visuellen SPARQL Query Schnittstellen
und Abfragemethoden
7. Visualisierung und Navigation von RDF Grapen
8. Ein Vergleich von RDF Crawling mit Web Crawling Ansätzen mit
Überblick über existierende Open Source Lösungen
9. Ansätze zur Inhaltsextraktion auf Blog-Seiten
5
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
6. Exercise Topics Topics of the practical
S h iftli h th ti h A b it
Schriftlich theoretische Arbeiten excercise
Key Questions for the theoretical topics
What are the central question you want to address?
Wh t is th borderline t other topics?
What i the b d li to th t i ?
What properties are important and how do they
differentiate to other methods/tools/software?
What are the hard problems on the issue and what are
the problems already solved?
What are successful and unsuccessful practical
examples?
p
6
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
7. Excercise Topics Topics of the practical
P kti h technische Arbeiten
Praktische t h i h A b it excercise
Programm
JavaDoc2RDF: Extraktion von Wissen aus Programm-
Code.
Semantik Web Service Komposition
p
Sesame SAIL Layers für HBASE
Experiment zur automatischen Kontexterkennung
Erstellung von Ontologien basierend auf tags aus einer
Web 2.0 Anwendung
20
Erstellung eines semantischen Media-Wikis und
entsprechender Ontologie zur Unterstützung der
p g g
Vorlesung Wissenstechnolgien
Ontology-based DBPedia browser 7
(Größere Gruppe bevorzugt)
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
8. Excercise Topics
Praktische technische Arbeiten
Yahoo Answers: Corpus Mining, Goal Extraction and Goal
Mining
Graph Construction
Twitter: Corpus Mining and Goal Extraction, and Goal
p g ,
Graph Construction
Goal-Oriented Web Applications: Using a GOAL-REST API
8
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
9. Exercise Topics Topics of the practical
P ti l/t h i l i
Practical/technical exercise excercise
Ask your advisor if you have any problems/questions
Develop a requirements definition and software architecture.
Define the goal of your work?
Sketch your solution/approach
Think of how to measure your results
Narrow it down so that you think it is feasible
Implementation:
If possible use Java
Keep it simple!
Documentation using Google Docs and JavaDoc
9
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
10. Exercise Topics Topics of the practical
excercise
Tutor: Thomas Stoppacher
t.stoppacher at student.tugraz.at
10
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
12. The digital world (wide web) today Overview
Semantic Web
It’s size (R )
(Rep)
Information growth per year
(including print, film, optical etc.)
Wachstum
1000 999
900
800
700
600
xabytes
500
Ex
400
300
200
100
5
160
It s
It’s huge!
0
1998
1,6
2000 2002 2004 2006 2008 2010 2012 It grows
Jahr
fast! 12
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
13. Intelligent Web = Semantic Web + Social Web
Web 3 0 = Semantic Web + Web 2 0 ;)
3.0 2.0
• Semantic Wave Report.
(http://www.readwriteweb.com/archives/semantic_wave_2008_free_report.php)
(http://www readwriteweb com/archives/semantic wave 2008 free report php)
13
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
14. Search in the WWW Overview
An example Semantic Web
(R )
(Rep)
Image search for „Apache“
14
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
15. The Problem of Relationships Overview
Semantic Web
(Rep)
(R )
No Meaning of Realtionships
Who tried to shoot Mr. Burns in „Who shot Mr. Burns? Part 1“
(
(6. Season))
15
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
16. Definition „Semantic Web“ Overview
Semantic Web
(Rep)
(R )
The Semantic Web is an extension of the current Web in
which information is given well-defined meaning, better
enbaling computers and people to work in cooperations.
[Berners-Lee et al. 2001]
http://www.sciam.com/print_version.cfm?articleID=00048144-
10D2 1C70 84A9809EC588EF21
10D2-1C70-84A9809EC588EF21
16
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
17. The Vision as Application Scenario Overview
Semantic Web
(R )
(Rep)
Plan a trip via the internet using your personal agent
Agent searches automatically for
Suitable flight
Suitable hotels
Alternative routes
Also, the software agent tells you why it made this decision!
17
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
18. Foundations of the Semantic Web Overview
Semantic Web
(R )
(Rep)
Web of Data
Decentral Management of Information
Integration of heterogeneous information
Standardized exchange of information between systems
Not only the bits but also the meaning!
bits,
18
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
19. Foundations of the Semantic Web Overview
Semantic Web
From HTML…
(R )
(Rep)
19
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
20. Foundations of the Semantic Web Overview
Semantic Web
…to RDF (and further)
(R )
(Rep)
20
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
21. The Semantic Web Stack
How to Express Semantics
A small example
John Lennon
Is A
Is Member Band
The B tl
Th Beatles
Is Member
Paul McCartney Founded in
Is born in Query: all bands from England
Ist in
Liverpool England ?All bands with English artists?
Inferenz & Reasoning: 21
English i P h i
E li h artists := Person who is an artist and born in England
i db i E l d
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
22. The Semantic Web Stack
Semantic Web Stack
a.k.a. SW Layer Cake
y
a.k.a. SW Tower
22
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
23. The Semantic Web Stack
Semantic Web Stack – the original one
23
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
24. The Semantic Web Stack
Semantic Web Stack
Unicode
URI
24
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
25. The Semantic Web Stack
Uniform Ressource Identifier (URI)
The Who ?=? Who
Decentrality requires unique identification of resources, concepts
etc.
URI: Standard for Identification of Resources
RFC 3986 - Uniform Resource Identifier (URI)
Generalisation of URL‘s (e.g. http://) and URN‘s (e.g. ISBN)
Resources in the Semantic Web are identified via URI‘s
25
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
26. The Semantic Web Stack
Uniform Ressource Identifier (URI)
Examples
http://ftp.is.co.za/rfc/rfc1808.txt
mailto:NoOne.Nobody@example.com
y@ p
http://dbpedia.org/resource/Paul_McCartney
http://bio2rdf.org/protein:123790407
26
http://www.w3.org/Addressing/
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
27. The Semantic Web Stack
Unicode
Universal Character Set
International Industry Standard
y
Encoding Standard for text and URIs in the
(Semantic) Web
Combines different character set like (Arabian, Latin,
Japan, Cyrillic etc.)
http://www.unicode.org/
http://www.unicode.org/charts/
p // g/ /
27
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
28. The Semantic Web Stack
Semantic Web Stack
XML
XML Schema
Namespaces
28
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
29. The Semantic Web Stack
XML
XML structured storage and serialisation of data
Representation of the logical structure of documents
Tree-based Representation:
Tags (Opening & Closing) for structuring
Attributes for specifying properties
Att ib tes fo specif ing p ope ties of Tags
Entities as abbrevations (e.g. ")
Language independent acess via SAX (Simple API for
XML, event-based) and DOM (Document Object Model,
tree based)
Automatic determination of well formed XML
29
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
30. The Semantic Web Stack
XML
Example
<?xml version=quot;1.0quot; encoding=quot;UTF-8quot; ?>
<Person>
<name>Michael Granitzer </name>
<title>Dr.</title>
<lecture>
<name>Wissenstechnologien</name>
<number>702.111</number>
</lecture>
</Person>
<?xml version=quot;1.0quot; encoding=quot;UTF-8quot; ?
? l i quot;1 0quot; di quot;UTF 8quot; ?>
<Person name=´Michael Granitzer´ title=´Dr.´>
<lecture name=´Wissenstechnologien´ number=´702.111´/>
</Person>
http://www.w3.org/DOM/
http://www.saxproject.org/
Both are syntactically correct, which means well formed
But is the structure correct?
30
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
31. The Semantic Web Stack
XML Schema Languages
Define the structure of an XML Document
DTD (Document Type Definition)
XML Schema
Define
D fi
What tag are following which tags
Optional and required attributes
Data type of an attribute/element
XML Document is valid, if it meets the schema
31
http://www.w3.org/XML/Schema
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
32. The Semantic Web Stack
XML Schemasprachen - DTD
<?xml version=quot;1.0quot;?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
<!ELEMENT note (
! (to, f
from, h di
heading, b d )
body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
32
http://www.w3schools.com/schema/schema_howto.asp http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
33. The Semantic Web Stack
XML Schemasprachen - XML Schema
<?xml version=quot;1.0quot;?>
<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading>
<body>Don't forget me this weekend!</body> </note>
<?xml version=quot;1.0quot;?>
<xs:schema xmlns:xs=quot;http://www.w3.org/2001/XMLSchemaquot;>
<xs:element name=quot;notequot;>
l quot; quot;
<xs:complexType> <xs:sequence>
<xs:element name=quot;toquot; type=quot;xs:stringquot;/>
<xs:element name=quot;fromquot; type=quot;xs:stringquot;/>
s:e e e t a e o type s:st g /
<xs:element name=quot;headingquot; type=quot;xs:stringquot;/>
<xs:element name=quot;bodyquot; type=quot;xs:stringquot;/>
</xs:sequence> </xs:complexType>
</xs:element>
</xs:schema>
33
http://www.w3schools.com/schema/schema_howto.asp
htt // 3 h l / h / h h t
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
34. The Semantic Web Stack
Namespaces
Equal tag names in a different context
<note> <animal>
<to>Tove</to> <gender>M</gender>
<from>Jani</from>
<body>
<heading>Reminder</heading> <legs>4</legs>
…
<body>Don't forget </body>
me this weekend!</body> </animal>
</note>
/
Namespaces can be specified per element
<Element-Name xmlns[:prefix]=uri>
Valid within the element
http://www.w3.org/TR/REC-xml-names/ 34
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
35. The Semantic Web Stack
Namespaces
Example
<Buch xmlns = „http://exmple.com/“
xmlns:per =
„http://personschema.org/“>
„ p p g
<Title> My Book</Title>
<per:Autor name = „John Nobody“>
p y
<per:Title>Dr.</per:Title>
</Buch>
35
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
36. The Semantic Web Stack
Drawbacks of XML
36
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
37. The Semantic Web Stack
Drawbacks of XML
No semantic/meaning of tags
Tree-like structure makes it hard to combine decentral
stored information
<Person> <lecture>
<name> x</name> <name> x</name>
/
<lecture> <Person>
… …
</lecture> </Person>
/
</Person> </lecture>
37
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
38. The Semantic Web Stack
Semantic Web Stack
RDF
38
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
39. The Semantic Web Stack
RDF - Resource Description Framework
RDF is like my eccentric old uncle I don't know him as well
uncle. don t
as I'd like, which is partly his fault, since his eccentricities
can be off-putting. Of course they're what make him so
interesting and are the reason I want to get to know him
better in the first place.
[Kendall Grant Clark 2002]
http://www.xml.com/pub/a/2002/11/13/deviant.html
39
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
40. The Semantic Web Stack
Goal of RDF
Description of (Web) resource via metadata
Historically focused on web sites
E t d d t „general“ resources
Extended to l“
For
Classification of resources
Classification of relationships between resources
Unambigious description
40
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
41. The Semantic Web Stack
Application Examples Today
1.0: 2.0)
RSS 1 0: RDF Site Summary (not RSS 2 0)
Dublin Core Metadata Standard
Ad b XMP f embedding objects
Adobe for b ddi bj t
Simple Knowledge Organisation Scheme (SKOS)
DBPedia
….
41
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
42. The Semantic Web Stack
Classical Metadata
Classical Metadata are mostly key/value pairs:
Resource: http://www.know-center.at/xyz.ppt
Type: PowerPoint Presentation
yp
Author: Michael Granitzer
Topic: RDF
In XML (Example):
<presentation src='http://www.know-center.at/xyz.ppt'>
<author> Michael Granitzer</author>
<topic>RDF</topic>
</presentation>
42
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
43. The Semantic Web Stack
RDF Basics
Resources R
Resources are represented as URI
All things with an valid URI can be seen as resource
Literals L
Data values (e.g. String, Number etc.)
Language of a literal
Properties P
Connecting resources
Connecting resourcs with literals
Identified via URI‘s
URI s
Combined into statements
43
http://www.w3.org/TR/rdf-concepts/
p // g/ / p /
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
44. The Semantic Web Stack
RDF Statement (Triples)
Statement := <Subject Predicate Object>
<Subject, Predicate,
[Michael Granitzer, is author of, Presentation XYZ]
Michael Granitzer … Subject
is author of … Predicate
Presentation XYZ … Object
Michael Is author of
Presentati
Granitzer on XYZ
44
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
45. The Semantic Web Stack
RDF Statements (Triples)
A small example
http://en.wikipedia.org/wiki/John_Lennon
htt // iki di / iki/J h L http://dbpedia.org/property/associatedActs
http://dbpedia org/property/associatedActs
http://en.wikipedia.org/wiki/The_Beatles
http://en.wikipedia.org/wiki/Paul_McCartney
http://dbpedia.org/property/associatedActs
rdfs:label
„Paul McCartney“
Subject
j Predicate Object
j
http://en.wikipedia.org/wiki/J http://dbpedia.org/property/a http://en.wikipedia.org/wiki/T
ohn_Lennon ssociatedActs he_Beatles
http://en.wikipedia.org/wiki/P http://dbpedia.org/property/a http://en.wikipedia.org/wiki/T
aul_McCartney ssociatedActs he_Beatles
http://en.wikipedia.org/wiki/P Rdfs:label “Paul McCartney”
45
aul_McCartney
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
46. The Semantic Web Stack
RDF URI
How to make a URI unique?
,j
No technical enforcement, just recommendations from W3C
Specialised Vocabulary
Phone Numbers (e.g. tel://+43-316-873-9263)
http://www.rfc-editor.org/rfc/rfc3966.txt
http://www.rfc editor.org/rfc/rfc3966.txt
ISBN Numbers
Friend of a Friend
Creating your own URI‘s (Recommendation
Use a domain you control: http://www.know-center.at/
URI s
URI‘s may not exist
Be carefull with the semantic:
– „Shakespear“ is author of „http://de.wikipedia.org/wiki/Othello“
„ p „ p p g
– „Shakespear“ is author of „http://de.wikipedia.org/wiki/Othello#URI“
46
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
47. The Semantic Web Stack
RDF – Serialisation
RDF/XML
/ g
RDF/XML serialises RDF Modells using XML
Enclosing tags for RDF/XML : <rdf:RDF></rdf:RDF>
Everything between is the RDF data model
Statements describing resources are enclosed with
<rdf:Description></rdf:Description> tags
Reference to the resource via about=„URI“ attribut
about „URI
Properties of a resource as enclosing tag after rdf:Description
http://www.w3.org/TR/rdf-syntax-grammar/
http://www.w3.org/RDF/Validator/
47
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
48. The Semantic Web Stack
RDF – Serialisation
RDF/XML Example
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc http://purl.org/dc/elements/1.1/
xmlns:dc=quot;http://purl org/dc/elements/1 1/quot;
xmlns:ex=quot;http://example.org/terms/quot;>
<rdf:Description rdf:about=quot;http://www.example.org/index.htmlquot;>
<dc:creator rdf:resource=quot;http://www example org/staffid/85740quot; />
rdf:resource=quot;http://www.example.org/staffid/85740quot;
</rdf:Description>
<rdf:Description rdf:about=quot;http://www.example.org/staffid/85740quot;
ex:name=quot;John S i hquot; /
quot; h Smithquot; />
<rdf:Description rdf:about=quot;http://www.example.org/staffid/85740quot;
ex:age=quot;27quot; />
</rdf:RDF>
48
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
49. The Semantic Web Stack
RDF – Serialisation
RDF/XML-ABBREV
Abbrevations for some constructs in RDF/XML
e.g. more than one property for one resource within one
<rdf:Description></rdf:Description> tag
Shorter serialisation is inteded
May not be the case for every graph
Readability may not increase
Name RDF/XML-ABBREV comes from the Jena Semantic Web
Framework
http://www.w3.org/TR/rdf-syntax-grammar/
http://www.w3.org/TR/2004/REC-rdf-primer-20040210/
49
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
51. The Semantic Web Stack
RDF – Serialisation
RDF/XML Pros & Cons
++: Use Standardized serialisation format
~~: RDF requires namespaces: no „:“ in attribute names
<rdf:Description rdf:about=quot;http://www.example.org/index.htmlquot;>
<rdf:Description http://www.w3.org/1999/02/22-rdf-syntax-
ns#about=quot;http://www.example.org/index.htmlquot;>
--: No „-“ after a „:“ in tag names
<alter:-100>
--: Namespaces not usable in attributes
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:ex = „http://www.example.org/“>
l htt // l /“
<rdf:Description rdf:about=„ex:index.htmlquot;>
Different notations for equal URI‘s
Very complex and hard to read for humans
51
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
52. The Semantic Web Stack
RDF – Serialisation
N3 – Notation 3 N-Triples, Turtle
3, N-Triples
Berners Lee
Notation 3 1998 introduced by Tim Berners-Lee
Write RDF Graph as set of triples
– For each subject write all predicate object pairs separated by „;“
„;
– Last predicatge-object pair ends with „.“
– <URI> and # indicate comments
Contained also Path‘s and Rules
Simpler Version: N-Triples as subset of N3
Extended after 2004 Turtle
http://www.w3.org/DesignIssues/Notation3.html
http://www.w3.org/2001/sw/RDFCore/ntriples/
http://www.dajobe.org/2004/01/turtle/ 52
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
53. The Semantic Web Stack
RDF – Serialisation
N3 – Notation 3 N-Triples, Turtle
3, N-Triples
See
http://www.w3.org/Desi
gnIssues/Notation3.html 53
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
54. The Semantic Web Stack
RDF – Serialisation
N-Triples/Turtle Example
<http://www.example.org/index.html>
<http://purl.org/dc/elements/1.1/creator>
<http://www.example.org/staffid/85740> .
<http://www.example.org/staffid/85740>
<http://example.org/terms/name> quot;J h S ithquot; .
<htt // l /t / > quot;John Smithquot;
<http://www.example.org/staffid/85740>
<http://example.org/terms/age> quot;27quot; .
54
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
55. The Semantic Web Stack
RDF – Serialisation
Turtle Example - Extended
# Define some namespaces
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix ex: <http://example org/terms/> .
<http://example.org/terms/>
<http://www.example.org/index.html>
dc:creator <http://www.example.org/staffid/85740> .
# write all statements in short form
<http://www.example.org/staffid/85740>
ex:name quot;John Smithquot;;
ex:age quot;27quot; .
55
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
56. The Semantic Web Stack
RDF Extended Concepts
Blank Nodes/ n-ary Relationships
Example: „Pasta consists of 400g noodle & 100g sauce“
p „ g g
consists of amount
ex:Pasta ex:noodle
„400g“
consists of
amount
ex:sauce „100g“
ex:Wok
amount
„400g“
consists of
ex:Pasta ex:noodle
consists of
amount
ex:sauce
56
„100g“ http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
57. The Semantic Web Stack
RDF Extended Concepts
Blank Nodes/ n-ary Relationships
Insertion of a „structure“ Node
„
ex:noodle
ingredient
g
amount
„400g“
ex:MyNoodle
y
ingredient
consists of ex:sauce
ex:MySauce amount
ex:Pasta
consists of
„100g“
57
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
58. The Semantic Web Stack
RDF Extended Concepts
Blank Nodes/ n-ary Relationships
No URI‘s required for such nodes
q
ex:noodle
ingredient
g
amount
„400g“
ingredient
consists of ex:sauce
amount
ex:Pasta „100g“
consists of
Note: Semantics of Blank Nodes is not entirely clear (e.g. for 58
SPARQL)!
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
59. The Semantic Web Stack
RDF Extended Concepts
Container
Use Blank nodes to group different kinds of sets and lists
Container: open Lists
Can be extended by adding triples
– rdf:Seq…ordered List
– rdf:Bag…unordered List
– rdf:Alt… alternative Selection (one of the items in the list)
Collections: closed list
Cannot be extended by adding triples (of course by
changing triples)
Note: Neither container nor blank nodes increase the
expressiveness of RDF!
59
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
60. The Semantic Web Stack
RDF Extended Concepts
Reification
Making Statements over Statements
„The detective assumes that the butler murdered Mr. X“
ex:murdered Ex:Mr. X
ex:butler
ex:assumes
ex:Detective
60
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
61. The Semantic Web Stack
RDF Extended Concepts
Reification
„rdf:type
Representation using „rdf:type“ property and Blank Nodes
ex:butler rdf:subject
rdf:Statement
rdf:predicate Rdf:type
ex:murdered
d d
rdf:object ex:vermutet
ex:Mr. X
Ex:Detective
rdf:Statement defines the 61
Semantic On our way to RDFS and Ontologies
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
62. The Semantic Web Stack
Summary RDF
An abstract model for representing metadata
Standardisation for exchanging metadata
Semantic is still missing
Decentral manipulation of information
p
Different serialisation formats
Graphs can be combined easily from different sources (if
URI‘S are unique!)
G h f l
Graphs are a more powerful representation form than
t ti f th
tree‘s
62
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
63. Points you should take away from this
lecture
What is the Semantic Web Stack?
What are the restrictions of XML and XML-Schema
in representing semantics?
What is the basic idea and data model behind
RDF?
What is the difference between serialisation
formats for RDF?
What are Blank Nodes and Reification?
63
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
64. Outlook
Thursday, 16.10.08,
Next Lecture on Thursday 16 10 08 10:15
The Semantic Web Stack (rep.)
Semantics & Ontologies
RDF Schema (RDFS)
Web Ontology Language (OWL)
(Logics in OWL)
64
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
65. That‘s it for today…
Thanks for your attention
Questions/comments?
mgranitzer@tugraz.at
i @
65
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at
66. License
This work is licensed under the Creative Commons
Attribution 2.0 Austria License.
To view a copy of this license, visit
http://creativecommons org/licenses/by/2 0/at/
http://creativecommons.org/licenses/by/2.0/at/.
Contributors:
Mathias Lux
Peter Scheir
Klaus Tochtermann
Michael Granitzer
66
http://kmi.tugraz.at
WS 08/09 Wissenstechnologie @ kmi.tugraz.at