linked data tutorial

151
Bernhard Haslhofer, Linked Data Tutorial Linked Data Tutorial @ Vlaams Theater Instituut Brussels, 03/2009 [email protected] Friday, March 6, 2009

Upload: bernhard-haslhofer

Post on 08-May-2015

15.215 views

Category:

Technology


0 download

DESCRIPTION

A tutorial on linked data starting from the basics using real world example taken from DBPedia

TRANSCRIPT

Page 1: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Linked Data Tutorial

@ Vlaams Theater Instituut

Brussels, 03/2009

[email protected]

Friday, March 6, 2009

Page 2: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Contents

• Motivation for Linked Open Data (LOD)

• Base Technologies

• The Linked Data Principles

• Publishing Solutions and Tools

• Vocabularies & Interoperability Issues

• Demos + Discussion

2

Friday, March 6, 2009

Page 3: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 3

How do we look up information about things?

Friday, March 6, 2009

Page 4: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 4

... about this book?

Friday, March 6, 2009

Page 5: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 5

... about this play?

Friday, March 6, 2009

Page 6: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 6

... about these concepts?

Friday, March 6, 2009

Page 7: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 7

... about things?

...that book? ...this play? ...these concepts?

we look up their names

and see what we can find out

Metamorphosis Effi Briest Love / Hate

Friday, March 6, 2009

Page 8: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 8

An Example

Friday, March 6, 2009

Page 9: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 9

The Hallstatt culture

Friday, March 6, 2009

Page 10: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

formerly

Controlled Vocabulary

10

Friday, March 6, 2009

Page 11: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

formerly

Metadata

Identifier

11

Friday, March 6, 2009

Page 12: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

then

Controlled Vocabulary

Metadata

Identifier

12

Friday, March 6, 2009

Page 13: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

now

13

Friday, March 6, 2009

Page 14: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

If information is not available on the Web, people tend to ignore it.

14

Friday, March 6, 2009

Page 15: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Current Situation

15

Database

Web Server

JDBC HTML

Web

Friday, March 6, 2009

Page 16: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The current Web is a Web of Documents intended for human interpretation.

16

Friday, March 6, 2009

Page 17: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The data are still locked in closed silos.

17

Database

Database

Database

Database Database

Database

Friday, March 6, 2009

Page 18: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Other applications can not access and process these data unless...

18

Friday, March 6, 2009

Page 19: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Existing Approaches

19

OAI-PMH

Web ServicesSOAP

WSDL

UDDI

REST

Atom

RMI CORBA

RPC

DCOM

OAI-ORE

Z39.50

RSS

JSON

SRU/SRQ

FTPCD-ROM

CD-ROM

Friday, March 6, 2009

Page 20: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The linked data vision is to...

20

Friday, March 6, 2009

Page 21: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Database

Documents

Data

Friday, March 6, 2009

Page 22: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

• open the data silos and get rid of repository-centric mindset

• publish data of public interest on the Web

• in a way that other applications can access and interpret the data

• using common Web technologies

22

Friday, March 6, 2009

Page 23: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

make it possible for applications to look up (meta)data ...

23

Friday, March 6, 2009

Page 25: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

To do so, we need some technology

25

Friday, March 6, 2009

Page 26: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

• Names (Identifiers) for resources in an open environment

• dereferencable URI = HTTP URI (URL)

26

Uniform Resource Identifier (URI)

http://dbpedia.org/resource/Hallstatt_culture

Friday, March 6, 2009

Page 27: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

• a model for representing metadata on the Web

• in the form of statements (triples)

27

Resource Description Framework (RDF)

http://dbpedia.org/resource/Hallstatt_culture

“The Hallstatt culture was ...”

“Hallstatt culture”skos:subject

dbpprop: abstract

rdfs: label

http://dbpedia.org/resource/

Category:Iron_Age_Europe

Friday, March 6, 2009

Page 28: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

• for exchanging RDF data

• serialization & de-serialization

28

RDF/XML, N3, Turtle, etc.

<rdf:Description rdf:about=” http://dbpedia.org/resource/Hallstatt_culture”>

<dbpprop:abstract>The Hallstatt culture was...</dbpprop:abstract>

<skos:subject rdf:resource=”http://dbpedia.org/resource/

Category:Iron_Age_Europe”>

<rdfs:label>Hallstatt culture</rdfs:label>

</rdf:Description>

Friday, March 6, 2009

Page 29: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

• languages for describing vocabularies

29

RDFS & OWL

rdf: type

dbpprop: abstract skos: subject rdfs: label

rdf: typerdf: type

rdf: Property

Friday, March 6, 2009

Page 30: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

• a language for describing controlled vocabularies

30

Simple Knowledge Organization System (SKOS)

dbpedia:Category: Iron_Age_Europe

“Iron Age Europe”

skos:prefLabel

xyz: HallstattCultureskos:narrower

“Hallstatt Period” “Hallstatt Culture”

skos:prefLabel

xyz: LateneCulture

skos:altLabel“La Tène Period”

skos:prefLabel

skos:narrower

Friday, March 6, 2009

Page 31: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

• a query language & protocol for accessing RDF data via the Web

31

SPARQL

SELECT ?uri

WHERE {

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe>.

}

Friday, March 6, 2009

Page 32: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The vision is becoming reality...

32

Friday, March 6, 2009

Page 33: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial 33

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

<http://dbpedia.org/resource/Hallstatt_culture >

p:abstract “Die Hallstattzeit bezeichnet...” @de

p:abstract “The Hallstatt culture was...” @en

rdfs:label “Hallstatt culture”@en;

rdfs:label “Hallstattzeit” @de;

rdfs:label “Civilisation de Hallstatt” @fr;

rdfs:label “ハルシュタット文明” @jp;

