0% ont trouvé ce document utile (0 vote)
33 vues53 pages

Cours 8

Transféré par

Olfa Bouchaala
Copyright
© © All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd
0% ont trouvé ce document utile (0 vote)
33 vues53 pages

Cours 8

Transféré par

Olfa Bouchaala
Copyright
© © All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd

LABD

Master Info M1 2019-2020

LABD 9 : Vocabulaire RDF-RDFS


Rappel : déclaration RDF

Une déclaration RDF est un triplet constitué d’un sujet, d’un prédicat et d’un
objet :

Un sujet (obligatoirement une ressource) : C’est un objet du domaine nommé


par un identifiant (URI ou ressource anonyme)

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.

@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: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.

@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: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.

@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: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.

@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: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:V_Lille notation Turtle pour nœud blanc


dbon:demographics [
dbon:populationTotal 227560 ;
dbon:year "2010-01-01"^^xsd:date
] ;
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 .
Rappel : modèle de graphe

https://www.w3.org/RDF/Validator/
RDF/XML - Littéraux typés

On utilise l’attribut rdf:datatype pour indiquer le type du contenu d’un élément.

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


<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
xmlns:rdf=... xmlns:dc=... xmlns:exterms=... >
...
<rdf:Description rdf:about="http://www.example.org/index.html">
<exterms:creation-date rdf:datatype="&xsd;date">
1999-08-16
</exterms:creation-date>
...
</rfd:Description>
</rdf:RDF>
Typage des ressources

La valeur de la propriété rdf:type indique le type/la classe dont la


ressource est instance. On parle alors de ressource typée.

<ex2terms:book78354> rdf:type <ex2terms:Book> .


<ex2terms:book78354> ex2terms:author _:author78354 .
_:author78354 rdf:type <ex2terms:Person> .
_:author78354 ex2terms:name "Jane Smith" .

Une ressource peut avoir plusieurs types.


Typage de ressource (2)
@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#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

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 .

labd:D_Nord a est un raccourci Turtle pour


a labd:Departement ; la propriété rdf:type
dbpr:nom "Nord"@fr ;
labd:date-création "1790-03-04"^^xsd:date .
Les Containers

Ils permettent de décrire des regroupements de ressources. Les éléments


d’un container sont appelées membres du groupe.

Il existe 3 types de containers prédéfinis :


• rdf:Bag : multi-ensemble de ressources ou littéraux
• rdf:Seq : séquence de ressources ou littéraux (l’ordre est important)
• rdf:Alt : alternative entre plusieurs ressources ou littéraux

Pour indiquer qu'une ressource est un container, on utilise la propriété


rdf:type. Les containers sont qualifiés d’ouverts, i.e. il peut exister
d’autres membres du container que ceux indiqués par la description dont
on dispose.
rdf:Bag
Multi-ensemble de valeurs : des valeurs peuvent être dupliquées, l’ordre n’a
pas d’importance.
Exemple
<?xml version="1.0"?>

<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

@prefix ns0: <http://www.recshop.fake/cd#> .


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

<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

notation Turtle pour nœud blanc


rdf:Seq
Liste de valeurs : des valeurs peuvent être dupliquées, l’ordre est important.

Exemple

@prefix ns0: <http://www.recshop.fake/cd#> .


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

<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

@prefix ns0: <http://www.recshop.fake/cd#> .


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

<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

@prefix ns0: <http://example.org/stuff/1.0/> .


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

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

@prefix ns0: <http://example.org/stuff/1.0/> .

<http://example.org/stuff/1.0/a> ns0:b (
"apple"
"banana"
) .
Réification

Alice demande que Bob accepte les connexions entrantes


Réification

Alice demande que Bob accepte les connexions entrantes


Réification

sujet prédicat objet

Alice demande ( Bob accepte connexions_entrantes )


Réification

Alice demande BobAccepteConnexions qui est un triplet dont le


sujet est Bob, le prédicat est accepte et l’objet est
connexions_entrantes
Réification

Alice demande BobAccepteConnexions.


BobAccepteConnexions est_un triplet.
BobAccepteConnexions a_comme_sujet Bob,
BobAccepteConnexions a_comme_prédicat accepte
BobAccepteConnexions a_comme_objet connexions_entrantes
Réification (N-triples)
<http://labd/2015/reification#Alice>
<http://labd/2015/reification#demande>
_:genid1 .

_: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)

@prefix ns0: <http://labd/2015/reification#> .


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

<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

RDF permet de définir des graphes étiquetés, en utilisant des ressources du


web.

Comment donner le sens des "étiquettes" du graphe RDF ?

Donner la sémantique des vocabulaires permet d'améliorer l'indexation des


contenus en ligne, un traitement plus efficace des requêtes, des réponses
plus pertinentes, et une meilleure interopérabilité des systèmes.

Outils : les ontologies. Elles permettent aussi un enrichissement des données


en utilisant de l'inférence.

Ontologies "légères", RDFS.


Tout est ressource!

• les classes de ressources qui représentent des types de ressources, des


