wissenstechnologie ii 08 09.voll

66
Wissenstechnologie WS 08/09 Michael Granitzer IWM TU Graz & Know-Center IWM TU Graz & Know Center http://kmi tugraz at http://www know center at http://kmi.tugraz.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/ .

Upload: mgrani

Post on 10-May-2015

682 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Wissenstechnologie Ii 08 09.Voll

Wissenstechnologie WS 08/09

Michael Granitzer

IWM TU Graz & Know-CenterIWM TU Graz & Know Center

http://kmi tugraz at http://www know center athttp://kmi.tugraz.at http://www.know-center.atThis 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/.

Page 2: Wissenstechnologie Ii 08 09.Voll

TodayToday

Topics of the practical excercise

Overview Semantic Web (Rep)

The Semantic Web StackU i d URI

2

• Unicode, URI• XML, XML Schema, Namespaces• Resource Description Framework

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 3: Wissenstechnologie Ii 08 09.Voll

Organization – Practical Excercise

Practical/technical or theoretical working out of particular topics in groups fof 2-4

Announced also on the bloghttp://kmi.tugraz.at/blogs/wissenstechnologie/ubungsthemen/

Passwort: wt08

Details: http://kmi.tugraz.at/blogs/wissenstechnologie/prufungsmodus/

Practical/technical Exerciseact ca /tec ca e c se

– Documentation (10%) – Implementation (45%) – Presentation 8.01. or 11.12. (45%)Presentation 8.01. or 11.12. (45%)

Theoretical Excercise

– Literature Gathering (Bibsonomy) (10%).

3

– Written Summary (3500 words per group member) (45%) – Presentation 8.01. or 11.12. (45%)

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 4: Wissenstechnologie Ii 08 09.Voll

Organization – Scheduling

Milestone Theoretical Technical How?Milestone TheoreticalExercise

Technical Exercise

How?

Next Week Topic presentation In the lecture/ on (8.10.08) the blog

22.10.08 Topic selection and group announcement

via E-Mail to me

24.11.08 Gathering of relevant Literature finished

RequirementsDefinition finished

Bibsonomy/ Google Docs

11 12 08 & O l t ti O l t ti 11.12.08 & 08.01.09

Oral presentation of results & feedback from my side

Oral presentation of results & feedback from my side

429.01.09 Delivery of final

resultsDelivery of final results

Via Google Docs

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 5: Wissenstechnologie Ii 08 09.Voll

Excercise TopicsS h iftli h th ti h A b it

Topics of the practicalexcerciseSchriftlich theoretische Arbeiten

1. Überblick über Ontology Alignment und Ontology Matching Methoden

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 Suchtechniken für Blogs und Folksonomies5. 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

5

Überblick über existierende Open Source Lösungen

9. Ansätze zur Inhaltsextraktion auf Blog-Seiten

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 6: Wissenstechnologie Ii 08 09.Voll

Exercise TopicsS h iftli h th ti h A b it

Topics of the practicalexcerciseSchriftlich theoretische Arbeiten

Key Questions for the theoretical topics

excercise

Key Questions for the theoretical topics

What are the central question you want to address?

Wh t i th b d li t th t i ? What is the borderline to other topics?

What properties are important and how do they differentiate to other methods/tools/software?differentiate to other methods/tools/software?

What are the hard problems on the issue and what are the problems already solved?the problems already solved?

What are successful and unsuccessful practical examples?

6

p

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 7: Wissenstechnologie Ii 08 09.Voll

Excercise TopicsP kti h t h i h A b it

Topics of the practicalexcercisePraktische technische Arbeiten

JavaDoc2RDF: Extraktion von Wissen aus Programm-

excercise

JavaDoc2RDF: Extraktion von Wissen aus ProgrammCode.

Semantik Web Service Kompositionp

Sesame SAIL Layers für HBASE

Experiment zur automatischen KontexterkennungExperiment zur automatischen Kontexterkennung