skos:subject dbpedia:Category:Iron_Age_Europe;

...

Friday, March 6, 2009

Page 35: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Library of Congress Subject Headings

35

Friday, March 6, 2009

Page 36: Linked Data Tutorial

Friday, March 6, 2009

Page 37: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The LOD idea in brief

• expose data on the Web, not just documents

• interlink these data with those of other data sources

37

Friday, March 6, 2009

Page 38: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

LOD benefits

• other humans and applications can

• easily access your data using Web technologies

• follow the links in order to obtain further contextual information

• links to your data and search engine indices can increase the visibility of your data

38

Friday, March 6, 2009

Page 39: Linked Data Tutorial

“Stop hugging your data”

Sir Tim Berners-Lee, 2009

(c) Paul Miller, http://www.slideshare.net/cloudofdata/toward-the-data-cloud

Friday, March 6, 2009

Page 40: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Contents

• Motivation for Linked Open Data (LOD)

• Base Technologies

• The Linked Data Principles

• Publishing Solutions and Tools

• Vocabularies & Interoperability Issues

• Demos + Discussion

40

Friday, March 6, 2009

Page 41: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The Semantic Web Layer Cake

41

URI Unicode

XML

Data Interchange: RDF

RDF-S

Rules:

RIF

Ontology:

OWLQuery:

SPARQL

Unifying Logic

Proof

Crypto

Trust

User Interface & Applications

Vocabulary:

SKOS

Friday, March 6, 2009

Page 42: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

From a Database point of view

42

Database Domain Semantic Web

Relational Model(Tables)

URI, RDF

SQL DDL(Create Table table-name ...)

RDFS, OWL

SQL Query Language(Select * from ...)

SPARQL

Friday, March 6, 2009

Page 43: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Uniform Resource Identifiers (URI)

• Unambiguous name for “something”

• for a digital resource

• for a concept within a vocabulary

• etc..

• “A URI is a compact sequence of characters that identifies an abstract or physical resource”[RFC 3986]

43

http://dbpedia.org/resource/Hallstatt_culture

http://dbpedia.org/resource/Hallstatt

Friday, March 6, 2009

Page 44: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Uniform Resource Identifiers (URI)

• “Uniform”:

• different types of resource identifiers in the same context

• common syntactic conventions

• “Resource”:

• whatever might be identified by a URI

• “Identifier”:

• distinguish one resource from other ones

44

Friday, March 6, 2009

Page 45: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Uniform Resource Identifiers (URI)

• An URI can be classified as locator (URL), name (URN), or both

• Uniform Resource Locator (URL)

