Cours 8
Cours 8
Une déclaration RDF est un triplet constitué d’un sujet, d’un prédicat et d’un
objet :
Un prédicat : C’est une relation binaire sur le domaine entre un sujet et un objet
nommé par un identifiant qui est une URI.
Un objet : C’est la valeur du prédicat pour le sujet. Il s’agit soit d’une ressource
(identifiée par une URI ou anonyme), soit un littéral (chaîne de caractères ou
nombre ou …)
prédicat
sujet objet
Rappel : Turtle La ville de Lille se trouve dans le département du Nord.
labd:V_Lille
dbpr:nom "Lille"@fr ;
labd:département "Nord"@fr .
La ville de Lille se trouve dans le département du Nord dont
Rappel : Turtle la première attestation documentaire date du 4 mars 1790.
labd:V_Lille
dbpr:nom "Lille"@fr ;
labd:département labd:D_Nord .
labd:D_Nord
dbpr:nom "Nord"@fr ;
labd:date-création "1790-03-04"^^xsd:date .
La ville de Lille se trouve dans le département du Nord dont
Rappel : Turtle la première attestation documentaire date du 4 mars 1790.
La population de la ville de Lille est de 227560.
labd:V_Lille
dbon:populationTotal "227560"^^xsd:integer ;
dbpr:nom "Lille"@fr ;
labd:département labd:D_Nord .
labd:D_Nord
dbpr:nom "Nord"@fr ;
labd:date-création "1790-03-04"^^xsd:date .
La ville de Lille se trouve dans le département du Nord dont
la première attestation documentaire date du 4 mars 1790.
Rappel : Turtle La population de la ville de Lille est de 227560 . Ce
recensement date de 1er janvier 2010.
labd:V_Lille
dbon:demographics _:R3 ;
dbpr:nom "Lille"@fr ;
labd:département labd:D_Nord .
labd:D_Nord
dbpr:nom "Nord"@fr ;
labd:date-création "1790-03-04"^^xsd:date .
_:R3
dbon:populationTotal "227560"^^xsd:integer ;
dbon:year "2010-01-01"^^xsd:date .
Rappel : Turtle
@prefix dbon: <http://dbpedia.org/ontology/> .
@prefix dbpr: <http://fr.dbpedia.org/property/> .
@prefix labd: <http://labd/2015#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
labd:D_Nord
dbpr:nom "Nord"@fr ;
labd:date-création "1790-03-04"^^xsd:date .
Rappel : modèle de graphe
https://www.w3.org/RDF/Validator/
RDF/XML - Littéraux typés
labd:V_Lille
rdf:type labd:Ville ;
dbon:demographics [
dbon:populationTotal 227560 ;
dbon:year "2010-01-01"^^xsd:date
] ;
dbpr:nom "Lille"@fr ;
labd:département labd:D_Nord .
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description rdf:about="http://www.recshop.fake/cd/Beatles">
<cd:artist>
<rdf:Bag>
<rdf:li>John</rdf:li>
<rdf:li>Paul</rdf:li>
<rdf:li>George</rdf:li>
<rdf:li>Ringo</rdf:li>
</rdf:Bag>
</cd:artist>
</rdf:Description>
</rdf:RDF>
rdf:Bag
Multi-ensemble de valeurs : des valeurs peuvent être dupliquées, l’ordre n’a
pas d’importance.
Exemple
<http://www.recshop.fake/cd/Beatles> ns0:artist [
a rdf:Bag ;
rdf:_1 "John" ;
rdf:_2 "Paul" ;
rdf:_3 "George" ;
rdf:_4 "Ringo" a est un raccourci Turtle pour
] . la propriété rdf:type
Exemple
<http://www.recshop.fake/cd/Beatles> ns0:artist [
a rdf:Seq ;
rdf:_1 "George" ;
rdf:_2 "John" ;
rdf:_3 "Paul" ;
rdf:_4 "Ringo"
] .
rdf:Alt
Alternative : une valeur parmi un choix de valeurs.
Exemple
<http://www.recshop.fake/cd/Beatles> ns0:format [
a rdf:Alt ;
rdf:_1 "CD" ;
rdf:_2 "Record" ;
rdf:_3 "Tape"
] .
Collection : rdf:List
En RDF, une collection est une liste ”à la LISP ” : de type rdf:List, avec un premier
élément rdf:first et une suite rdf:rest. La liste vide a la valeur rdf:nil.
Une collection est une liste fermée : elle forme un groupe qui ne contient que les
membres spécifiés lors de la déclaration de la collection.
Exemple
ns0:a ns0:b
[ rdf:first "apple";
rdf:rest [ rdf:first "banana";
rdf:rest rdf:nil ]
Collection : rdf:List
En RDF, une collection est une liste ”à la LISP ” : de type rdf:List, avec un premier
élément rdf:first et une suite rdf:rest. La liste vide a la valeur rdf:nil.
Une collection est une liste fermée : elle forme un groupe qui ne contient que les
membres spécifiés lors de la déclaration de la collection.
Exemple
<http://example.org/stuff/1.0/a> ns0:b (
"apple"
"banana"
) .
Réification
_:genid1
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
_:genid1
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject>
<http://labd/2015/reification#Bob> .
_:genid1
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate>
<http://labd/2015/reification#accepte> .
_:genid1
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object>
<http://labd/2015/reification#connexions_entrantes> .
Réification (Turtle)
<http://labd/2015/reification#Alice> ns0:demande [
a rdf:Statement ;
rdf:subject ns0:Bob ;
rdf:predicate ns0:accepte ;
rdf:object ns0:connexions_entrantes
] .
Sémantique d'un vocabulaire
• les triplets!
rdfs:Class
Les ressources peuvent être "rangées" dans des groupes appelés classes.
La propriété rdf:type permet de dire qu'une ressource est élément (on dit
instance) d'une classe.
Les ressources qui sont des classes forment une classe appelée rdfs:Class
rdfs:Resource
rdf:List rdf:Statement
rdfs:Container
rdfs:subClassOf
L. Jourdan – Aide à la décision
Types de données
rdfs:Resource
rdfs:subClassOf
rdfs:Literal
rdf:type
rdfs:Datatype
rdfs:resource
rdfs:Class rdf:Property
rdfs:Datatype rdfs:ContainerMembershipProperty
rdfs:subClassOf rdf:type
Classe Commentaire
rdfs:Resource Tout est ressource
rdfs:Literal Donc du texte
rdf:langString Du texte avec indication de langue (@fr)
rdf:HTML Littéral HTML
rdf:XMLLiteral Littéral XML
rdfs:Class Une classe
rdf:Property Une propriété
rdfs:Datatype Un type de données
rdf:Statement Un triplet
rdf:Bag Un multi-ensemble
rdf:Seq Une séquence
rdf:Alt Une alternative
rdfs:Container Un container
rdfs:ContainerMembershipProperty rdf:_1, rdf:_2, …, rdfs:member
rdf:List Une liste (rdf:nil est instance de rdf:List)
Les propriétés RDF/RDFS
Propriété Domaine Co-domaine
rdf:type rdfs:Resource rdfs:Class
rdfs:subclassOf rdfs:Class rdfs:Class
rdfs:subPropertyOf rdf:Property rdf:Property
rdfs:domain rdf:Property rdfs:Class
rdfs:range rdf:Property rdfs:Class
rdfs:label rdfs:Resource rdfs:Literal
rdfs:comment rdfs:Resource rdfs:Literal
rdfs:member rdfs:Resource rdfs:Resource
rdf:first rdf:List rdfs:Resource
rdf:rest rdf:List rdf:List
rdfs:seeAlso rdfs:Resource rdfs:Resource
rdfs:isDefinedBy rdfs:Resource rdfs:Resource
rdf:value rdfs:Resource rdfs:Resource
À ces propriétés, il faut ajouter
rdf:subject rdfs:Statement rdfs:Resource
rdf:_1, rdf:_2, … qui sont
rdf:predicate rdfs:Statement rdfs:Resource
toutes sous-propriétés de
rdf:object rdfs:Statement rdfs:Resource rdfs:member et instances de
rdfs:ContainerMembershipProperty.
Exemple de schéma RDFS
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://www.labd.org/2015/voitures/schema#Personne>
a rdfs:Class ;
rdfs:comment "La classe personne" .
<http://www.labd.org/2015/voitures/schema#Vehicule>
a rdfs:Class ;
rdfs:comment "La classe vehicule" .
<http://www.labd.org/2015/voitures/schema#Voiture>
a rdfs:Class ;
rdfs:comment "La classe voiture" ;
rdfs:subClassOf <http://www.labd.org/2015/voitures/schema#Vehicule> .
<http://www.labd.org/2015/voitures/schema#conducteur>
a rdf:Property ;
rdfs:range <http://www.labd.org/2015/voitures/schema#Personne> ;
rdfs:domain <http://www.labd.org/2015/voitures/schema#Vehicule> .
Exemple d’instance du schéma précédent
<http://www.labd.org/2015/voitures/data#vo001>
a ns0:Voiture ;
ns0:conducteur <http://www.labd.org/2015/voitures/data#p101> .
<http://www.labd.org/2015/voitures/data#vo002>
a ns0:Voiture ;
ns0:conducteur <http://www.labd.org/2015/voitures/data#p102> .
<http://www.labd.org/2015/voitures/data#p102> a ns0:Personne .
<http://www.labd.org/2015/voitures/data#p101> a ns0:Personne .
Règles d’inférences - sous-typage
(x , p , y) ⋀ (p , rdfs:subPropertyOf , p’)
2
(x , p’ , y)
Règles d’inférences - transitivité
(p , rdfs:subPropertyOf , p’’)
4
Règles d’inférences - domaine/co-domaine
(x , p , y) ⋀ (p , rdfs:domain , C)
5
(x , rdf:type , C)
(x , p , y) ⋀ (p , rdfs:range , C)
6
(y , rdf:type , C)
Exercice : Donner les inférences faites par RDFS
c:creator rdfs:domain c:Person
i:Man241 c:creator i:Image262
i:Man241 rdf:type c:Person
c:author rdfs:subPropertyOf c:creator
c:author rdfs:range c:Document
i:Woman297 c:author i:Book812
i:Book812 rdf:type c:Document
i:Woman297 c:creator i:Book812
i:Woman297 rdf:type c:Person
c:aSoutenu rdfs:domain c:Docteur
c:aSoutenu rdfs:range c:These
i:Woman297 c:aSoutenu i:t127
i:Woman297 rdf:type c:Docteur
i:t127 rdf:type c:These
c:nbDeRoues rdfs:domain c:Vehicule
i:Car207 c:nbDeRoues "4"^^xsd:integer
i:Car207 rdf:type c:Vehicule
Exercice : Donner les inférences faites par RDFS
c:creator rdfs:domain c:Person
i:Man241 c:creator i:Image262
i:Man241 rdf:type c:Person
c:author rdfs:subPropertyOf c:creator
c:author rdfs:range c:Document
i:Woman297 c:author i:Book812
i:Book812 rdf:type c:Document
i:Woman297 c:creator i:Book812
i:Woman297 rdf:type c:Person
c:aSoutenu rdfs:domain c:Docteur
c:aSoutenu rdfs:range c:These
i:Woman297 c:aSoutenu i:t127
i:Woman297 rdf:type c:Docteur
i:t127 rdf:type c:These
c:nbDeRoues rdfs:domain c:Vehicule
i:Car207 c:nbDeRoues "4"^^xsd:integer
i:Car207 rdf:type c:Vehicule
Exercice : Donner les inférences faites par RDFS
c:creator rdfs:domain c:Person
i:Man241 c:creator i:Image262
i:Man241 rdf:type c:Person
c:author rdfs:subPropertyOf c:creator
c:author rdfs:range c:Document
i:Woman297 c:author i:Book812
i:Book812 rdf:type c:Document
i:Woman297 c:creator i:Book812
i:Woman297 rdf:type c:Person
c:aSoutenu rdfs:domain c:Docteur
c:aSoutenu rdfs:range c:These
i:Woman297 c:aSoutenu i:t127
i:Woman297 rdf:type c:Docteur
i:t127 rdf:type c:These
c:nbDeRoues rdfs:domain c:Vehicule
i:Car207 c:nbDeRoues "4"^^xsd:integer
i:Car207 rdf:type c:Vehicule
Exercice : Donner les inférences faites par RDFS
c:creator rdfs:domain c:Person
i:Man241 c:creator i:Image262
i:Man241 rdf:type c:Person
c:author rdfs:subPropertyOf c:creator
c:author rdfs:range c:Document
i:Woman297 c:author i:Book812
i:Book812 rdf:type c:Document
i:Woman297 c:creator i:Book812
i:Woman297 rdf:type c:Person
c:aSoutenu rdfs:domain c:Docteur
c:aSoutenu rdfs:range c:These
i:Woman297 c:aSoutenu i:t127
i:Woman297 rdf:type c:Docteur
i:t127 rdf:type c:These
c:nbDeRoues rdfs:domain c:Vehicule
i:Car207 c:nbDeRoues "4"^^xsd:integer
i:Car207 rdf:type c:Vehicule
Exercice : Donner les inférences faites par RDFS
c:creator rdfs:domain c:Person
i:Man241 c:creator i:Image262
i:Man241 rdf:type c:Person
c:author rdfs:subPropertyOf c:creator
c:author rdfs:range c:Document
i:Woman297 c:author i:Book812
i:Book812 rdf:type c:Document
i:Woman297 c:creator i:Book812
i:Woman297 rdf:type c:Person
c:aSoutenu rdfs:domain c:Docteur
c:aSoutenu rdfs:range c:These
i:Woman297 c:aSoutenu i:t127
i:Woman297 rdf:type c:Docteur
i:t127 rdf:type c:These
c:nbDeRoues rdfs:domain c:Vehicule
i:Car207 c:nbDeRoues "4"^^xsd:integer
i:Car207 rdf:type c:Vehicule
Exercice
<http://www.labd.org/2015/cours/schema#Personne> a rdfs:Class .
<http://www.labd.org/2015/cours/schema#Cours> a rdfs:Class .
<http://www.labd.org/2015/cours/schema#Etudiant>
a rdfs:Class ;
rdfs:subClassOf <http://www.labd.org/2015/cours/schema#Personne> .
<http://www.labd.org/2015/cours/schema#Enseignant>
a rdfs:Class ;
rdfs:subClassOf <http://www.labd.org/2015/cours/schema#Personne> .
<http://www.labd.org/2015/cours/schema#estSuiviPar>
a rdfs:Property ;
rdfs:domain <http://www.labd.org/2015/cours/schema#Cours> ;
rdfs:range rdf:Seq .
<http://www.labd.org/2015/cours/schema#nom>
a rdfs:Property ;
rdfs:domain <http://www.labd.org/2015/cours/schema#Cours>,
<http://www.labd.org/2015/cours/schema#Personne> ;
rdfs:range rdf:Literal .
<http://www.labd.org/2015/cours/schema#aCommeEnseignant>
a rdfs:Property ;
rdfs:domain <http://www.labd.org/2015/cours/schema#Cours> ;
rdfs:range <http://www.labd.org/2015/cours/schema#Enseignant> .
Exercice, suite
<http://www.labd.org/2015/cours/data#POO>
a ns0:Cours ;
ns0:nom "Programmation Orientée Objets" ;
ns0:aCommeEnseignant <http://www.labd.org/2015/cours/data#jcr> ;
ns0:estSuiviPar [
a rdf:Seq ;
rdf:_1 <http://www.labd.org/2015/cours/data#etud01> ;
rdf:_2 <http://www.labd.org/2015/cours/data#etud02> ;
rdf:_3 <http://www.labd.org/2015/cours/data#etud03>
] .
<http://www.labd.org/2015/cours/data#jcr>
a ns0:Enseignant ;
ns0:nom "Jean-Christophe Routier" .
<http://www.labd.org/2015/cours/data#etud01>
a <http://www.labd.org/2015/cours/schema#Etudiant> ;
ns0:nom "Marie Martin" .
<http://www.labd.org/2015/cours/data#etud02>
a ns0:Etudiant ;
ns0:nom "Pierre Dupont" .
<http://www.labd.org/2015/cours/data#etud03>
a ns0:Etudiant ;
ns0:nom "Alain Durand" .
Exercice, suite
<http://www.labd.org/2015/cours/data#TW2>
a ns0:Cours ;
ns0:nom "Techonolgies du Web 2" ;
ns0:estSuiviPar <http://www.labd.org/2015/cours/data#L3S4> ;
ns0:aCommeEnseignant <http://www.labd.org/2015/cours/data#jcr> .
<http://www.labd.org/2015/cours/data#POO>
a ns0:Cours ;
ns0:nom "Programmation Orientée Objets" ;
ns0:estSuiviPar <http://www.labd.org/2015/cours/data#L3S4> ;
ns0:aCommeEnseignant <http://www.labd.org/2015/cours/data#jcr> .
<http://www.labd.org/2015/cours/data#jcr>
ns0:nom "Jean-Christophe Routier" ;
a ns0:Enseignant .
<http://www.labd.org/2015/cours/data#L3S4>
a rdf:Seq ;
rdf:_3 <http://www.labd.org/2015/cours/data#etud03> ;
rdf:_1 <http://www.labd.org/2015/cours/data#etud01> ;
rdf:_2 <http://www.labd.org/2015/cours/data#etud02> .
<http://www.labd.org/2015/cours/data#etud01>
a <http://www.labd.org/2015/cours/schema#Etudiant> ;
ns0:nom "Marie Martin" .
<http://www.labd.org/2015/cours/data#etud02>
a ns0:Etudiant ;
ns0:nom "Pierre Dupont" .
<http://www.labd.org/2015/cours/data#etud03>
a ns0:Etudiant ;
ns0:nom "Alain Durand" .
lundi
lundi18
18aiai2015
2015
durée
durée 2h
2h supports
supportsdedecours
coursetetTD
TDautorisés
autorisés
Exercices, tirés de l’examen de mai 2015
Examen
Examen –– Session
Session 11
Certains
Certains fichiers
fichiersmentionnés
mentionnéssont
sontconsultables
consultablesen
enannexe,
annexe,ààlalafin
findu
dusujet.
sujet.IlIlpeut
peutêtre
êtrecommode
commode
de
dedétacher
détacherles
lesfeuilles
feuillesqui
quicomposent
composentcette
cetteannexe
annexeafin
afind’avoir
d’avoirsous
sousles
lesyeux
yeuxlelecontenu
contenudes
desfichiers
fichiers
concernés.
concernés.
Exercice 11 :: Modélisation
Exercice ModélisationRDF
RDF
Le
Le texte
texte suivant
suivantest
estextrait
extraitde
delalapage Wikipediade
pageWikipedia deJohannes Brahms: :
JohannesBrahms
Joachim
Joachim conseille
conseilleààBrahms
Brahmsde des’adresser
s’adresserààFranz
FranzLiszt
Lisztqui,
qui,ààcette
cetteépoque,
époque,est
estchef
chefd’orchestre
d’orchestreà à
la
la cour
cour de
de Weimar.
Weimar.La Lalégende
légendevoudrait
voudraitque
queBrahms
Brahmssesesoit
soitendormi
endormipendant
pendantquequeLiszt
Lisztexécutait
exécutait
sa célèbre Sonate en si mineur.
sa célèbre Sonate en si mineur.
Question 11 :: Exprimez
Question Exprimezces
cesinformations
informationssous
sousforme
formede
detriplets RDFenenutilisant
tripletsRDF utilisantlalasyntaxe
syntaxeTurtle.
Turtle.
Exercice 22 :: Inférence
Exercice InférenceRDFS
RDFS
On
On considère
considère l’ensemble
l’ensemblede
detriplets
tripletssuivants,
suivants,donné
donnéau
auformat Turtle: :
formatTurtle
@
@pprreeffiixx rrddffss: : <h
<httttpp: ://www.
//www.w3
w3. .oor rgg/2000/01/
/2000/01/r rddf f schema#>> . .
schema#
@
@pprreeffiixx rrddff: : <h
<httttpp: ://www.
//www.w3
w3. .oor rgg/1999/02/22
/1999/02/22 r rddf f syntax
syntax ns# >> . .
ns#
@
@pprreeffiixx uunni i: : <h
<httttpp: ://www.
//www.example
example. .oor rgg//uunni#>> . .
i#
lundi 18 ai 2015
1 : Modélisationns1:objet
Exercice ns1:parlerALiszt RDF ns1:Liszt ;
ns1:sujet ns1:Brahms ;
Le texte suivantns1:verbe ns1:parlerA
est extrait de .
la page Wikipedia de Johannes Brahms :
Joachim conseille à Brahms
ns1:Liszt de s’adresser à Franz Liszt"Cour
ns1:aCommeLieuDeTravail qui, à de
cette époque, ;est chef d’orchestre à
Weimar"
la cour de Weimar. La légende voudrait"Chef
ns1:aCommeTravail que Brahms se soit endormi
d'orchestre" . pendant que Liszt exécutait
sa célèbre Sonate en si mineur.
ns1:_ ns1:dit ns1:BrahmsADormi .
Question 1 : Exprimez ces informations sous forme de triplets RDF en utilisant la syntaxe Turtle.
ns1:BrahmsADormi ns1:en_meme_temps_que ns1:LisztJoue ;
Exercice 2 : ns1:objet
Inférence "endormi" ;
RDFS
ns1:sujet ns1:Brahms ;
ns1:verbe ns1:etat .
On considère l’ensemble de triplets suivants, donné au format Turtle :
ns1:LisztJoue ns1:objet "Sonate en si mineur" ;
@ p r e f i x r d f s : ns1:sujet
<h t t p : //www. w3 . o r g /2000/01/
ns1:Liszt ; r d f schema#> .
@ p r e f i x r d f : ns1:verbe
<h t t p : //www. w3 . o r g /1999/02/22
ns1:joue . r d f syntax ns#> .
@ p r e f i x u n i : <h t t p : //www. example . o r g / u n i#> .
Question 1 : Exprimez ces informations sous forme de triplets RDF en utilisant la syntaxe Turtle.
uni:Person a r d f s : C l a s s .
uni:alan uni:knows uni:bob .
uni:Student
a rdfs:Class ;
rdfs:subClassOf uni:Person . uni:alan rdf:type uni:Professor .
uni:Professor
a rdfs:Class ; uni:bob rdf:type uni:Student .
rdfs:subClassOf uni:Person .
uni:knows a r d f : P r o p e r t y .
uni:alan u n i : a d v i s e s uni:bob .
Question 1 : Donnez cinq triplets supplémentaires qui peuvent être inférés par application des
règle d’inférence de RDFS.