Erstellung von Ontologien basierend auf tags aus einer Web 2 0 Anwendung Web 2.0 Anwendung

Erstellung eines semantischen Media-Wikis und entsprechender Ontologie zur Unterstützung der

7

p g gVorlesung Wissenstechnolgien

Ontology-based DBPedia browser

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

(Größere Gruppe bevorzugt)

Page 8: Wissenstechnologie Ii 08 09.Voll

Excercise TopicsPraktische technische ArbeitenPraktische technische Arbeiten

Yahoo Answers: Corpus Mining Goal Extraction and Goal Yahoo Answers: Corpus Mining, Goal Extraction and Goal Graph Construction

Twitter: Corpus Mining and Goal Extraction, and Goal p g ,Graph Construction

Goal-Oriented Web Applications: Using a GOAL-REST API

8

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 9: Wissenstechnologie Ii 08 09.Voll

Exercise TopicsP ti l/t h i l i

Topics of the practicalexcercisePractical/technical exercise

Ask your advisor if you have any problems/questions

excercise

Ask your advisor if you have any problems/questions

Develop a requirements definition and software architecture.

Define the goal of your work?Define the goal of your work?

Sketch your solution/approach

Think of how to measure your resultsThink of how to measure your results

Narrow it down so that you think it is feasible

Implementation: Implementation:

If possible use Java

Keep it simple!

9

Keep it simple!

Documentation using Google Docs and JavaDoc

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 10: Wissenstechnologie Ii 08 09.Voll

Exercise Topics Topics of the practicalexcerciseExercise Topics

Tutor: Thomas Stoppacher

excercise

Tutor: Thomas Stoppacher t.stoppacher at student.tugraz.at

10

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 11: Wissenstechnologie Ii 08 09.Voll

Questions

11

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 12: Wissenstechnologie Ii 08 09.Voll

The digital world (wide web) today OverviewSemantic Web (R )It’s size

Information growth per year

(Rep)

Information growth per year(including print, film, optical etc.)

Wachstum

999

800

900

1000

500

600

700

800

xaby

tes

160100

200

300

400Ex

It’s huge!12

1,6 50

100

1998 2000 2002 2004 2006 2008 2010 2012

Jahr

It s huge!It grows

fast!WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 13: Wissenstechnologie Ii 08 09.Voll

Intelligent Web = Semantic Web + Social WebWeb 3 0 = Semantic Web + Web 2 0 ;)Web 3.0 Semantic Web + Web 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

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 14: Wissenstechnologie Ii 08 09.Voll

Search in the WWWAn example

OverviewSemantic Web (R )An example (Rep)

Image search for „Apache“

14

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 15: Wissenstechnologie Ii 08 09.Voll

The Problem of Relationships OverviewSemantic Web (R )

No Meaning of Realtionships

(Rep)

No Meaning of Realtionships

Who tried to shoot Mr. Burns in „Who shot Mr. Burns? Part 1“ (6. Season)( )

15

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 16: Wissenstechnologie Ii 08 09.Voll

Definition „Semantic Web“ OverviewSemantic Web (R )

The Semantic Web is an extension of the current Web in

(Rep)

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-84A9809EC588EF2110D2 1C70 84A9809EC588EF21

16

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 17: Wissenstechnologie Ii 08 09.Voll

The Vision as Application Scenario OverviewSemantic Web (R )

Plan a trip via the internet using your personal agent

(Rep)

Plan a trip via the internet using your personal agent

Agent searches automatically for

Suitable flightSuitable flight

Suitable hotels

Alternative routesAlternative routes

Also, the software agent tells you why it made this decision!

17

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 18: Wissenstechnologie Ii 08 09.Voll

Foundations of the Semantic Web OverviewSemantic Web (R )

Web of Data

(Rep)

Web of Data

Decentral Management of Information

Integration of heterogeneous informationIntegration of heterogeneous information

Standardized exchange of information between systems