ensembles de ressources

• les propriétés qui représentent des types de relations, des ensembles de


relations possibles entre les ressources.

• la relation de typage (instanciation) pour dire qu’une ressource est d'un


certain type;

• la relation de sous-type (subsomption) pour dire qu’une classe/propriété est


sous classe /propriété d’une autre et que ses instances sont aussi instances
de l’autre.

• 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.

L'ensemble des instances d'une classe est appelée son extension.

Deux classes différentes peuvent avoir la même extension.

Une classe est une ressource.

Les ressources qui sont des classes forment une classe appelée rdfs:Class

(ex:Alice , rdf:type , ex:Personne)

(ex:Personne , rdf:type , rdfs:Class)


rdfs:subclassOf

rdfs:Resource

rdf:List rdf:Statement

rdfs:Container

rdf:Alt rdf:Bag rdf:Seq

rdfs:subClassOf
L. Jourdan – Aide à la décision
Types de données

rdfs:Resource

rdfs:subClassOf
rdfs:Literal

rdf:XMLLiteral rdf:HTML rdf:langString

rdf:type
rdfs:Datatype

Toute instance deL.rdfs:Datatype


Jourdan – Aide à la décision
est sous-classe de rdfs:Literal
Tout est ressource!

rdfs:resource

rdfs:Class rdf:Property

rdfs:Datatype rdfs:ContainerMembershipProperty

rdfs:subClassOf rdf:type

L. Jourdan – Aide à la décision


Les propriétés

• Une propriété est de type rdf:Property.

• La relation de sous-propriété entre 2 propriétés est définie par


rdfs:subPropertyOf.

• On peut définir le type du sujet (domaine) et/ou de l'objet (co-domaine)


d'une propriété :
• rdfs:domain : domaine d'une propriété
• rdfs:range : co-domaine d'une propriété
(ex:habite, rdfs:domain, ex:Personne)
(ex:habite, rdfs:range, ex:Ville)

• Le domaine ou co-domaine d’une propriété peut contenir plusieurs classes.

(ex:habite, rdfs:range, ex:Departement)


Les classes RDF/RDFS

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

@prefix ns0: <http://www.labd.org/2015/voitures/schema#> .

<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 , rdf:type , C) ⋀ (C , rdfs:subclassOf , C’)


1
(x , rdf:type , C’)

(x , p , y) ⋀ (p , rdfs:subPropertyOf , p’)
2
(x , p’ , y)
Règles d’inférences - transitivité

(C , rdfs:subclassOf , C’) ⋀ (C’ , rdfs:subclassOf , C’’)


3
(C , rdfs:subclassOf , C’’)

(p , rdfs:subPropertyOf , p’) ⋀ (p’ , rdfs:subPropertyOf , p’’)

(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

Définir un schéma RDFS pour les concepts suivants :


personne
enseignant
étudiant
cours
et les propriétés suivantes :
nom qui précise le nom d’un enseignant ou d’un cours. Le nom est donné
sous la forme d’un littéral http://www.w3.org/1999/02/22-rdf-
syntax-ns#Literal.
estSuiviPar qui précise que tel cours est suivi par telle liste d’étudiants
aCommeEnseignant qui précise que tel cours a comme enseignant tel
enseignant.
Schéma
@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/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

Définir une instance RDF correspondant au schéma RDFS précédent pour


exprimer :

Le cours « Programmation Orientée Objets » est enseigné par Jean-


Christophe Routier.
Il est suivi par les étudiants Marie Martin, Pierre Dupont et Alain Durand.
Instance
@prefix ns0: <http://www.labd.org/2015/cours/schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<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

Définir une instance RDF correspondant au schéma RDFS précédent pour


exprimer :

Les cours « Programmation Orientée Objets » et « Technologies du Web 2 »


sont enseignés par Jean-Christophe Routier.
Il sont suivis par les étudiants Marie Martin, Pierre Dupont et Alain Durand.
@prefix ns0: <http://www.labd.org/2015/cours/schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<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

durée 2h supports de cours et TD autorisés


@prefix ns1: <http://www.example.org/labd#> .
Examen – Session 1
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
Certains fichiers mentionnés sont consultables en annexe, à la fin du sujet. Il peut être commode
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
de détacher les feuilles qui composent cette annexe afin d’avoir sous les yeux le contenu des fichiers
concernés. ns1:Joachim ns1:dit ns1:parlerALiszt .

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.

Exercice 2 : Inférence RDFS


On considère l’ensemble de triplets suivants, donné au format Turtle :

@ p r e f i x r d f s : <h t t p : //www. w3 . o r g /2000/01/ r d f schema#> .


@ p r e f i x r d f : <h t t p : //www. w3 . o r g /1999/02/22 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#> .

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:advises uni:alan rdf:type uni:Person .


a rdf:Property ;
rdfs:domain uni:Professor ;
rdfs:range uni:Student ; uni:bob rdf:type uni:Person .
rdfs:subPropertyOf uni:knows .

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.

Vous aimerez peut-être aussi