Index
Index
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
3 Vocabulaires et ontologies 25
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 RDF-Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 OWL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5 Articles 37
i
ii
CHAPITRE 1
Logiques de descriptions
1.1 Historique
1.1.1 Logique
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
— Réseaux sémantiques
— représentation graphique
— Frames (Minsky)
— approche « objet »
— stéréotypes
1
Web sémantique, Version 2012
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
1.2.2 Exemples
1.2.3 Axiomes
Axiomes : exemples
— Crétois ⊑ Menteur
— ami ⊑ connait
— ¬Menteur
— Homme ⊔ Voiture
— Crétois ⊓ Menteur
— Voiture ⊓ (Rouge ⊔ ¬Ferrari)
— {john, paul, george, ringo}
∃ r , ∀ r , = 1 r ...
Restrictions : exemples
— ∃ enfant
— ∀ conduit Ferrari
— (∃ conduit) ⊓ (∀ conduit Ferrari)
— = 2 conduit Ferrari
— ≥ 2 connait (Crétois ⊓ Menteur)
Exemples
— conduit−
— connait ∘ conduit
— connait ∘ connait
— ∃ conduit ⊑ Adulte
— ∃ conduit− ⊑ Voiture
— Personne ⊑ Adulte ⊔ Enfant
— Personne ⊑ (= 1 père Homme) ⊓ (= 1 mère Femme)
— Personne ⊑ ¬Voiture
1.3 Raisonnement
1.3.1 Rappels
— Interprétation de F
— domaine du discours
— 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.3 Exemple
1.3. Raisonnement 5
Web sémantique, Version 2012
1.3. Raisonnement 7
Web sémantique, Version 2012
1.3. Raisonnement 9
Web sémantique, Version 2012
1.3.4 Enjeux
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
1.4.1 Installation
Protégé LD
Thing ⊤
Nothing ⊥
C and D C⊓D
C or D C⊔D
not C ¬C
{a} {a}
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
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
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)
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/
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
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>
... 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>
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.
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)...
— 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
— 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).
Syntaxe(s) et sémantique
2.2.1 Triplet
Nommage
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.
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
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
liris:lab
foaf:member rdf:type
foaf:member foaf:Group
foaf:knows foaf:name
foaf:name rdf:type
2.3 Sémantique
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
liris:lab
foaf:member
champin:pa
rdf:type foaf:name
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
liris:lab
foaf:member
rdf:type foaf:name
(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
liris:lab
foaf:member
rdf:type foaf:name
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.
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.1 RDF/XML
Syntaxe http://www.w3.org/TR/rdf-syntax-grammar/
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>
— 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
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
liris:lab
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" .
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
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/
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"
}
]
}
— 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.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
Référence http://w3.org/sparql
Tutoriel http://jena.sourceforge.net/ARQ/Tutorial/
SPARQL : exemple 1
SELECT ?p ?n
WHERE {
champin:pa foaf:knows ?p .
liris:lab foaf:member ?p .
?p foaf:name ?n .
}
SPARQL : exemple 2
CONSTRUCT { ?s ?p ?o }
WHERE {
?g dct:creator <http://champin.net/#pa> .
GRAPH ?g { ?s ?p ?o }
}
SPARUL : exemple
DELETE {
?m foaf:firstName ?n .
}
INSERT {
?m foaf:givenName ?n .
}
WHERE {
<http://liris.cnrs.fr/#lab> foaf:member ?m .
?m foaf:givenName ?n .
}
Vocabulaires et ontologies
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
rdf:type
pa univ:MaîtreDeConférences
|= KB
rdf:type
pa univ:EnseignantChercheur
|= KB
rdf:type
pa foaf:Person
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
Contrainte :
Exemple :
rdf:type
:pa u:Enseignant
Contrainte :
Exemple :
rdf:type rdfs:subClassOf
:pa u:Enseignant foaf:Person
|=
rdf:type
:pa foaf:Person
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
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
Contrainte :
Exemple :
rdfs:range
foaf:member foaf:Person
foaf:member
:lab :pa
|=
rdf:type
:pa foaf:Person
3.2.8 Documentation
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
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.
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).
OWL2 Full
OWL2 DL
3.3. OWL 29
Web sémantique, Version 2012
OWL LD
rdfs:subClassOf C⊑D
rdf:type C(a)
owl:equivalentClass C ⊑ D et D ⊑ C
owl:disjointWith, owl:AllDisjointClasses C ⊑ ¬D
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)
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
owl:Restriction :Personne
owl:inverseOf owl:unionOf
:enfant
rdf:List :Homme
rdf:first rdf:rest
:Femme rdf:nil
3.3. OWL 31
Web sémantique, Version 2012
4.1.1 Problème
Remarques
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
httpRange14
Illustration
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 :
— 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
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
— Principe : apporter
— syntaxe simplifiée
— ajout facile de contenu et de liens
— travail collaboratif
— formalisation incrémentale
— Plusieurs propositions
— Semantic MediaWiki
— Kiwi
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