Not only the bits but also the meaning!Not only the bits, but also the meaning!

18

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 19: Wissenstechnologie Ii 08 09.Voll

Foundations of the Semantic Web OverviewSemantic Web (R )From HTML… (Rep)

19

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 20: Wissenstechnologie Ii 08 09.Voll

Foundations of the Semantic Web OverviewSemantic Web (R )…to RDF (and further) (Rep)

20

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 21: Wissenstechnologie Ii 08 09.Voll

How to Express Semantics

The Semantic Web Stack

A small example

John Lennon

Th B tlBandIs Member Is A

The Beatles

Is MemberPaul McCartney

Query: all bands from EnglandIs born in

Founded in

Liverpool England

Query: all bands from England

?All bands with English artists?

Is born in

Ist in

21

Liverpool England ?All bands with English artists?

Inferenz & Reasoning: E li h i P h i i d b i E l d

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

English artists := Person who is an artist and born in England

Page 22: Wissenstechnologie Ii 08 09.Voll

Semantic Web Stack

The Semantic Web Stack

a.k.a. SW Layer Cakey

a.k.a. SW Tower

22

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 23: Wissenstechnologie Ii 08 09.Voll

Semantic Web Stack – the original one

The Semantic Web Stack

23

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 24: Wissenstechnologie Ii 08 09.Voll

Semantic Web Stack

The Semantic Web Stack

Unicode

URI

24

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 25: Wissenstechnologie Ii 08 09.Voll

Uniform Ressource Identifier (URI)

The Semantic Web Stack

Uniform Ressource Identifier (URI)

The Who ?=? Who

Decentrality requires unique identification of resources, conceptsetc.

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

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 26: Wissenstechnologie Ii 08 09.Voll

Uniform Ressource Identifier (URI)

The Semantic Web Stack

Examples

http://ftp.is.co.za/rfc/rfc1808.txt

mailto:[email protected]@ p

http://dbpedia.org/resource/Paul_McCartney

http://bio2rdf.org/protein:123790407

26

http://bio2rdf.org/protein:123790407

http://www.w3.org/Addressing/

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

http://www.w3.org/Addressing/

Page 27: Wissenstechnologie Ii 08 09.Voll

Unicode

The Semantic Web Stack

Universal Character Set

International Industry Standardy

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/

27

p // g/ /

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 28: Wissenstechnologie Ii 08 09.Voll

Semantic Web Stack

The Semantic Web Stack

XML

XML Schema

Namespaces

28

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 29: Wissenstechnologie Ii 08 09.Voll

XML

The Semantic Web Stack

XML structured storage and serialisation of dataXML structured storage and serialisation of data

Representation of the logical structure of documents

Tree-based Representation:Tree-based Representation:

Tags (Opening & Closing) for structuring

Att ib tes fo specif ing p ope ties of TagsAttributes for specifying properties of Tags

