0% ont trouvé ce document utile (0 vote)
22 vues41 pages

Index

Le document traite des logiques de description dans le cadre du web sémantique, en abordant leur historique, leur syntaxe et leur sémantique. Il présente également le Resource Description Framework (RDF) ainsi que les vocabulaires et ontologies associés, tels que RDF-Schema et OWL. Enfin, le document discute de la publication de données sur le web sémantique et des enjeux liés à la raisonnement dans ce domaine.

Transféré par

mess687 kaskh
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)
22 vues41 pages

Index

Le document traite des logiques de description dans le cadre du web sémantique, en abordant leur historique, leur syntaxe et leur sémantique. Il présente également le Resource Description Framework (RDF) ainsi que les vocabulaires et ontologies associés, tels que RDF-Schema et OWL. Enfin, le document discute de la publication de données sur le web sémantique et des enjeux liés à la raisonnement dans ce domaine.

Transféré par

mess687 kaskh
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

Web sémantique

Version 2012

Pierre-Antoine Champin

18 January 2016
Table des matières

1 Logiques de descriptions 1
1.1 Historique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Syntaxe et sémantique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Raisonnement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Annexe : Protégé . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 TP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 RDF : Resource Description Framework 13


2.1 Motivation et historique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Syntaxe abstraite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 Sémantique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Syntaxes concrètes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5 Dataset et requêtes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3 Vocabulaires et ontologies 25
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 RDF-Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 OWL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4 Publication sur le web sémantique 33


4.1 Web sémantique et sémantique du web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2 Sémantique des URIs HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 Publier des données . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5 Articles 37

i
ii
CHAPITRE 1

Logiques de descriptions

author Pierre-Antoine Champin

1.1 Historique

1.1.1 Logique

— Logique des propositions (Boole)


— Logique des prédicats (Frege, ...)
— Calculabilité, complexité (Turing-Church)
— Incomplétude (Gödel)

1.1.2 Règles

— Clauses de Horn
— Systèmes experts (PROLOG)
cretois(minos) .
menteur(X) :- cretois(X) .

?- menteur(minos)
yes
?- menteur(M)
M=minos
— Difficulté à maintenir de grosses bases de règles

1.1.3 Logiques « intuitives »

— Réseaux sémantiques
— représentation graphique

Logiques « intuitives » (suite)

— Frames (Minsky)
— approche « objet »
— stéréotypes

1
Web sémantique, Version 2012

— valeurs par défaut


— logique non monotone
(tous les oiseaux volent, les autruches ne volent pas)

1.1.4 Remise en ordre

— graphes conceptuels (Sowa)


— représentation graphique formalisée
— logiques de descriptions
— représentation logique simplifiée

1.1.5 Logiques de description

— Pas un langage, mais une famille de langage


— Formalisme de plus haut niveau que la LPO
— Compromis maîtrisé entre décidabilité et complexité
— Autres appellations :
— logiques descriptives
— logiques terminologiques

1.2 Syntaxe et sémantique

1.2.1 Éléments de base

L’univers du discours est constitué d’individus, appartenant à des concepts (ou classes), et reliés entre eux par des
rôles (ou propriété).
LD LPO
Individu Terme
Concept Prédicat 1-aire
Rôle Prédicat 2-aire

2 Chapitre 1. Logiques de descriptions


Web sémantique, Version 2012

1.2.2 Exemples

Concepts Rôles Individus


Homme connait john
Voiture (a pour) père jane
Rouge mère ab-123-cd
Menteur enfant
Ferrari conduit

1.2.3 Axiomes

Syntaxe Appellation Sémantique


C⊑D subsomption de concepts ∀ x, C(x) → D(x)
r⊑s subsomption de rôles ∀ x, y, r(x, y) → s(x, y)
NB : l’équivalence peut s’exprimer par deux subsomptions symétriques : C ⊑ D et D ⊑ C

Axiomes : exemples

— Crétois ⊑ Menteur
— ami ⊑ connait

1.2.4 Concepts complexes : constructeurs ensemblistes

Syntaxe Appellation Sémantique


⊤ concept universel (top) ∆
⊥ concept absurde (bottom) ∅
¬C complément { x | ¬C(x) }
C⊔D union { x | C(x) } ∪ { x | D(x) }
C⊓D intersection { x | C(x) } ∩ { x | D(x) }
{a} extension {a}

Constructeurs ensemblistes : exemples

— ¬Menteur
— Homme ⊔ Voiture
— Crétois ⊓ Menteur
— Voiture ⊓ (Rouge ⊔ ¬Ferrari)
— {john, paul, george, ringo}

1.2.5 Concepts complexes : restrictions

Syntaxe Appellation Sémantique


