Upload
robert-vinet
View
212
Download
0
Embed Size (px)
Citation preview
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
1/203
An introduction to Semantic
Web and Linked Dataor how to link data and
schemas on the web
a W3C tutorial by
Fabien Gandon, http://fabien.info, @fabien_gandon
Ivan Herman, http://www.w3.org/People/Ivan/
http://fabien.info/http://www.w3.org/People/Ivan/http://www.w3.org/People/Ivan/http://fabien.info/7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
2/203
semantic webmentioned by Tim BL
in 1994 at WWW
[Tim Berners-Lee 1994, http://www.w3.org/Talks/WWW94Tim/]
http://www.w3.org/People/Berners-Lee/http://www.w3.org/Talks/WWW94Tim/http://www.w3.org/Talks/WWW94Tim/http://www.w3.org/People/Berners-Lee/http://www.w3.org/People/Berners-Lee/http://www.w3.org/People/Berners-Lee/http://www.w3.org/People/Berners-Lee/7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
3/203
dont readthe sign
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
4/203
you loose!
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
5/203
machines dont.we identify and interpret information,
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
6/203
W3C
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
7/203W3C
A WEB OF
LINKED DATA
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
8/203
RDF stands forResource:pages, dogs, ideas...everything that can have a URI
Description:attributes, features, andrelations of the resources
Framework:model, languages and
syntaxes for these descriptions
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
9/203
RDFis a triple model i.e. everypiece of knowledge is broken down into( subject , predicate ,object )
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
10/203
doc.htm l has fo r au tho r Fab ien
and has fo r theme Mus ic
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
11/203
doc.htmlhas for authorFabien
doc.htmlhas for theme Music
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
12/203
( doc.html , author,Fabien )
( doc.html , theme ,Music )
( subject , predicate ,object )
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
13/203
Predicate
Subject
Object
a triplethe RDF atom
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
14/203
RDFis also a graph modelto link the descriptions of resources
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
15/203
RDFtriples can be seen as arcsof a graph (vertex,edge,vertex)
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
16/203
( doc.html , author,Fabien )
( doc.html , theme ,Music )
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
17/203
Fabien
author
doc.html
theme
Music
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
18/203
http://ns.inria.fr/fabien.gandon#me
http://inria.fr/schema#author
http://inria.fr/rr/doc.html
http://inria.fr/schema#theme
Music
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
19/203
open and link data in a
global giant graph
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
20/203
RDFin values of properties can also beliterals i.e. strings of characters
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
21/203
( doc.html , author ,Fabien )
( doc.html , theme ,"Music" )
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
22/203
http://ns.inria.fr/fabien.gandon#me
http://inria.fr/schema#author
http://inria.fr/rr/doc.html
http://inria.fr/schema#theme
"Music"
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
23/203
RDF< /> has an XML syntax
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
24/203
Music
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
25/203
RDFhas other syntaxes(Turtle, JSON, Triple)
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
26/203
@prefix rdf: .
@prefix inria: .
inria:author
;inria:theme "Music" .
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
27/203
writing rules for RDF triples the subject is always a resource (never a literal)
properties are binary relations and their types are
identified by URIs the value is a resource or a literal
bl k d (b d )
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
28/203
blank nodes (bnodes)
http://bu.ch/l23.htmlauthor
"My Life"
title
"John"
surname
"Doe"
firstname
handy anonymous nodes (existential quantification)
there exist a resource such that { r ; }DoeJohn
My Life
author
[surname "Doe" ;firstname "John" . ] ;
title "My Life" .
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
29/203
XML schema datatypes & literalsstandard literals are xsd:string
type literals with datatypes from XML Schema
true
1975-07-31
#Fabien teaching "true"^^xsd:boolean ;
birth "1975-07-31"^^xsd:date .
#Fabien "true"^^xsd:boolean
"1975-07-31"^^xsd:date
teaching
birth
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
30/203XML Schema datatypes
W3C-http://w
ww.w3.org/TR/xm
lschema-2/
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
31/203langue
Seigneur des anneauxLord of the rings
title "Seigneur des anneaux"@fr ;title "Lord of the rings"@en .
literals with languages and without are disjointFabien Fabien@en Fabien@fr
t i
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
32/203
typing resourcesusing URIs to identify the types rdf:type
a resource can have several types rdf:type rdf:type rdf:type
Fabien
Fabien
a in:Person ;
name "Fabien" .
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
33/203
question:
23
meaning ?
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
34/203
question:
23
exs:Reportrdf:type
exs:nbPages23^^xsd:int
exs:theme
http://example.org/doc.html
http://example.org#Music
http://example.org#History
exs:theme
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
35/203
bags = unordered groups
Ivan HermanFabien Gandon
author_:a_:a rdf:_1Ivan Herman_:a rdf:_2Fabien Gandon
author [
a rdf:Bag ;rdf:li "Ivan Herman" ;rdf:li "Fabien Gandon" . ] .
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
36/203
sequenceordered group of resources or literals
contains [a rdf:Seq;
rdf:li "C" ;rdf:li "C" ;rdf:li "C" ;rdf:li "D" ;
rdf:li "E" .] .
l
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
37/203
alternativese.g. title of a book in different languages
lhomme qui prenait sa femme
pour un chapeauthe man who mistook his wife
for a hat
title [a rdf:Alt ;rdf:li"lhomme"@fr ;rdf:li"the man"@en .
] .
ll i
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
38/203
collectionexhaustive and ordered list
wednesday
friday
sunday
nil
monday
tuesday
thursday
saturday
firstrestList
_:a
_:b
_:c
_:d
_:e
_:f
_:g
dividedIn(
) .
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
39/203
rdf:about
rdf:type
ex:ingredients
rdf:label
dc:creator
ex:weight
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
40/203
openmodel extensible vocabulary based on URIs
anyone can say anything about anything
http://my_domain.org/my_path/my_type
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
41/203
linkto the world
May 2007 April 2008 September 2008
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
42/203
May 2007 April 2008 September 2008
March 2009
September 2010
Linking Open Data
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/September 2011
0
100
200
300
400
10/10/2006 28/04/2007 14/11/2007 01/06/2008 18/12/2008 06/07/2009 22/01/2010 10/08/2010 26/02/2011 14/09/2011 01/04/2012
thematic content
7/27/2019 www2013tutorialwebsemv7-130514151837-phpapp02
43/203
thematic contentDomains
Number of
datasets
Number of
Triples% Out links %
Media 25 1 841 852 061 5,82 % 50 440 705 10,01 %
Geography 31 6145 532 484 19,43 % 35 812 328 7,11 %
Government 49 13 315 009 400 42,09 % 19 343 519 3,84 %
Publications 87 2 950 720 693 9,33 % 139 925 218 27,76 %
Inter-domain 41 4 184 635 715 13,23 % 63 183 065 12,54 %
Life Sciences 41 3 036 336 004 9,60 % 191 844 090 38,06 %
Users content 20 134 127 413 0,42 % 3 449 143 0,68 %
295 31 634 213 770 503 998 829
42%
20%