Entities as abbrevations (e.g. ")

Language independent acess via SAX (Simple API forXML, event-based) and DOM (Document Object Model, tree based)

29Automatic determination of well formed XML

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 30: Wissenstechnologie Ii 08 09.Voll

XMLExample

The Semantic Web Stack

Example

<?xml version="1.0" encoding="UTF-8" ?><Person>

<name>Michael Granitzer </name><title>Dr.</title><lecture>

<name>Wissenstechnologien</name><name>Wissenstechnologien</name><number>702.111</number>

</lecture></Person>

? l i "1 0" di "UTF 8" ?<?xml version="1.0" encoding="UTF-8" ?><Person name=´Michael Granitzer´ title=´Dr.´>

<lecture name=´Wissenstechnologien´ number=´702.111´/></Person>

http://www.w3.org/DOM/

http://www.saxproject.org/

30Both are syntactically correct, which means well formed

But is the structure correct?

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 31: Wissenstechnologie Ii 08 09.Voll

XML Schema Languages

The Semantic Web Stack

Define the structure of an XML Document

DTD (Document Type Definition) DTD (Document Type Definition)

XML Schema

D fiDefine

What tag are following which tags

Optional and required attributes

Data type of an attribute/element

31XML Document is valid, if it meets the schema

http://www.w3.org/XML/Schema

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

http://www.w3.org/XML/Schema

Page 32: Wissenstechnologie Ii 08 09.Voll

XML Schemasprachen - DTD

The Semantic Web Stack

<?xml version="1.0"?>

<note>

<to>Tove</to><to>Tove</to>

<from>Jani</from>

<heading>Reminder</heading>

<body>Don't forget me this weekend!</body><body>Don't forget me this weekend!</body>

</note>

! ( f h di b d )<!ELEMENT note (to, from, heading, body)>

<!ELEMENT to (#PCDATA)>

<!ELEMENT from (#PCDATA)>

32

<!ELEMENT heading (#PCDATA)>

<!ELEMENT body (#PCDATA)>

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

http://www.w3schools.com/schema/schema_howto.asp

Page 33: Wissenstechnologie Ii 08 09.Voll

XML Schemasprachen - XML Schema

The Semantic Web Stack

XML Schemasprachen XML Schema

<?xml version="1.0"?>

<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading>

<body>Don't forget me this weekend!</body> </note>

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

l " "<xs:element name="note">

<xs:complexType> <xs:sequence>

<xs:element name="to" type="xs:string"/>

<xs:element name="from" type="xs:string"/> s:e e e t a e o type s:st g /

<xs:element name="heading" type="xs:string"/>

<xs:element name="body" type="xs:string"/>

</xs:sequence> </xs:complexType>

33

</xs:element>

</xs:schema>

htt // 3 h l / h / h h t

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

http://www.w3schools.com/schema/schema_howto.asp

Page 34: Wissenstechnologie Ii 08 09.Voll

Namespaces

The Semantic Web Stack

Equal tag names in a different context<note> <animal>

<to>Tove</to>

<from>Jani</from>

<heading>Reminder</heading>

<gender>M</gender>

<body><legs>4</legs>

<body>Don't forget

me this weekend!</body>

</note>

…</body>

</animal>/

Namespaces can be specified per element<Element-Name xmlns[:prefix]=uri>

34Valid within the element

http://www.w3.org/TR/REC-xml-names/

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 35: Wissenstechnologie Ii 08 09.Voll

NamespacesExample

The Semantic Web Stack

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

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 36: Wissenstechnologie Ii 08 09.Voll

Drawbacks of XML

The Semantic Web Stack

36

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 37: Wissenstechnologie Ii 08 09.Voll

Drawbacks of XML

The Semantic Web Stack

No semantic/meaning of tags No semantic/meaning of tags

Tree-like structure makes it hard to combine decentralstored information

<Person>

<name> x</name>

<lecture>

/<name> x</name>

<lecture>

…</lecture>

<name> x</name>

<Person>

…/

37

</lecture>

</Person>

</Person>

</lecture>

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 38: Wissenstechnologie Ii 08 09.Voll

Semantic Web Stack

The Semantic Web Stack

RDF

38

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 39: Wissenstechnologie Ii 08 09.Voll

RDF - Resource Description Framework

The Semantic Web Stack

RDF Resource Description Framework

RDF is like my eccentric old uncle I don't know him as well RDF is like my eccentric old uncle. I don t know him as well as I'd like, which is partly his fault, since his eccentricitiescan be off-putting. Of course they're what make him so interesting and are the reason I want to get to know himinteresting and are the reason I want to get to know himbetter in the first place.

[Kendall Grant Clark 2002][Kendall Grant Clark 2002]http://www.xml.com/pub/a/2002/11/13/deviant.html

39

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 40: Wissenstechnologie Ii 08 09.Voll

Goal of RDF

The Semantic Web Stack

Description of (Web) resource via metadataDescription of (Web) resource via metadata

Historically focused on web sites

E t d d t l“ Extended to „general“ resources

For

Classification of resources

Classification of relationships between resources

Unambigious description

40

Unambigious description

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 41: Wissenstechnologie Ii 08 09.Voll

Application Examples Today

The Semantic Web Stack

RSS 1 0: RDF Site Summary (not RSS 2 0)RSS 1.0: RDF Site Summary (not RSS 2.0)

Dublin Core Metadata Standard

Ad b XMP f b ddi bj tAdobe XMP for embedding objects

Simple Knowledge Organisation Scheme (SKOS)

DBPedia

….

41

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 42: Wissenstechnologie Ii 08 09.Voll

Classical Metadata

The Semantic Web Stack

Classical Metadata are mostly key/value pairs: Classical Metadata are mostly key/value pairs:

Resource: http://www.know-center.at/xyz.ppt

Type: PowerPoint Presentationyp

Author: Michael Granitzer

Topic: RDF

In XML (Example):

<presentation src='http://www.know-center.at/xyz.ppt'><author> Michael Granitzer</author><topic>RDF</topic>

42</presentation>

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 43: Wissenstechnologie Ii 08 09.Voll

RDF Basics

The Semantic Web Stack

Resources RResources 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

43

Identified via URI s

Combined into statements

http://www.w3.org/TR/rdf-concepts/

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

p // g/ / p /

Page 44: Wissenstechnologie Ii 08 09.Voll

RDF Statement (Triples)

The Semantic Web Stack

Statement := <Subject Predicate Object>Statement := <Subject, Predicate, Object>

[Michael Granitzer, is author of, Presentation XYZ]

Michael Granitzer … Subject

is author of … Predicate

Presentation XYZ … Object

Michael PresentatiIs author of

44

Granitzer on XYZ

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 45: Wissenstechnologie Ii 08 09.Voll

RDF Statements (Triples)

The Semantic Web Stack

A small example

htt // iki di / iki/J h L http://dbpedia org/property/associatedActshttp://en.wikipedia.org/wiki/John_Lennon

http://en.wikipedia.org/wiki/The_Beatles

http://dbpedia.org/property/associatedActs

http://en.wikipedia.org/wiki/Paul_McCartney

rdfs:label

http://dbpedia.org/property/associatedActs

Subject Predicate Object

„Paul McCartney“

j j

http://en.wikipedia.org/wiki/John_Lennon

http://dbpedia.org/property/associatedActs

http://en.wikipedia.org/wiki/The_Beatles

45http://en.wikipedia.org/wiki/Paul_McCartney

http://dbpedia.org/property/associatedActs

http://en.wikipedia.org/wiki/The_Beatles

http://en.wikipedia.org/wiki/P Rdfs:label “Paul McCartney”

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

aul_McCartney

Page 46: Wissenstechnologie Ii 08 09.Voll

RDF URIHow to make a URI unique?

The Semantic Web Stack

How to make a URI unique?

No technical enforcement, just recommendations from W3C, j

Specialised Vocabulary

Phone Numbers (e.g. tel://+43-316-873-9263)http://www.rfc-editor.org/rfc/rfc3966.txthttp://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 may not existURI s may not exist

Be carefull with the semantic:

– „Shakespear“ is author of „http://de.wikipedia.org/wiki/Othello“

46

„ p „ p p g– „Shakespear“ is author of „http://de.wikipedia.org/wiki/Othello#URI“

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 47: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationRDF/XML

The Semantic Web Stack

RDF/XML

RDF/XML serialises RDF Modells using XML/ g

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“ attributReference to the resource via about „URI attribut

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

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 48: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationRDF/XML Example

The Semantic Web Stack

RDF/XML Example

<?xml version="1.0"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:dc="http://purl org/dc/elements/1 1/"xmlns:dc http://purl.org/dc/elements/1.1/

xmlns:ex="http://example.org/terms/">

<rdf:Description rdf:about="http://www.example.org/index.html">

<dc:creator rdf:resource="http://www example org/staffid/85740" /><dc:creator rdf:resource="http://www.example.org/staffid/85740" />

</rdf:Description>

<rdf:Description rdf:about="http://www.example.org/staffid/85740"

" h S i h" /ex:name="John Smith" />

<rdf:Description rdf:about="http://www.example.org/staffid/85740"

ex:age="27" />

48

</rdf:RDF>

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 49: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationRDF/XML-ABBREV

The Semantic Web Stack

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<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 FrameworkFramework

http://www.w3.org/TR/rdf-syntax-grammar/

http://www.w3.org/TR/2004/REC-rdf-primer-20040210/

49

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 50: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationRDF/XML-ABBREV Example

The Semantic Web Stack

RDF/XML-ABBREV Example

<?xml version="1.0"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:dc="http://purl org/dc/elements/1 1/"xmlns:dc http://purl.org/dc/elements/1.1/

xmlns:ex="http://example.org/terms/">

<rdf:Description rdf:about="http://www.example.org/index.html">

<dc:creator><dc:creator>

<rdf:Description rdf:about="http://www.example.org/staffid/85740"

ex:name="John Smith"

"27" /ex:age="27" />

</dc:creator>

</rdf:Description>

50

</rdf:RDF>

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 51: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationRDF/XML Pros & Cons

The Semantic Web Stack

RDF/XML Pros & Cons

++: Use Standardized serialisation format

~~: RDF requires namespaces: no „:“ in attribute names

<rdf:Description rdf:about="http://www.example.org/index.html">

<rdf:Description http://www.w3.org/1999/02/22-rdf-syntax-ns#about="http://www.example.org/index.html">

--: No „-“ after a „:“ in tag names

<alter:-100>

--: Namespaces not usable in attributes<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

l htt // l /“xmlns:ex = „http://www.example.org/“>

<rdf:Description rdf:about=„ex:index.html">

Different notations for equal URI‘s

51

Different notations for equal URI‘s

Very complex and hard to read for humans

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 52: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationN3 – Notation 3 N-Triples Turtle

The Semantic Web Stack

N3 – Notation 3, N-Triples, Turtle

Notation 3 1998 introduced by Tim Berners-LeeNotation 3 1998 introduced by Tim Berners Lee

Write RDF Graph as set of triples

– For each subject write all predicate object pairs separated by „;“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

52http://www.w3.org/2001/sw/RDFCore/ntriples/

http://www.dajobe.org/2004/01/turtle/

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 53: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationN3 – Notation 3 N-Triples Turtle

The Semantic Web Stack

N3 – Notation 3, N-Triples, Turtle

53See

http://www.w3.org/DesignIssues/Notation3.html

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 54: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationN-Triples/Turtle Example

The Semantic Web Stack

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> <htt // l /t / > "J h S ith"<http://example.org/terms/name> "John Smith" .

<http://www.example.org/staffid/85740> <http://example.org/terms/age> "27" .

54

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 55: Wissenstechnologie Ii 08 09.Voll

RDF – SerialisationTurtle Example - Extended

The Semantic Web Stack

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/>@prefix ex: <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 "John Smith";

ex:age "27" .

55

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 56: Wissenstechnologie Ii 08 09.Voll

RDF Extended ConceptsBlank Nodes/ n-ary Relationships

The Semantic Web Stack

Blank Nodes/ n-ary Relationships

Example: „Pasta consists of 400g noodle & 100g sauce“p „ g g

ex:Pasta ex:noodleconsists of

„400g“

amount

ex:sauce

consists of

„100g“amount

ex:Wok

„400g“amount

ex:Pasta ex:noodleconsists of

56ex:sauce

consists of

amount

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

„100g“

Page 57: Wissenstechnologie Ii 08 09.Voll

RDF Extended ConceptsBlank Nodes/ n-ary Relationships

The Semantic Web Stack

Blank Nodes/ n-ary Relationships

Insertion of a „structure“ Node„

ex:noodleingredient

„400g“amount

ex:MyNoodle

g

ex:sauce

y

ingredientconsists of

ex:Pastaamountex:MySauce

consists of

57„100g“

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 58: Wissenstechnologie Ii 08 09.Voll

RDF Extended ConceptsBlank Nodes/ n-ary Relationships

The Semantic Web Stack

Blank Nodes/ n-ary Relationships

No URI‘s required for such nodesq

ex:noodleingredient

„400g“amount

g

ex:sauceingredient

consists of

ex:Pasta „100g“amount

consists of

58Note: Semantics of Blank Nodes is not entirely clear (e.g. forSPARQL)!

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

SPARQL)!

Page 59: Wissenstechnologie Ii 08 09.Voll

RDF Extended ConceptsContainer

The Semantic Web Stack

Container

Use Blank nodes to group different kinds of sets and listsUse Blank nodes to group different kinds of sets and lists

Container: open ListsCan be extended by adding triples

– rdf:Seq…ordered List– rdf:Bag…unordered List– rdf:Alt… alternative Selection (one of the items in the list)rdf:Alt… alternative Selection (one of the items in the list)

Collections: closed listCannot be extended by adding triples (of course byCannot be extended by adding triples (of course bychanging triples)

59Note: Neither container nor blank nodes increase theexpressiveness of RDF!

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 60: Wissenstechnologie Ii 08 09.Voll

RDF Extended ConceptsReification

The Semantic Web Stack

Reification

Making Statements over StatementsMaking Statements over Statements

„The detective assumes that the butler murdered Mr. X“

ex:butlerEx:Mr. Xex:murdered

ex:assumes

60

ex:Detective

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 61: Wissenstechnologie Ii 08 09.Voll

RDF Extended ConceptsReification

The Semantic Web Stack

Reification

Representation using „rdf:type“ property and Blank NodesRepresentation using „rdf:type property and Blank Nodes

ex:butler rdf:subjectrdf:Statement

d drdf:predicate Rdf:type

ex:murdered

ex:vermutetrdf:object

61rdf:Statement defines theSemantic On our way to RDFS and Ontologies

Ex:Detectiveex:Mr. X

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Semantic On our way to RDFS and Ontologies

Page 62: Wissenstechnologie Ii 08 09.Voll

Summary RDF

The Semantic Web Stack

An abstract model for representing metadataAn abstract model for representing metadata

Standardisation for exchanging metadata

Semantic is still missingSemantic is still missing

Decentral manipulation of informationp

Different serialisation formats

Graphs can be combined easily from different sources (ifURI‘S are unique!)

G h f l t ti f th

62

Graphs are a more powerful representation form than tree‘s

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 63: Wissenstechnologie Ii 08 09.Voll

Points you should take away from thislecturelecture

What is the Semantic Web Stack?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 behindRDF?

What is the difference between serialisationformats for RDF?

What are Blank Nodes and Reification?What are Blank Nodes and Reification?

63

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 64: Wissenstechnologie Ii 08 09.Voll

Outlook

Next Lecture on Thursday 16 10 08 10:15Next Lecture on Thursday, 16.10.08, 10:15

The Semantic Web Stack (rep.)The Semantic Web Stack (rep.)

Semantics & Ontologies

RDF Schema (RDFS)

Web Ontology Language (OWL)

64(Logics in OWL)

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 65: Wissenstechnologie Ii 08 09.Voll

That‘s it for today…

Thanks for your attention

Questions/comments?

i @[email protected]

65

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at

Page 66: Wissenstechnologie Ii 08 09.Voll

License

This work is licensed under the Creative Commons 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

66Michael Granitzer

WS 08/09

http://kmi.tugraz.at

Wissenstechnologie @ kmi.tugraz.at