∃rC qualificateur existentiel { x | ∃ y, r(x, y) ∧ C(y) }
∀rC qualificateur universel { x | ∀ y, ¬r(x, y) ∨ C(y) }
=nrC quantificateur { x | #{y | r(x, y) ∧ C(y)} = n }
≤nrC quantificateur (max) { x | #{y | r(x, y) ∧ C(y)} ≤ n }
≥nrC quantificateur (min) { x | #{y | r(x, y) ∧ C(y)} ≥ n }
NB : on omet généralement C lorsqu’il s’agit de ⊤ ; e.g.

1.2. Syntaxe et sémantique 3


Web sémantique, Version 2012

∃ r , ∀ r , = 1 r ...

Restrictions : exemples

— ∃ enfant
— ∀ conduit Ferrari
— (∃ conduit) ⊓ (∀ conduit Ferrari)
— = 2 conduit Ferrari
— ≥ 2 connait (Crétois ⊓ Menteur)

1.2.6 Rôles complexes

Syntaxe Appellation Sémantique


r− rôle inverse { (x, y) | r(y, x) }
r∘s rôle composé { (x, y) | ∃ z, r(x, z) ∧ s(z, y) }
¬r complément { (x, y) | ¬r(x, y) }

Exemples

— conduit−
— connait ∘ conduit
— connait ∘ connait

1.2.7 Axiomes complexes : exemples

— ∃ conduit ⊑ Adulte
— ∃ conduit− ⊑ Voiture
— Personne ⊑ Adulte ⊔ Enfant
— Personne ⊑ (= 1 père Homme) ⊓ (= 1 mère Femme)
— Personne ⊑ ¬Voiture

1.2.8 Décidabilité et complexité

Chaque LD impose des contraintes sur :


— les axiomes autorisés,
— les constructeurs autorisés,
— la manière de les combiner,
afin de garantir que les mécanismes de raisonnement
— seront décidables,
— auront une complexité maximale.
→ compromis entre expressivité et complexité.

1.3 Raisonnement

1.3.1 Rappels

— Interprétation de F
— domaine du discours

4 Chapitre 1. Logiques de descriptions


Web sémantique, Version 2012

— fonction d’interprétation
— Modèle
— axiomes → contraintes
— Implication
— F est satisfiable si elle a au moins un modèle
— F |= G ssi tous les modèles de F sont des modèles de G
— → F |= G ssi F ∧ ¬G est non satisfiable

1.3.2 Méthode des tableaux

— Un tableau est un arbre, représentant une famille de modèles


— Application systématique de règles pour explorer tous les modèles possibles (non déterministe)
— Preuve par réfutation : concept non satisfiable

1.3.3 Exemple

1.3. Raisonnement 5
Web sémantique, Version 2012

6 Chapitre 1. Logiques de descriptions


Web sémantique, Version 2012

1.3. Raisonnement 7
Web sémantique, Version 2012

8 Chapitre 1. Logiques de descriptions


Web sémantique, Version 2012

1.3. Raisonnement 9
Web sémantique, Version 2012

1.3.4 Enjeux

— Décidable : dépend du type de LD choisie


— Correct/complet : ensemble de règles de transformation
— Complexe : optimiser l’ordre d’application des règles
— Problème des modèles infinis : exemple
— Entier ⊑ (= 1 suivant Entier) ⊓ (≤ 1 suivant− )
— {zero} ⊑ Entier ⊓ (= 0 suivant− )

1.3.5 Implémentations

Hermit http://hermit-reasoner.com/
Pellet http://clarkparsia.com/pellet
Racer http://www.racer-systems.com/
FaCT http://www.cs.man.ac.uk/~horrocks/FaCT/

1.3.6 Méta-modélisation

— En théorie : séparation stricte entre les individus, les concepts et les rôles
— En pratique : pas d’ambiguïté syntaxique sur la nature d’un terme
— Punning (calembour) : autorisation d’utiliser le même terme pour des éléments de nature différente
— aucun lien sémantique entre eux
— mais intérêt pragmatique

10 Chapitre 1. Logiques de descriptions


Web sémantique, Version 2012

— /!\ pas très bien supporté par Protégé :-(

1.4 Annexe : Protégé

1.4.1 Installation

Téléchargement de Protégé (version ≥ 4)


http://protege.stanford.edu/
Prise en main
http://protegewiki.stanford.edu/wiki/Protege4GettingStarted

1.4.2 Syntaxe de Protégé

Protégé utilise une syntaxe alternative


— inspirée de la syntaxe Manchester
— n’utilisant que l’alphabet latin
— donnes des phrases en pseudo-anglais → lisibilité

Concepts complexes : constructeurs ensemblistes

Protégé LD
Thing ⊤
Nothing ⊥
C and D C⊓D
C or D C⊔D
not C ¬C
{a} {a}

Concepts complexes : restrictions

Protégé LD
r some C ∃rC
r only C ∀rC
r exactly n C =nrC
r max n C ≤nrC
r min n C ≥nrC

Rôles complexes

Protégé LD
inverse(r) r−
ros r∘s

1.4. Annexe : Protégé 11


Web sémantique, Version 2012

1.4.3 Axiomes dans Protégé-OWL

Protégé offre des axiomes « de haut niveau » qui visent à


— améliorer la lisibilité de la base de connaissance
— optimiser le raisonnement
— contraindre l’utilisation de certains constructeurs à certaines formes d’axiome selon les profils (e.g. Property
Chain)
NB : ces axioms viennent en fait du langage OWL.

Sur les concepts

Protégé LD
Equivalent class(C,D) C ⊑ D et D ⊑ C
Super class(C,D) C⊑D
Member(C,a) C(a)
Disjoint class(C,D) C ⊑ ¬D

Sur les rôles

Protégé LD
Functional(r) ⊤ ⊑ (≤ 1 r)
Inverse functional(r) ⊤ ⊑ (≤ 1 r− )
Transitive(r) r∘r⊑r
Symmetric(r) r ⊑ r−
Asymmetric(r) r ⊑ ¬(r− )
Reflexive(r) ⊤ ⊑ (∃ r self)
Irreflexive(r) ⊤ ⊑ ¬(∃ r self)

Sur les rôles (suite)

Protégé LD
Domain(r,C) ∃r⊑C
Range(r,C) ∃ r− ⊑ C
Equivalent property(r,p) r ⊑ p et p ⊑ r
Super property(r,p) r⊑p
Inverse property(r,p) r ⊑ p− et p− ⊑ r
Disjoint property(r,p) r ⊑ ¬p
Property chain(r,p,q...) p ∘ q ∘ ... ⊑ r

1.5 TP

http://champin.net/2014/iade1-tp-ld/

12 Chapitre 1. Logiques de descriptions


CHAPITRE 2

RDF : Resource Description Framework

author Pierre-Antoine Champin

2.1 Motivation et historique

2.1.1 Le Web vu par Tim Berners-Lee (1989)

« Vague, but exciting »

Fig. 2.1 – source : http://info.cern.ch/images/proposal.gif

2.1.2 Web de ressources

Le web est constitué de ressources :


— chaque ressource est identifiée par un URI (Uniform Resource Identifier), e.g. :
— http://meteo.example.com/lyon
— http://meteo.example.com/ici
— http://commerce.example.com/commande/192837
NB : ressource ̸= fichier !
— chaque ressource a un état qui peut varier dans le temps
— cet état n’est jamais manipulé directement, mais toujours à travers des représentations

13
Web sémantique, Version 2012

Ressources et représentations

— À chaque état d’une ressource peuvent correspondre une ou plusieurs représentation(s) (négociation de
contenu, contexte)
— Toute interaction avec une ressource se fait via des représentation :
consultation, modification, création
représentation : utilisable par :
texte humains, moteurs de recherche
médias (image, son...) surtout humains
données structurées machines

2.1.3 De HTML à XML

XML (eXtensible Markup Language) a été recommandé par le W3C en 1998. L’objectif était de pallier la sémantique
« faible » de HTML.
<!-- HTML -->
<a href="http://champin.net/">
Pierre-Antoine <strong>Champin</strong>
(<em>Maître de conférences</em>)</a>

<!-- XML -->


<Person homepage="http://champin.net/">
<givenName>Pierre-Antoine</givenName>
<surname>Champin</surname>
<job>Maître de conférences</job></Person>

2.1.4 XML et la sémantique

On a dit tout et son contraire l’apport sémantique de XML :


— XML a plus de sémantique que HTML,
— XML a moins de sémantique que HTML,
Les deux ont leur part de vérité.

XML a plus de sémantique que HTML...

... dans le sens ou il est extensible : on eut donc exprimer des choses que HTML ne permet pas d’exprimer
(e.g.‘‘<firstname>‘‘).
— Importance des espaces de noms, qui évitent les collisions de noms et fournissent ainsi une sémantique « struc-
turaliste » (i.e. par différentiation).
<Person xmlns="http://xmlns.com/foaf/0.1/"
xmlns:pro="http://example.com/"
homepage="http://champin.net/">
<givenName>Pierre-Antoine</givenName>
<surname>Champin</surname>
<pro:job>Maître de conférence</pro:job></Person>

14 Chapitre 2. RDF : Resource Description Framework


Web sémantique, Version 2012

XML a moins de sémantique que HTML...

... dans la mesure ou :


— un navigateur standard ne saura pas quoi faire de la balise <firstname> ou de la balise <o𝜈o𝜇𝛼>,
— tout au plus il saura les afficher s’il possède une feuille de style,
— tandis qu’il connaît la sémantique de la balise <em> : elle dénote un texte à mettre en évidence selon les moyens
dont il dispose, par exemple :
— en le mettant en italique (standard)
— en le mettant en gras (police déjà en italique)
— en le mettant en couleurs (police sans italique, terminal)
— en marquant une pause (synthèse vocale)

XML : apports et limitations

Le surplus de sémantique promis par XML n’est donc pas « magique » : il suppose
— de créer de nouveaux langages basés sur XML (DTD, schémas),
— d’écrire les logiciels qui interpréteront ces nouveaux langages,
→ chaque langage reste relativement idiosyncratique.

XML : apports et limitations (suite)

L’apport est donc essentiellement technique : la base commune de XML permet de factoriser les efforts de dévelop-
pement et d’apprentissage :
— analyseurs syntaxiques (parsers),
— langages de schéma (DTD, XML-Schema, Relax-NG...),
— langages de requêtes (XPath, XQuery),
— langages de transformation (XSL-T),
— méthode de signature cryptographique (xmldsig),
— methode de compression (EXI)...

2.1.5 De XML à RDF

— Le modèle sous-jacent de la syntaxe XML est un arbre (XML Infoset), ce qui n’est pas adapté à la structure
décentralisée du Web.
— L’objectif du Resource Description Framework (RDF), recommandé par le W3C en 1999, vise à munir le Web
d’un modèle de données plus adapaté, ayant une structure de graphe.
— L’objectif est de construire le Semantic Web : un web dans lequel les machines ont (enfin) accès à la sémantique
des données.
— Recommandation un peu hâtive, présentant quelques défauts importants (notamment l’absence de sémantique
formelle).
→ faible adoption de RDF

2.1.6 De RDF à RDF

— En 2004, le W3C publie un nouvel ensemble de recommandations sur RDF pour remplacer celles de 1999.
— Pour des raisons de compatibilité avec l’existant, certains aspects sont conservés malgré les débats qu’ils sus-
citent, mais les défauts considérés comme majeurs sont corrigés.
— Après cet échec relatif, l’appellation Semantic Web tombe peu a peu en disgrâce. Certains défenseurs de RDF
parlent plus modestement de Data Web, puis de Web of Linked Data (2006).

2.1. Motivation et historique 15


Web sémantique, Version 2012

Fig. 2.2 – source : http://www.w3.org/RDF/icons/

Syntaxe(s) et sémantique

RDF 2004 définit :


— une syntaxe abstraite (modèle de donnée),
— une sémantique pour interpréter la syntaxe abstraite,
— plusieurs syntaxes concrètes pour représenter/échanger la syntaxe abstraite.

2.2 Syntaxe abstraite

2.2.1 Triplet

Toute information en RDF est représentée par un triplet :


Le laboratoire LIRIS (sujet)
a pour membre (prédicat)
Pierre-Antoine Champin (objet)

Nommage

Les choses sont nommées par des URIs :


http://liris.cnrs.fr/#lab
http://xmlns.com/foaf/0.1/member
http://champin.net/#pa
On peut représenter ceci graphiquement :

http://liris.cnrs.fr/#lab

http://xmlns.com/foaf/0.1/member

http://champin.net/#pa

Remarque

Dans RDF, les URIs ne sont utilisés que comme des identifiants opaques.

16 Chapitre 2. RDF : Resource Description Framework


Web sémantique, Version 2012

Les représentations qui sont éventuellement accessibles via ces URIs (par déréférencement) n’ont aucune influence
sur leur sémantique.
Notons cependant que le mouvement Linked data préconise une utilisation particulière des URIs dans laquelle les
réprésentations doivent être cohérentes avec la sémantique.

2.2.2 Préfixes

Pour simplifier les notations, on définit des préfixes courts correspondant à des préfixes d’URI :
liris : → http://liris.cnrs.fr/#
foaf : → http://xmlns.com/foaf/0.1/
champin : → http://champin.net/#
On utilise ensuite des noms préfixés :
liris :lab foaf :member champin :pa
et également sous forme graphique :

foaf:member
liris:lab champin:pa

2.2.3 Littéraux

On peut également lier une ressource à une donnée typée (chaîne de caractère, entier, réel...), nommée un littéral.
champin :pa foaf :name ”Pierre-Antoine Champin”
Traditionnellement, on représente les littéraux par des nœuds rectangulaires :

foaf:name
champin:pa Pierre-Antoine Champin

2.2.4 Nœuds vierges

Enfin, RDF permet de parler d’une ressource sans connaître son URI. Cela revient en logique à utiliser une variable
quantifiée existentiellement.
(quelque chose) foaf :name ”Alain Mille”
Graphiquement, on représente cette ressource par un nœud vierge (blank node).

foaf:name
Alain Mille

2.2. Syntaxe abstraite 17


Web sémantique, Version 2012

2.2.5 Exemple de graphe

liris:lab

foaf:member rdf:type

foaf:member foaf:Group

foaf:knows foaf:name

champin:pa rdf:type Alain Mille

foaf:name rdf:type

Pierre-Antoine Champin foaf:Person

2.3 Sémantique

2.3.1 Principe général

RDF est muni d’une sémantique en théorie des modèles, ou sémantique dénotationnelle :
— chaque nœud du graphe dénote une ressource (NB : les littéraux sont considéré comme des ressources particu-
lières),
— chaque ressource peut être associée à une relation binaire entre ressources,
— chaque arc signifie que les ressources dénotés par les nœuds vérifient la relation associée à (la ressource dénotée
par) l’URI de l’arc

2.3.2 Inférences

De cette sémantique découlent les inférences que l’ont peut faire sur un graphe RDF (indépendamment de la séman-
tique des URIs utilisés dans ce graphe).
— Par analogie, les seules inférences que l’on puisse faire sur un arbre XML indépendamment des termes utilisés
sont de changer l’ordre des attributs, et de changer les préfixes (si l’on considère les espaces de noms).

Monotonie

Étant donné un graphe, tout sous-graphe en est une conséquence.

18 Chapitre 2. RDF : Resource Description Framework


Web sémantique, Version 2012

liris:lab

foaf:member

champin:pa

rdf:type foaf:name

foaf:Person Pierre-Antoine Champin

Monotonie (suite)

Aucune conclusion que l’on peut tirer d’un graphe RDF ne peut pas être contredite par des informations présentes
ailleurs sur le Web.
→ On est donc toujours en droit de fusionner des graphes RDF, même provenant de sources indépendantes

Anonymisation

Tout nœud peut être remplacé par un nœud vierge :

liris:lab

foaf:member

rdf:type foaf:name

foaf:Person Pierre-Antoine Champin

(rappel : les nœuds vierges s’interpètent comme des variables quantifiées existentiellement)

2.3. Sémantique 19
Web sémantique, Version 2012

Éclatement

Tout nœud vierge peut être éclaté en plusieurs nœuds vierges :

liris:lab

foaf:member

rdf:type foaf:name

foaf:Person Pierre-Antoine Champin

2.3.3 Sémantique additionelle

Bien sûr, des inférences supplémentaires peuvent être faites en prêtant une sémantique particulière aux URIs utilisés
dans le graphe,
— par exemple en décidant qu’une relation binaire est symétrique ou transtitive.
Cependant, cette sémantique devra respecter la sémantique dénotationnelle de RDF ; notamment, les inférences sup-
plémentaires ne devront pas contredire les inférences précédente (monotonie) :
— sans quoi les outils ne connaissant pas cette sémantique particulière tireront des conclusions erronées.

Sémantique additionelle (suite)

On verra plus tard des langages (RDF-Schema, OWL) permettant de définit la sémantique de certains URIs.
Analogie : lorsqu’on définit un format XML, on prête une sémantique particulière aux éléments et attributs de ce
format, mais on ne peut pas prêter de sémantique à l’ordre des attributs ;
— sémantiquement, ce ne serait plus du XML,
— pragmatiquement, les outils standards (analyseur syntaxique, sérialiseurs) ne permettraient pas de contrôler cet
aspect de la syntaxe.

2.4 Syntaxes concrètes

2.4.1 RDF/XML

— première syntaxe recommandée par le W3C (1999)


— basée sur XML
— relativement complexe et verbeuse

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

20 Chapitre 2. RDF : Resource Description Framework


Web sémantique, Version 2012

Valideur http://www.w3.org/RDF/Validator/

RDF/XML : exemple

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/" >
<foaf:Group rdf:about="http://liris.cnrs.fr/#lab">
<foaf:member>
<foaf:Person>
<foaf:name>Alain Mille</foaf:name>
<foaf:knows
rdf:resource="http://champin.net/#pa"/>
</foaf:Person>
</foaf:member>
<foaf:member>
<foaf:Person rdf:about="http://champin.net/#pa">
<foaf:name>Pierre-Antoine Champin</foaf:name>
</foaf:Person>
</foaf:member>
</foaf:Group>
</rdf:RDF>

2.4.2 Turtle : Terse RDF Triple Language

— dérivée du langage N3
— recommandé par le W3C en 2014
— vise la simplicité et la compacité

Syntaxe http://www.w3.org/TR/turtle/

Turtle : exemple

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@prefix champin: <http://champin.net/#> .

liris:lab
a foaf:Group ;
foaf:member champin:pa, _:am .
champin:pa
a foaf:Person ;
foaf:name "Pierre-Antoine Champin" .
_:am
a foaf:Person ;
foaf:name "Alain Mille" ;
foaf:knows champin:pa .

Turtle : exemple 2

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@prefix champin: <http://champin.net/#> .

liris:lab

2.4. Syntaxes concrètes 21


Web sémantique, Version 2012

a foaf:Group ;
foaf:member champin:pa, [
a foaf:Person ;
foaf:name "Alain Mille" ;
foaf:knows champin:pa .
] .
champin:pa
a foaf:Person ;
foaf:name "Pierre-Antoine Champin" .

2.4.3 RDFa : RDF in attributes

RDFa est une utilisation d’attributs (existants ou supplémentaires) de (X)HTML pour y inclure du RDF (à la manière
des micro-formats) :
— facilite la migration de contenus HTML vers RDF
— facilite la maintenance en cohérence de la version HTML et des données RDF (DRY : Don’t Repeat Yourself )

Syntaxe http://www.w3.org/TR/rdfa-primer/
Valideur http://check.rdfa.info/
Distiller http://www.w3.org/2012/pyRdfa/

RDFa : exemple

<p prefix="foaf http://xmlns.com/foaf/0.1/"


about="_:am">
<span property="foaf:name"
>Alain Mille</span>
est membre du
<a rev="foaf:member" href="http://liris.cnrs.fr/#lab"
>LIRIS</a>.
Il connaît
<span rel="foaf:knows" href="http://champin.net/#pa">
<span property="foaf:name"
>Pierre-Antoine Champin</span>,
un autre membre de
<span rev="foaf:member" href="http://liris.cnrs.fr/#lab">
ce laboratoire.</span>
</span> </p>

2.4.4 JSON-LD

— Rappel : JSON est un langage d’échange de données, basé sur Javascript, et très utilisé en développement web.
— JSON-LD (JSON Linked Data) permet d’interpreter une structure JSON comme du RDF,
— grâce à un contexte (implicite ou explicite).
— Objectif : faciliter l’adoption de RDF (syntaxe abstraite) auprès des développeurs d’applications web.

Syntaxe http://www.w3.org/TR/json-ld-syntax/
Valideur http://json-ld.org/playground/

22 Chapitre 2. RDF : Resource Description Framework


Web sémantique, Version 2012

JSON-LD : exemple

{ "@context" : { /* ... */ },
"@id": "http://liris.cnrs.fr/#lab",
"@type": "Group",
"member": [
{
"@id": "http://champin.net/#pa",
"@type": "Person",
"name": "Pierre-Antoine Champin"
},
{
"@type": "Person",
"name": "Alain Mille",
"knows": "http://champin.net/#pa"
}
]
}

2.4.5 Autres syntaxes

— Comme l’illustrent RDFa et JSON-LD, tout langage peut être interprété comme du RDF :
— dialectes en XML (GRDDL)
— microformats (http://http://microformats.org/)
— microdata (http://www.data-vocabulary.org/)
— ← Prépondérance de la syntaxe abstraite.
— Difficulté : faire correspondre des URIs là ou d’autres langages utilisent des termes « locaux ».

2.5 Dataset et requêtes

2.5.1 Dataset

Lorsqu’on stocke des données en RDF, il est parfois nécessaire de distinguer plusieurs graphes.
Un dataset RDF est constitué :
— d’un graphe par défaut,
— d’un ensemble de couples <URI, Graphe>
/!\ aucune relation sémantique imposée entre l’URI et le graphe

2.5.2 SPARQL

SPARQL est un ensemble de recommandations définissant :


— un langage d’interrogation d’un dataset (SPARQL)
— un langage de mise à jour d’un dataset (SPARQL-update ou SPARUL)
— un protocole REST-like pour envoyer des requêtes SPARQL à un dataset

Référence http://w3.org/sparql
Tutoriel http://jena.sourceforge.net/ARQ/Tutorial/

2.5. Dataset et requêtes 23


Web sémantique, Version 2012

SPARQL : exemple 1

« Trouver les membres du LIRIS (URI et nom) que je connaît ».


PREFIX foaf: <http://xmlns.com/foaf/0.1.> #...

SELECT ?p ?n
WHERE {
champin:pa foaf:knows ?p .
liris:lab foaf:member ?p .
?p foaf:name ?n .
}

SPARQL : exemple 2

« Construire l’union des graphes créés par Pierre-Antoine Champin ».


PREFIX dct: <http://purl.org/dc/terms/>

CONSTRUCT { ?s ?p ?o }
WHERE {
?g dct:creator <http://champin.net/#pa> .
GRAPH ?g { ?s ?p ?o }
}

/!\ pré-supposition sur la sémantique des URIs des graphes

SPARUL : exemple

« Remplacer foaf:firstName par foaf:givenName pour tous les membres du LIRIS ».


PREFIX foaf: <http://xmlns.com/foaf/0.1.>

DELETE {
?m foaf:firstName ?n .
}
INSERT {
?m foaf:givenName ?n .
}
WHERE {
<http://liris.cnrs.fr/#lab> foaf:member ?m .
?m foaf:givenName ?n .
}

24 Chapitre 2. RDF : Resource Description Framework


CHAPITRE 3

Vocabulaires et ontologies

author Pierre-Antoine Champin

3.1 Introduction

3.1.1 Motivation

Objectif : expliciter formellement la sémantique des vocabulaires (en conformité avec la sémantique de RDF), afin de
— limiter les problèmes d’ambigüité sur les termes
— permettre leur découverte dynamique
— relations sémantiques internes
— assurer l’interopérabilité
— relations sémantiques avec d’autres vocabulaires

3.1.2 Exemples d’inférences

rdf:type
pa univ:MaîtreDeConférences

|= KB

rdf:type
pa univ:EnseignantChercheur

|= KB

rdf:type
pa foaf:Person

3.1.3 Expression de la sémantique

On souhaite bien sûr exprimer la sémantique des termes en utilisant RDF lui même. Il faut donc définir un méta-
vocabulaire, dont la sémantique soit connue a priori.

25
Web sémantique, Version 2012

— Analogie : XML-Schema est un vocabulaire XML dont la sémantique est connue a priori, et qui permet d’ex-
primer la structure de nouveaux vocabulaires.

3.2 RDF-Schema

3.2.1 Présentation

— RDF-Schema (ou RDF-S) est une recommandation du W3C publiée en même temps que RDF (1999 et révisée
en 2004).
— Il permet d’exprimer une hiérarchie de classes et une hiérarchie de propriétés (relations).
→ hiérarchie au sens large : treillis
— Il permet aussi d’exprimer des contraintes sémantiques sur les propriétés et les classes.
/!\ contrainte sémantique ̸= contrainte d’intégrité
— Le préfixe habituellement associé à ce méta-vocabulaire est rdfs:.

3.2.2 Sémantique

La sémantique de RDF-Schema est construite sur la sémantique de RDF :


— I est la fonction d’interprétation qui associe une ressource à un nœud ;
— I𝑝 est la fonction qui associe une relation binaire à une ressource
On y ajoute une interprétation spécifique des classes :
— I𝑐 associe un ensemble de ressource à une ressource
Enfin, une interprétation conforme à RDF-S doit vérifier un certain nombre de contraintes qui traduisent la sémantique
propre aux termes du méta-vocabulaire.

3.2.3 rdf :type

Contrainte :

(I(𝑟), I(𝐶)) ∈ I𝑝 (I(rdf :type))


≡ I(𝑟) ∈ I𝑐 (I(𝐶))

Exemple :

rdf:type
:pa u:Enseignant

3.2.4 rdfs :subClassOf

Contrainte :

(I(𝐶), I(𝐷)) ∈ I𝑝 (I(rdfs :subClassOf))


→ I𝑐 (I(𝐶)) ⊆ I𝑐 (I(𝐷))

Exemple :

rdf:type rdfs:subClassOf
:pa u:Enseignant foaf:Person

26 Chapitre 3. Vocabulaires et ontologies


Web sémantique, Version 2012

|=

rdf:type
:pa foaf:Person

3.2.5 rdfs :subPropertyOf

Contrainte :
(I(𝑝), I(𝑞)) ∈ I𝑝 (I(rdfs :subPropertyOf))
→ I𝑝 (I(𝑝)) ⊆ I𝑝 (I(𝑞))

Exemple :

rdfs:subPropertyOf
u:travailleAvec foaf:knows

u:travailleAvec
:pa :yp

|=

foaf:knows
:pa :yp

3.2.6 rdfs :domain

Contrainte :
(I(𝑝), I(𝐶)) ∈ I𝑝 (I(rdfs :domain))
∧(𝑟, 𝑠) ∈ I𝑝 (I(𝑝)) → 𝑟 ∈ I𝑐 (I(𝐶))

Exemple :

rdfs:domain
foaf:member foaf:Group

foaf:member
:lab :pa

|=

rdf:type
:lab foaf:Group

3.2. RDF-Schema 27
Web sémantique, Version 2012

3.2.7 rdfs :range

Contrainte :

(I(𝑝), I(𝐶)) ∈ I𝑝 (I(rdfs :range))


∧(𝑟, 𝑠) ∈ I𝑝 (I(𝑝)) → 𝑠 ∈ I𝑐 (I(𝐶))

Exemple :

rdfs:range
foaf:member foaf:Person

foaf:member
:lab :pa

|=

rdf:type
:pa foaf:Person

3.2.8 Documentation

RDF-Schema fournit aussi des termes pour documenter un vocabulaire :


— rdfs:label permet d’associer un libellé textuel à un URI (éventuellement plusieurs, par exemple dans
plusieurs langues) ;
— rdfs:comment permet d’associer un commentaire textuel plus long ;
— rdfs:seeAlso permet de pointer vers une autre ressource.

3.2.9 Méta-modélisation

Rien n’empèche, en RDF-S, d’avoir une classe qui soit elle même une instance d’une autre classe (méta-classe). C’est
d’ailleurs de cette manière que les classes sont identifiées.
rdf:type rdf:type rdf:type
:dumbo :Éléphant :Espèce rdfs:Class

3.2.10 Exemple : FOAF

3.2.11 Contrainte sémantique ̸= contraintes d’intégrité

Les méta-propriétés rdfs:domain et rdfs:range ne servent pas à vérifier qu’un graphe serait « valide ». Il ne
permettent que d’inférer des faits supplémentaires.
— Comme RDF-S n’a pas de négation, ceci n’entraîne jamais d’incohérence formelle au niveau des classes et des
propriétés.
→ en d’autre termes, la sémantique de RDF-S ne permet pas de détecter les incohérences (conceptuelles) que
pourraient entrainer ces inférences.

28 Chapitre 3. Vocabulaires et ontologies


Web sémantique, Version 2012

foaf:knows rdf:type
:JohnDoe :doc1 foaf:Document

3.3 OWL

3.3.1 Présentation

OWL (Web Ontology Language) a été recommandé par le W3C en 2004, et sa version 2 en 2009.
— C’est un méta-vocabulaire (comme RDF-S) inspiré des logiques de descriptions avec valeurs concrètes (litté-
raux).
— Il définit plusieurs profils offrant des compromis différents en terme d’expressivité et de complexité.
— Il mime les capacités de méta-modélisation de RDF-S (punning).

3.3.2 Profils OWL 2

Full aucune contrainte, indécidable


DL minimum de contraintes, décidable mais très complexe
EL quantifications existentielles (EL++), expressivité adaptée à certains domaines (biologie)
QL peut s’implémenter au dessus d’un langage de requêtes (SQL)
RL peut s’implémenter au dessus d’un langage à base de règles (Prolog)

OWL2 Full

OWL2 DL

OWL2 EL OWL2 QL OWL2 RL

3.3. OWL 29
Web sémantique, Version 2012

3.3.3 Axiomes OWL

OWL offre des axiomes « de haut niveau » qui visent à


— améliorer la lisibilité de la base de connaissance
— optimiser le raisonnement
— contraindre l’utilisation de certains constructeurs à certaines formes d’axiome selon les profils (e.g. Property
Chain)

Sur les concepts

OWL LD
rdfs:subClassOf C⊑D
rdf:type C(a)
owl:equivalentClass C ⊑ D et D ⊑ C
owl:disjointWith, owl:AllDisjointClasses C ⊑ ¬D

Sur les rôles

OWL LD
owl:FunctionalProperty ⊤ ⊑ (≤ 1 r)
owl:InverseFunctionalProperty ⊤ ⊑ (≤ 1 r− )
owl:TransitiveProperty r∘r⊑r
owl:SymetricProperty r ⊑ r−
owl:AsymmetricProperty r ⊑ ¬(r− )
owl:ReflexiveProperty ⊤ ⊑ (∃ r self)
owl:IreflexiveProperty ⊤ ⊑ ¬(∃ r self)

Sur les rôles (suite)

OWL LD
rdfs:domain ∃r⊑C
rdfs:range ∃ r− ⊑ C
rdfs:subPropertyOf r⊑p
owl:equivalentProperty r ⊑ p et p ⊑ r
owl:inverseOf r ⊑ p− et p− ⊑ r
owl:propertyDisjointWith, owl:AllDisjointProperties r ⊑ ¬p
owl:propertyChainAxiom p ∘ q ∘ ... ⊑ r

30 Chapitre 3. Vocabulaires et ontologies


Web sémantique, Version 2012

3.3.4 Représentation des LD en RDF

rdf:type owl:onProperty owl:someValuesFrom rdfs:subClassOf

owl:Restriction :Personne

owl:inverseOf owl:unionOf

:enfant

rdf:type rdf:first rdf:rest

rdf:List :Homme

rdf:first rdf:rest

:Femme rdf:nil

∃ enfant− Personne ⊑ Homme ⊔ Femme

3.3. OWL 31
Web sémantique, Version 2012

32 Chapitre 3. Vocabulaires et ontologies


CHAPITRE 4

Publication sur le web sémantique

author Pierre-Antoine Champin

4.1 Web sémantique et sémantique du web

4.1.1 Problème

Comment faire le lien entre


— la sémantique formelle des URIs en RDF/RDF-S/OWL, et
— leur sémantique « opérationnelle » sur le Web ?
→ nécessité d’établir de bonnes pratiques

4.1.2 Les quatres principes du Linked Data

— Utiliser des URIs pour nommer les choses (= ressources).


— Utiliser des URIs HTTP pour pouvoir obtenir des représentations de ces ressources.
— Fournit ces représentation en utilisant des langages et des protocoles standards (RDF, SPARQL).
— Inclure des liens pour permettre de découvrir de nouvelles ressources.
d’après Tim Berners-Lee, http://www.w3.org/DesignIssues/LinkedData.html

Remarques

On ne fait pas mention ici de sémantique, mais...


— un minimum de sémantique (RDF) est indispensable pour l’interopérabilité ;
— les vocabulaires peuvent être formalisés aussi précisément qu’on le veut (RDF-S, OWL).

4.2 Sémantique des URIs HTTP

4.2.1 Problème

— D’après les principes du Linked Data, tout objet d’intérêt devrait avoir un URI déréférenceable (en général
http:)
— y compris une personne, une organisation, un lieu, un concept...
— Or dans la sémantique de HTTP, une ressource est un objet informatique.

33
Web sémantique, Version 2012

→ Ce problème est connu sous le nom httpRange-14

httpRange14

Fig. 4.1 – par Caran d’Ache et Ivan Herman

4.2.2 Solution 1 : identificateurs de fragment

— Un URI peut contenir un identificateur de fragment (fragid), commençant par #


— HTTP ignore les identificateurs de fragments (ils ne sont même pas envoyés au serveur)
— donc la sémantique d’un URI contenant un fragid n’est pas contrainte par HTTP :
— http://champin.net/ ̸= http://champin.net/#pa

Illustration

Fig. 4.2 – source : http://www.jenitennison.com/blog/node/170

Problèmes en suspens

— La sémantique du fragment est normalement spécifiée par le type de contenu, ce qui pose problème notamment
pour la négociation de contenu (types de contenus multiples).
— Dans certains types de contenu, la sémantique du fragment est contrainte :

34 Chapitre 4. Publication sur le web sémantique


Web sémantique, Version 2012

— XML, HTML → sous-arbre de l’arbre DOM


— ce qui pose problème pour RDFa...

4.2.3 Solution 2 : redirection

— Un code de retour 200 OK signifie qu’on a affaire à une ressource au sens de HTTP (information resource)
— Tout autre code n’engage pas HTTP sur la nature de la ressource.
— Si l’URI identifie un autre type de ressource (non information resource), il doit utiliser une redirection via 303
See Also
— ce qui peut impliquer de la négociation de contenu pour s’adapter au client.
— exemple : http://dbpedia.org/resource/Lyon
redirige vers http://dbpedia.org/data/Lyon (RDF)
ou http://dbpedia.org/page/Lyon (HTML)

Illustration

Fig. 4.3 – source : http://www.jenitennison.com/blog/node/170

4.3 Publier des données

4.3.1 Relational mappers

Outils pour exposer une base de données relationnelle en RDF , comme :


— un ensemble de pages RDF,
— un point d’accès SPARQL.
Nécessite une correspondance (mapping) entre les structures relationnelles (tables, colonnes) et la structure de graphe.
standard http://www.w3.org/2001/sw/rdb2rdf/
implémentation http://d2rq.org/

4.3.2 RDFa

— RDFa n’est pas une syntaxe comme les autres, puisqu’elle s’appuie sur HTML et transmet plus d’information
que les triplets RDF
— RDFa peut être utilisé pour annoter du HTML généré manuellement ou automatiquement (CMS, Wiki, Blog...)
Exemple : Drupal

4.3. Publier des données 35


Web sémantique, Version 2012

4.3.3 Wiki sémantique

— Principe : apporter
— syntaxe simplifiée
— ajout facile de contenu et de liens
— travail collaboratif
— formalisation incrémentale
— Plusieurs propositions
— Semantic MediaWiki
— Kiwi

36 Chapitre 4. Publication sur le web sémantique


CHAPITRE 5

Articles

— On Directly Mapping Relational Databases to RDF and OWL. Juan Sequeda, Marcelo Arenas, Daniel Miran-
ker. WWW 2012.
— Template-based Question Answering Over RDF Data. Christina Unger, Lorenz Bühmann, Jens Lehmann,
Axel-Cyrille Ngonga Ngomo, Daniel Gerber, Philipp Cimiano. WWW 2012.
— Holistic and Scalable Ontology Alignment for Linked Open Data. Toni Gruetze , Christoph Böhm , Felix
Naumann. LDOW 2012.
— OWL : Yet to arrive on the Web of Data ?. Birte Glimm , Aidan Hogan , Markus Krötzsch , Axel Polleres.
LDOW 2012.
— Concept-Based Semantic Difference in Expressive Description Logics. Rafael S. Gonçalves, Bijan Parsia and
Ulrike Sattler. ISWC 2012.
— Hybrid SPARQL Queries : Fresh vs. Fast Results. Jürgen Umbrich, Marcel Karnstedt, Aidan Hogan and Josiane
Xavier Parreira. ISWC 2012.
— Ontology Constraints in Incomplete and Complete Data. Peter Patel-Schneider and Enrico Franconi. ISWC
2012.
— SRBench : A Streaming RDF/SPARQL Benchmark. Ying Zhang, Minh-Duc Pham, Oscar Corcho and Jean
Paul Calbimonte ISWC 2012.
— A publishing pipeline for Linked Government Data. Fadi Maali, Richard Cyganiak and Vassilios Peristeras.
ESWC 2012.
— Graph Kernels for RDF data. Uta Lösch, Stephan Bloehdorn and Achim Rettinger. ESWC 2012
— Preserving Information Content in RDF using Bounded Homomorphisms. Audun Stolpe and Martin G. Skjæ-
veland. ESWC 2012
— Exchange and Consumption of Huge RDF Data. Miguel A. Martinez-Prieto, Mario Arias Gallego and Javier
D. Fernández. ESWC 2012

37

Vous aimerez peut-être aussi