• a means for locating the resource by describing its primary access mechanism (e.g., http://example.com)

• Uniform Resource Name (URN)

• a means for naming the resource (e.g., urn:example.com:animal)

45

Friday, March 6, 2009

Page 46: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Uniform Resource Identifiers (URI)

• Generic syntax - a hierarchical sequence of components

46

foo://example.com:8042/over/there?name=ferret#nose \_/ \________________/\_________/ \_________/ \__/ | | | | | scheme authority path query fragment | ______________________|_ / \ / \ urn:example:animal:ferret:nose

URI = scheme “:” hier-path [ “?” query ] [ “#” fragment ]

Friday, March 6, 2009

Page 47: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Uniform Resource Identifiers (URI)

• Example URIs:

47

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

http://www.ietf.org/rfc/rfc2396.txt

ldap://[2001:db8::7]/c=GB?objectClass?one

mailto:[email protected]

news:comp.infosystems.www.servers.unix

tel:+1-816-555-1212

urn:oasis:names:specification:docbook:dtd:xml:4.1.2

Friday, March 6, 2009

Page 48: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Internationalized Resource Identifiers (IRI)

• can we use non-ASCII characters in URIs (e.g., Umlaut, Chinese, Arabic, Hebrew, etc...)?

• extend the syntax of URI so that a much wider repertoire of characters can be used

• uses Universal Character Set (ISO 10646)

• mapping from IRIs to URIs

• IRIs can be used wherever URIs are allowed

48

Friday, March 6, 2009

Page 49: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The Semantic Web Layer Cake

49

URI Unicode

XML

Data Interchange: RDF

RDF-S

Rules:

RIF

Ontology:

OWLQuery:

SPARQL

Unifying Logic

Proof

Crypto

Trust

User Interface & Applications

Vocabulary:

SKOS

Friday, March 6, 2009

Page 50: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• The basic structural element of RDF is the statement

50

http://dbpedia.org/resource/Hallstatt_culture “Hallstatt culture”

skos:subject

rdfs: label

http://dbpedia.org/resource/Category:Iron_Age_Europe

Subject Predicate Object

Subject Property Value

Friday, March 6, 2009

Page 51: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• The subject of a statement is always a (URI) resource

• The predicate of a statement is always a (URI) resource

• The object of a statement can be a resource (URI) or a typed literal

• An RDF statement forms a triple

• Triples can be merged into a set of triples, forming a directed labeled graph

51

Friday, March 6, 2009

Page 52: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• Literals can be plain or typed using arbitrary datatypes

• It is recommended to use XML Schema datatypes [XMLS2]

52

http://dbpedia.org/resource/Hallstatt “Hallstatt”

geo:long

rdfs: label

“13.646667”^^<http://www.w3.org/2001/XMLSchema#float>

Friday, March 6, 2009

Page 53: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• Support for multilingual labels

• Plain literals may have a language tag, as defined by RFC 3066

53

http://dbpedia.org/resource/Hallstatt “Hallstatt”@de

rdfs:label

rdfs: label

“ハルシュタット (オーバーエスターライヒ州)”@jp

“Гальштат”@ru

rdfs: label

Friday, March 6, 2009

Page 54: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• Blank nodes can be used to model structured information that needs no URI by itself

• they must still be distinguishable within an RDF graph. This is done using blank node identifiers

54

http://www.ex.com/

staff#85740

"Bedford"

http://www.ex.com/#city

http://www.ex.com/#address

"1501 Grant

Avenue""Massachusetts"

"01730"http://www.ex.com/#street http://www.ex.com/#state

http://www.ex.com/#zipcode

Friday, March 6, 2009

Page 55: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• Containers allow to describe groups of things

• Bag (unordered set), Seq (ordered set), Alt (choice)

55

http://www.ex.com/

courses#6.001

http://www.ex.com/students#students

http://www.w3.org/1999/02/22-rdf-

syntax-ns#Bag

http://www.ex.com/students#Amy

http://www.ex.com/

students#Mohamed

http://www.ex.com/students#Johann

http://www.ex.com/students#Maria

http://www.w3.org/1999/02/22-rdf-syntax-ns#type

http://www.w3.org/1999/02/22-rdf-syntax-ns#_1

http://www.w3.org/1999/02/22-rdf-syntax-ns#_2

http://www.w3.org/1999/02/22-rdf-syntax-ns#_3

http://www.w3.org/1999/02/22-rdf-syntax-ns#_4

blank node

Friday, March 6, 2009

Page 56: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• Collections allow the definition of closed containers

• define the exact set of items in a collection

56

http://www.ex.com/

courses#6.001

http://www.ex.com/students#students

http://www.ex.com/students#Amy

http://www.ex.com/

students#Mohamed

http://www.ex.com/students#Johann

http://www.w3.org/1999/02/22-rdf-

syntax-ns#nil

http://www.w3.org/1999/02/22-rdf-syntax-ns#first

http://www.w3.org/1999/02/22-rdf-syntax-ns#rest

http://www.w3.org/1999/02/22-rdf-syntax-ns#first

http://www.w3.org/1999/02/22-rdf-syntax-ns#rest

http://www.w3.org/1999/02/22-rdf-syntax-ns#first

http://www.w3.org/1999/02/22-rdf-syntax-ns#rest

Friday, March 6, 2009

Page 57: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• RDF can be serialized using various syntax formats:

57

<?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#” xmlns:dbpprop=”http://dbpedia.org/property/” .... >

<rdf:Description rdf:about=” http://dbpedia.org/resource/Hallstatt_culture”>

<dbpprop:abstract>The Hallstatt culture was...</dbpprop:abstract>

<skos:subject rdf:resource=” http://dbpedia.org/resource/

Category:Iron_Age_Europe”>

<rdfs:label>Hallstatt culture</rdfs:label>

</rdf:Description>RDF/XML

Friday, March 6, 2009

Page 58: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• RDF can be serialized using various syntax formats:

58

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

@prefix rdfs: <http://dbpedia.org/about/html/http://www.w3.org/2000/01/rdf-schema#>

@prefix dbpprop: <http://dbpedia.org/property/>

<http://dbpedia.org/resource/Hallstatt_culture>

dbpprop:abstract “The Hallstatt culture was...” ;

skos:subject < http://dbpedia.org/resource/Category:Iron_Age_Europe > ;

rdfs:label “Hallstatt culture” . Turtle / N3

Friday, March 6, 2009

Page 59: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Resource Description Framework (RDF)

• Reification

• allows to describe other statements; i.e. make statements about other statements

• rarely used in practice

59

Friday, March 6, 2009

Page 60: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The Semantic Web Layer Cake

60

URI Unicode

XML

Data Interchange: RDF

RDF-S

Rules:

RIF

Ontology:

OWLQuery:

SPARQL

Unifying Logic

Proof

Crypto

Trust

User Interface & Applications

Vocabulary:

SKOS

Friday, March 6, 2009

Page 61: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

RDF Schema (RDFS)

• extends RDF with the possibility to define classes and associated properties

• allows RDF applications to agree on a common data description vocabulary

• is implemented on top of RDF - each valid RDFS document is a valid RDF document

61

Friday, March 6, 2009

Page 62: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

RDF Schema (RDFS)

• classes and subclass relationships

62

rdfs: Class

rdfs: subClassOf

yago: CitiesAndTownsInUpperAustria

http://dbpedia.org/resource/Hallstatt

rdf:type

rdf:type

yago: City

rdf:type

Friday, March 6, 2009

Page 63: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

RDF Schema (RDFS)

• properties and subPropertyOf relationships

63

rdf: Property

rdfs: subPropertyOfdbProp: abstractdcterms: description

rdf:type rdf:type

Note: in reality, dbpedia: abstract is no subject of dcterms; description

Friday, March 6, 2009

Page 64: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

RDF Schema (RDFS)

• domain and range relationships

64

xyz: Article

xsd: string

dbProp: abstract

rdfs: domain

rdfs: range

rdfs: Class

rdf: type

Friday, March 6, 2009

Page 65: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

RDF Schema (RDFS)

• comments: rdfs: comment

• human-readable names for resources: rdfs: label

• machine-readable information: rdfs: seeAlso, rdfs: isDefinedBy

65

Friday, March 6, 2009

Page 66: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

RDF Schema (RDFS)

• Shortcomings:

• no cardinality constraints on properties

• no inverse / transitive / symmetric properties

• no union / disjoint / enumeration classes

66

Friday, March 6, 2009

Page 67: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The Semantic Web Layer Cake

67

URI Unicode

XML

Data Interchange: RDF

RDF-S

Rules:

RIF

Ontology:

OWLQuery:

SPARQL

Unifying Logic

Proof

Crypto

Trust

User Interface & Applications

Vocabulary:

SKOS

Friday, March 6, 2009

Page 68: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• An extension of RDFS

• logic based; provides automated reasoning support

• Three “sub-languages”

• OWL Full: maximum expressiveness and syntactic freedom

• OWL DL: restricted to first order logic; decidable

• OWL Lite: easy to implement; provides mechanisms for creating classification hierarchies with simple constraints

68

Friday, March 6, 2009

Page 69: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• owl:Class defines a group of individuals that belong together because of shared properties

• owl:Thing is the class of all individuals, and a superclass of all OWL classes

69

dbpedia-owl: Place http://dbpedia.org/resource/Hallstatt

rdf:type

rdf:type

owl: Class

rdfs: Class

owl: Thing

rdfs: subClassOf

rdfs: subClassOf

Friday, March 6, 2009

Page 70: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• DatatypeProperty: properties whose value is a literal

• ObjectProperty: properties whose value is an individual

70

rdf:type

dbPedia-owl: id

dbPedia-owl: region

dbPedia-owl: WorldHeritageSite

xsd: string

dbpedia-owl: PopulatedPlace

owl: DatatypeProperty

owl: ObjectProperty

rdf: Property

rdf:type

rdfs: subClassOf

rdfs: range

rdfs: range

rdfs: domain

rdfs: domainrdfs: subClassOf

Friday, March 6, 2009

Page 71: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• owl: equivalentClass states that two classes are equivalent, i.e., they have the same instances

71

dbpedia: Car dbpedia: Automobileowl: equivalentClass

Note: DBpedia actually uses dbpedia: redirect

Friday, March 6, 2009

Page 72: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• owl: equivalentProperty states that two properties are equivalent; they relate one individual to the same set of other individuals

72

myOnt: abstract dbpprop: abstractowl: equivalentProperty

Friday, March 6, 2009

Page 73: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• owl:sameAs states that two individuals are the same

73

fbase: Hallstatt cultureowl: sameAshttp://dbpedia.org/resource/

Hallstatt_culture

Friday, March 6, 2009

Page 74: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• owl: inverseOf (e.g., hasChild inverseOf hasParent)

• owl: transitiveProperty (e.g., hasAncestor)

• owl: symmetricProperty (e.g., knows)

• owl: functionalProperty (e.g. hasPrimaryEmployer)

• owl: inverseFunctionalProperty (e.g., hasSocialSecurityNumber)

74

Friday, March 6, 2009

Page 75: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• owl: allValuesFrom restricts properties to values of classes

• owl: minCardinality restricts a property’s minimum cardinality with respect to a class

• owl: maxCardinalty restricts a property’s maximum cardinality with respect to a class

• owl: cardinality = shortcut for min/maxCardinality

75

Friday, March 6, 2009

Page 76: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Web Ontology Language (OWL)

• owl: intersectionOf (e.g., EmployedPerson = Person ∩ CorporateResources)

• owl: unionOf (e.g., NorthAmericanCitizen = USCitizen ∪ CanadaCitizen)

• owl: complementOf (e.g., JuniorResearcher = Researcher - SeniorResearcher)

• owl: disjointWith (e.g., Woman ∩ Man = ∅)

76

Friday, March 6, 2009

Page 77: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The Semantic Web Layer Cake

77

URI Unicode

XML

Data Interchange: RDF

RDF-S

Rules:

RIF

Ontology:

OWLQuery:

SPARQL

Unifying Logic

Proof

Crypto

Trust

User Interface & Applications

Vocabulary:

SKOS

Friday, March 6, 2009

Page 78: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• a family of formal languages for the definition and representation of controlled vocabularies on the Web

• thesauri

• classification schemes

• taxonomies

• subject-heading systems

• an application of RDF/S & OWL

78

Friday, March 6, 2009

Page 79: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• vocabulary terms are represented as concepts identified by URIs

79

dbpedia: Category: Iron_Age_Europe

skos: Concept

rdf: type

xyz: HallstattCulture

rdf: type

Friday, March 6, 2009

Page 80: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• concepts have preferred, alternate & hidden labels

• label is either preferred or alternate or hidden; one per language

80

xyz: HallstattCulture

“Hallstatt Period@en”

“Hallstatt Kultur@de”skos:prefLabel

skos: prefLabel

“Hallstatt Culture@en”

skos:altLabel

Friday, March 6, 2009

Page 81: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• concepts can be organized in hierarchies by (the inverse) skos: broader or skos: narrower relationships

81

dbpedia: Category: Iron_Age_Europe

xyz: HallstattCultureskos: narrower

dbpedia: Category: Iron_Age dbpedia: Category: Prehistoric_Europe

skos: broader skos: broader

Note: in DBPedia this narrower rel. does not exist

Friday, March 6, 2009

Page 82: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• concepts can be associated by non-hierarchical (non-transitive) skos:related properties

82

xyz: HallstattCulture xyz: HallstattCivilizationskos: related

Friday, March 6, 2009

Page 83: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• concepts can have notes for general documentation purposes

• scopeNote: an indication how the use of a concept is limited in indexing practice

• definition: an explanation of the intended meaning

• example: supplies an example of the use of a concept

• historyNote: describes significant changes to the meaning of a concept

83

Friday, March 6, 2009

Page 84: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• concepts can be defined as part of well-defined concept schemes (thesauri, classification schemes)

84

xyz: HallstattCulture xyz: HallstattCivilization

skos: inScheme

ex: archeologyThesaurus

skos: inScheme

“Archeology Thesaurus”

“John Doe”

dc:title

dc:creator

Friday, March 6, 2009

Page 85: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Simple Knowledge Organization System (SKOS)

• Other features

• SKOS allows the mapping between different concept schemes

• concepts can be organized in collections

• relationships between concept labels

• definition of broaderTransitive and narrowerTransitive relationships

• ....

85

Friday, March 6, 2009

Page 86: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The Semantic Web Layer Cake

86

URI Unicode

XML

Data Interchange: RDF

RDF-S

Rules:

RIF

Ontology:

OWLQuery:

SPARQL

Unifying Logic

Proof

Crypto

Trust

User Interface & Applications

Vocabulary:

SKOS

Friday, March 6, 2009

Page 87: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• is a query language that allows to access RDF data

• currently read-only; no update or delete

• based on matching graph patterns

• is a protocol that defines how queries and results can be transported over a network (over the Web)

87

Friday, March 6, 2009

Page 88: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• a simple query example

88

SELECT ?uri

WHERE {

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe>.

}

uri...

dbpedia: Hallstatt_culture

...

Friday, March 6, 2009

Page 89: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• querying multiple variables

89

SELECT ?uri ?abstract

WHERE {

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe>.

?uri dbpprop:abstract ?abstract .

}

uri abstract...

dbpedia: Hallstatt_culture The Hallstatt culture was the...

dbpedia: Hallstatt_culture Гальшта́тская культу́ра ...

Friday, March 6, 2009

Page 90: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• querying and filtering literal values

90

SELECT ?uri ?label

WHERE {

?uri rdfs:label ?label .

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe> .

FILTER regex(?label, “culture”, “i”)

}uri label

dbpedia: Basarabi_culture Basarabi Culture

... ...

dbpedia: Hallstatt_culture Hallstatt Culture

Friday, March 6, 2009

Page 91: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• optional graph patterns

91

SELECT ?uri ?label ?image

WHERE {

?uri rdfs:label ?label .

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe> .

OPTIONAL { ?uri foaf:img ?image }.

}

Friday, March 6, 2009

Page 92: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• optional graph patterns with constraints

92

SELECT ?uri ?label ?image

WHERE {

?uri rdfs:label ?label .

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe> .

OPTIONAL {

?uri foaf:img ?image .

FILTER regex(?image, “jpg”, “i”) .

} .

}

Friday, March 6, 2009

Page 93: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• matching alternatives

93

SELECT ?uri ?classification

WHERE {

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe> .

{ ?uri rdf:type ?classification . }

UNION

{ ?uri skos:subject ?classification . }

}

Friday, March 6, 2009

Page 94: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• solution modifiers

94

SELECT ?uri ?name

WHERE {

?uri skos:subject <http://dbpedia.org/resource/Category:Iron_Age_Europe> .

?uri rdfs:label ?name

}

ORDER BY ?name

LIMIT 10

OFFSET 5

Friday, March 6, 2009

Page 95: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SPARQL

• Other SPARQL features:

• rich set of FILTER expressions (see xquery functions)

• CONSTRUCT, DESCRIBE, ASK queries

• Named Graphs

95

Friday, March 6, 2009

Page 96: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The Semantic Web Layer Cake

96

URI Unicode

XML

Data Interchange: RDF

RDF-S

Rules:

RIF

Ontology:

OWLQuery:

SPARQL

Unifying Logic

Proof

Crypto

Trust

User Interface & Applications

Vocabulary:

SKOS

Friday, March 6, 2009

Page 97: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

References

• General

• T. Berners-Lee, J. Hendler, O. Lassila: The Semantic Web. Scientific American, May 2001.

• URI

• T. Berners-Lee, R. Fielding, L. Masinter: Uniform Resource Identifier (URI): Generic Syntax (RFC 3986), January 2005.

• M. Duerst, M. Suignard: Internationalized Resource Identifiers (IRIs) (RFC 3987), January 2005.

• RDF/S

• F. Manola, E. Miller: RDF Primer. W3C Recommendation, February 2004.

• D. Brickley, R.V. Guha: RDF Vocabulary Description Language 1.0: RDF Schema. W3C Recommendation, February 2004.

97

Friday, March 6, 2009

Page 98: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

References• OWL

• Deborah L. McGuiness, Frank van Harmelen (eds.): OWL Web Ontology Language Overview. W3C Recommendation 10 February 2004. Available at http://www.w3.org/TR/owl-features/

• Nataly F. Noy, Deborah L. McGuinness: Ontology Development 101: A Guide to Creating Your First Ontology. Available at http://www-ksl.stanford.edu/people/dlm/papers/ontology-tutorial-noy-mcguinness.pdf

• SKOS

• SKOS Primer: http://www.w3.org/TR/2008/WD-skos-primer-20080829/

• SPARQL

• Eric Prud’hommeaux, Andy Seaborne (eds.): SPARQL Query Language for RDF. W3C Candidate Recommendation 14 June 2007, available at http://www.w3.org/TR/rdf-sparql-query

98

Friday, March 6, 2009

Page 99: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Contents

• Motivation for Linked Open Data (LOD)

• Base Technologies

• The Linked Data Principles

• Publishing Solutions and Tools

• Vocabularies & Interoperability Issues

• Demos + Discussion

99

Friday, March 6, 2009

Page 100: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

The 4 principles

• Use URIs as names for things

• Use HTTP URIs so that people can look up those names

• When someone looks up a URI, provide useful information

• Include links to other other URIs, so that they can discover more things

100

Friday, March 6, 2009

Page 102: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Provide useful information ... for humans

102

Friday, March 6, 2009

Page 103: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Provide useful information ... for machines

103

<http://dbpedia.org/resource/Hallstatt_culture >

p:abstract “Die Hallstattzeit bezeichnet...” @de

p:abstract “The Hallstatt culture was...” @en

rdfs:label “Hallstatt culture”@en;

rdfs:label “Hallstattzeit” @de;

rdfs:label “Civilisation de Hallstatt” @fr;

rdfs:label “ハルシュタット文明” @jp;

skos:subject dbpedia:Category:Iron_Age_Europe;

...

Friday, March 6, 2009

Page 104: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Provide useful information for humans and machines

104

• return different HTTP responses depending on HTTP-Accept-Header

Friday, March 6, 2009

Page 105: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Provide useful information for humans and machines

105

• best practice: also assign names (URIs) to various representations

http://dbpedia.org/resource/Hallstatt_culture

http://dbpedia.org/data/Hallstatt_culture.rdf

http://dbpedia.org/page/Hallstatt_culture

Accept: text/htmlAccept: application/rdf+xml

Friday, March 6, 2009

Page 107: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Include links

• other common properties

• rdfs: seeAlso

• foaf: knows

• foaf: based_near

• foaf: topic_interest

107

Friday, March 6, 2009

Page 108: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Include links

• manual link generation

• only for small data sets

• automatic link generation

• pattern-based algorithms (e.g., same ISBN number)

• more complex property-based algorithms

• see record-linkage problem in database domain

108

Friday, March 6, 2009

Page 109: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Benefit

• Clients can easily look up names and retrieve information and follow the links

109

Friday, March 6, 2009

Page 110: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

References

• Berners-Lee 2006: Linked Data. Available at http://www.w3.org/DesignIssues/LinkedData.html

• Bizer et al.: How to Publish Linked Data on the Web. Available at: http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/

110

Friday, March 6, 2009

Page 111: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Contents

• Motivation for Linked Open Data (LOD)

• Base Technologies

• The Linked Data Principles

• Publishing Solutions and Tools

• Vocabularies & Interoperability Issues

• Demos + Discussion

111

Friday, March 6, 2009

Page 112: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Relational Databases

112

Triplify D2R Server Virtuoso RDF Views

Technology

SPARQL Endpoint

Mapping Language

Mapping Generation

Scalability

Scripting languages (PHP) Java Middleware Solution

- Yes Yes

SQL RDF based RDF based

Manual Semi-automatic Manual

Medium-high(but no SPARQL) medium high

(c) Sören Auer, http://www.slideshare.net/soeren1611/linked-data-tutorial-presentation-955375

Friday, March 6, 2009

Page 113: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Triplify

• Goal: expose semantics available in RDBMS as simple as possible

• Available for most popular Web app languages

• PHP (ready), Ruby/Python (under dev.)

• Works with most popular Web app databases

• MySQL, PHP-PDO DBs (SQLite, Oracle, DB2, MS SQL, PostgreSQL)

113

Friday, March 6, 2009

Page 114: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Triplify

• Configuration

• number of SQL queries selecting information, which should be made publicly available

114

SELECT id, name AS ‘foaf:name’ FROM users

Friday, March 6, 2009

Page 115: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Triplify

115

!""#$%&'()'*()+,-).&'*)/0&12(3')4.#"'5)6%'*)&)3728(0)#/)9:-).&;(03"<)

!"#$%%&'()*+,-.*(/)%0/1#'123%#(-0%455567

SELECT id, post_author AS 'sioc:has_creator->user', post_title AS 'dc:title', post_content AS 'sioc:content', post_date AS 'dcterms:modified^^xsd:dateTime‘, post_modified AS 'dcterms:created^^xsd:dateTime'

FROM posts WHERE post_status='publish‘ (AND id=xxx)

SELECT post_id id, tag_label AS 'tag:taggedWithTag‘ FROM post2tag INNER JOIN tag ON(post2tag.tag_id=tag.tag_id) (WHERE id=xxx)

SELECT post_id id, category_id AS 'belongsToCategory->category‘ FROM post2cat (WHERE id=xxx)

Friday, March 6, 2009

Page 116: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

D2R Server

• a tool for publishing the data from relational databases on the Web

116

Friday, March 6, 2009

Page 117: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

D2R Server

117

map:Conference a d2rq:ClassMap;

d2rq:dataStorage map:Database1.

d2rq:class :Conference;

d2rq:uriPattern "http://conferences.org/comp/confno@@Conferences.ConfID@@";

.

map:eventTitle a d2rq:PropertyBridge;

d2rq:belongsToClassMap map:Conference;

d2rq:property :eventTitle;

d2rq:column "Conferences.Name";

d2rq:datatype xsd:string;

.

• D2RQ mapping excerpt

Friday, March 6, 2009

Page 118: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

D2R Server

• supports auto-generation of mapping files

• extracted from database structure

• good starting point

• requires adaption for domain-specific vocabulary

• supports dumping databases to RDF files

118

Friday, March 6, 2009

Page 119: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Virtuoso RDF Views

• transforms the result of SQL SELECT statements into RDF

• mapping steps

• define RDFS class IRIs for each table

• define construction of subject IRIs from primary key column values

• define construction of predicate IRIs from each non-key column

119

Friday, March 6, 2009

Page 120: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

OAI2LOD Server

• publishes metadata from arbitrary OAI-PMH endpoints as linked data on the Web

• provides a simple linking framework

120

Friday, March 6, 2009

Page 121: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

OAI2LOD Server

• Sample harvesting configuration:

121

<> a oai2lod:Server;

rdfs:label "Example OAI2LOD Server";

oai2lod:port 2020;

oai2lod:baseURI <http://localhost:2020/>;

oai2lod:publishes <oai1>;

oai2lod:linkedWith <link1>;

.

<oai1> a oai2lod:OAIServer;

oai2lod:serverURL <http://oai-bdb.onb.ac.at/Script/oai2.aspx>;

oai2lod:metadataPrefix "oai_dc";

oai2lod:styleSheet "xsl/oai_dc2rdf_xml.xsl";

oai2lod:maxRecords 50;

.

Friday, March 6, 2009

Page 122: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

OAI2LOD Server

• Sample linking configuration:

122

<link1> a oai2lod:LinkedSPARQLEndpoint;

oai2lod:sparqlService <http://DBpedia.org/sparql>;

oai2lod:maxResults 5000;

oai2lod:linkingRule <lrule1>;

.

<lrule1> a oai2lod:LinkingRule;

oai2lod:sourceType <http://www.mediaspaces.info/vocab/oai-pmh.rdf#Item>;

oai2lod:sourceProperty <http://purl.org/dc/elements/1.1/subject>;

oai2lod:targetType <http://dbpedia.org/class/yago/Capital108518505>;

oai2lod:targetProperty <http://www.w3.org/2000/01/rdf-schema#label>;

oai2lod:linkingProperty <http://www.w3.org/2000/01/rdf-schema#seeAlso>;

oai2lod:similarityMetrics "uk.ac.shef.wit.simmetrics.similaritymetrics.Levenshtein";

oai2lod:minSimilarity 1.0;

.

Friday, March 6, 2009

Page 123: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SILK - Link Discovery Framework

• Supports data publishers in linking their data sets with other

• Provides a declarative Link Specification Language

• specify which links to be discovered

• specify conditions data items must fulfill in order to be linked

• implemented in Python

123

Friday, March 6, 2009

Page 124: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

SILK - Link Discovery Framework

124

<Interlink id="countries">

<LinkType>owl:sameAs</LinkType>

<SourceDataset dataSource="dbpedia" var="a">

<RestrictTo> ?a rdf:type dbpedia:Country </RestrictTo>

</SourceDataset>

<TargetDataset dataSource="factbook" var="b"/>

...

<LinkCondition>

<AVG>

<Compare id="jaroSimilarity" weight="2">

<Param name="string1" path="?a/rdfs:label" />

<Param name="string2" path="?b/rdfs:label" />

</Compare>

<Compare id="numSimilarity">

<Param name="num1" path="?a/dbpedia:population" />

<Param name="num2" path="?b/fb:totalPopulation" />

<Param name="factor" value="2" />

</Compare>

</AVG>

</LinkCondition>

<Thresholds accept="0.9" verify="0.7" />

<Limit max="1" method="metric_value" />

<Output acceptedLinks="accepted_links.n3" verifyLinks="verify_links.n3" mode="truncate" format="n3"/>

</Interlink>

Friday, March 6, 2009

Page 125: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

References

• A Survey of current approaches for mapping of relational databases to RDF: http://esw.w3.org/topic/Rdb2RdfXG/StateOfTheArt

• Triplify: http://triplify.org/Overview

• D2R Server: http://www4.wiwiss.fu-berlin.de/bizer/d2r-server/

• OpenLink Virtuoso: http://virtuoso.openlinksw.com/Whitepapers/html/rdf_views/virtuoso_rdf_views_example.html

• OAI2LOD Server: http://www.mediaspaces.info/tools/oai2lod

• SILK: http://www4.wiwiss.fu-berlin.de/bizer/silk/

125

Friday, March 6, 2009

Page 126: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Contents

• Motivation for Linked Open Data (LOD)

• Base Technologies

• The Linked Data Principles

• Publishing Solutions and Tools

• Vocabularies & Interoperability Issues

• Demos + Discussion

126

Friday, March 6, 2009

Page 127: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• LOD is about publishing data on the Web

• vocabularies define the terms that describe the semantics of these data (e.g., creator, title, abstract, etc.)

• we can apply the LOD principles and expose vocabularies on the Web

127

Friday, March 6, 2009

Page 128: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Use URIs as names for vocabularies and terms

• Use HTTP URIs so that people (and machines) can look up those names

• When someone looks up a URI, provide useful information

• Include links (mappings) to other vocabularies

128

Friday, March 6, 2009

Page 129: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Example: Dublin Core terms

129

Friday, March 6, 2009

Page 130: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Example: Dublin Core terms

130

Friday, March 6, 2009

Page 131: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Example: Friend of a Friend (FOAF)

131

Friday, March 6, 2009

Page 132: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Example: Friend of a Friend (FOAF)

132

Friday, March 6, 2009

Page 133: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Publishing vocabularies on the Web recipe

133

Friday, March 6, 2009

Page 134: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Publishing vocabularies on the Web recipe

• Step 1: create a complete RDF/XML serialization of the vocabulary (e.g., example.rdf)

• Step 2: copy the serialization into Web Server directory

• Step3: add a .htaccess directive to the Web Server directory

134

Friday, March 6, 2009

Page 135: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• Publishing vocabularies on the Web recipe

135

Friday, March 6, 2009

Page 136: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

• LOD and the Semantic Web provide the technologies to expose data on the Web

• exposing data in RDF and describing vocabularies in RDF/S or OWL provides data interoperability on a technical / structural level

• semantic interoperability is not given by default

136

Friday, March 6, 2009

Page 137: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

rule-of-thumb to establish semantic interoperability

1. whenever possible, use terms from widely used vocabularies that are published on the Web in a structured, machine-readable format (RDFS or OWL)

2. if there is no such term that reflects the required semantics, re-use a semantically broader term by establishing e.g. a rdfs:subProperty relationship, refine its semantics for the purpose of your application within a new namespace, and publish it on the Web

3. if (1) and (2) are not feasible, create your own vocabulary and publish it on the Web in order to make it accessible for other users and applications; consider to define mappings to other vocabularies

137

Friday, March 6, 2009

Page 138: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

138

Name Purpose Base Concepts/Properties

Dublin Core(http://purl.org/dc/terms)

General / Documents RDFS 22 / 55

Friend of a Friend (FOAF)(http://xmlns.com/foaf/0.1/)

Contacts / Communication OWL 12 / 54

VCard Ontology(http://www.w3.org/2006/vcard/ns#)

Contacts / Communication OWL 5 / 54

Description of a Project (DOAP)(http://usefulinc.com/ns/doap# ) Projects RDFS 7 / 30

Friday, March 6, 2009

Page 139: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

139

Name Purpose Base Concepts/Properties

Semantically Interlinked Online Communities (SIOC)

(http://rdfs.org/sioc/ns#)

Contacts / Communication OWL 11 / 53

Nepomuk Message Ontology (NMO)(http://www.semanticdesktop.org/ontologies/

2007/03/22/nmo# )

Contacts / Communication RDFS 7 / 23

GeoNames Ontology(http://www.geonames.org/ontology#) Locations OWL 7 / 18

Music Ontology(http://purl.org/ontology/mo/ ) Multimedia OWL 53 / 131

Friday, March 6, 2009

Page 140: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Vocabularies & Interoperability Issues

140

!"#$%&

'$(")(*%*+,*")

!"#$#%&'()*#

-$.*)*,*")&

/+)01+0$2

!"#$%#&%'()%*

+#$,-#,)

.)/,/*01+2*34+2*

54+*!67)8#9

4)"#%#"#*4)"#:

4)"#*4;%)<

.)/,/*40=9

>?("&#6"*4)"#%#"#*

4;%)<

.)/,/*@A4B*

>?("&#6"*4;%)<9

+#$,-#,)*

4#CC'$,

!"#$%&304$$5$), !$,+6!"#$%&304$$5$),

4)"#%#"#*=&#8)D;&E

.)/,/*4FGH:IJ2*4GK!2*0>B!9

!"#$%#&%'()%*

4)"#%#"#*!67)8#

.)/,/*@A2*KGB2*

40@!9

>CC<'6#"';$*F&;L'<)

.)/,/*@A*A;<<)6"';$*F&;L'<)9

MN?&'%*4)"#%#"#*

!N(")8

.)/,/*4FGH:O2

KP:>$N"'8)9

!+#$#!(,*-*,*B$("#$6)*

K&#$(L;&8#"';$

!.#$#!(,*-*,*#

7(8$5$2

4)"#%#"#*

A&;((D#<E2*

!67)8#*4#CC'$,

H<;?#<*A;$6)C"-#<*4;%)<

.)/,/*AB@0A:AQ42*=QRQ9

P#<-)*G$6;%'$,*!67)8#

.)/,/*B!0:S;&8(2*Q=A:!C)6'L'6#"';$(9

A;$"&;<<)%*P;6#?-<#&N

.)/,/*+A!M2*@AA2*4)!M9

>-"7;&'"N*Q)6;&%

.)/,/*+0A*>-"7;&'"')(2*@)-"(67)*F)&(;$)$$;&8%#")'*

.FS@99

Friday, March 6, 2009

Page 141: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

References

• Miles et al.: Best Practices Recipes for Publishing RDF Vocabularies, Available at: http://www.w3.org/TR/swbp-vocab-pub/

• Heery and Patel 2004: Application profiles: mixing and matching metadata schemes. Available at: http://www.ariadne.ac.uk/issue25/app-profiles/

• Haslhofer and Klas 2009: A Survey of approaches for achieving metadata interoperability. To be published in ACM Computing Surveys Q4/2009. Available on request.

• Haslhofer and Schandl 2009: Interweaving OAI-PMH metadata with the Linked Data Cloud. To be published in International Journal of Metadata, Semantics, and Ontologies. Available on request.

141

Friday, March 6, 2009

Page 142: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Contents

• Motivation for Linked Open Data (LOD)

• Base Technologies

• The Linked Data Principles

• Publishing Solutions and Tools

• Vocabularies & Interoperability Issues

• Demos + Discussion

142

Friday, March 6, 2009

Page 143: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Demo 1 - browsing and querying DBPedia

• http://dbpedia.org/resource/Hallstatt_culture

• http://dbpedia.org/snorql

• http://lookup.dbpedia.org

143

Friday, March 6, 2009

Page 144: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Demo 2 - cURLing the LIBRIS catalogue

• LIBRIS = The Swedish Union Catalog

• Starting point: http://libris.kb.se/bib/10432900

144

Friday, March 6, 2009

Page 145: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Demo 3 - exposing MySQL DB using D2R

• sample database: http://dev.mysql.com/doc/world-setup/en/world-setup.html

145

Friday, March 6, 2009

Page 146: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Demo 4 - sample OAI2LOD instances

• http://www.mediaspaces.info/tools/oai2lod/

146

Friday, March 6, 2009

Page 147: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Demo 5 - RDF Viewers

• Zitgist: http://dataviewer.zitgist.com/

• Disco: http://www4.wiwiss.fu-berlin.de/rdf_browser/

• OpenLink Data Explorer: http://demo.openlinksw.com/rdfbrowser2

147

Friday, March 6, 2009

Page 148: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Known / Open Issues

• Automatic linking is non-trival and domain specific

• how to deal with false positives?

• precision / recall of existing approaches?

• Nobody can guarantee the (long-term) availability of LOD resources

• what to do when a resource disappears?

• annoying for humans / problematic for applications

• Licensing

148

Friday, March 6, 2009

Page 149: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Summary

• Linked Data is about publishing and interlinking public interest data on the Web

• Other applications can access these data with common Web technologies

• It is still research, with lots of construction areas, but within its two year (!!!) history it has attracted quite a lot of interest

• It is an exciting research field to work on...

149

Friday, March 6, 2009

Page 150: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Summary

150

Friday, March 6, 2009

Page 151: Linked Data Tutorial

Bernhard Haslhofer, Linked Data Tutorial

Questions / Discussion

151

Friday, March 6, 2009