Upload
sfeir
View
86
Download
2
Embed Size (px)
Citation preview
Introduction à SPARQL
PhD Lynda [email protected] sfeir depuis 10 février 2014
Qu’est ce que le Web sémantique ?
Quel pays a produit le plus
grand nombre
d’écrivains ?
Qui peut répondre à cette requête ?
■ Google ? (recherche par mots clés)
■ Wikipedia ? (recherche pour les humains)
■ Web semantique ? DBpedia: version sémantique de
wikipedia
Version HTML de Wikipedia pour les humains
Version RDF de dbpedia pour les machines
SPARQL au coeur du web Sémantique
Le Web Sémantique mentionné par Tim Berners-Lee en 1994 à WWW
Passer du web des liens entre des pages peu compréhensibles par les machines à ...
un web de choses reliées à la réalité et compréhensibles par les machines
Ce qu’il faut faire :
Identifier / Expliciter
In front of
behind In front of
Comment ?
Utiliser une
ontology partagée
Que nous pouvons comprendre
Que la machine peut interpréter
Slide extrait d’une représetation de Fabien Gondon
Définition de l’ontologie
Concept / termes / intention / extension
Relation de subsemption : C is a B
Voiture
Voiture2 roues motrices
Voiture4 roues motrices
VoitureEssence
VoitureHybride
ZOE
Personne
Adulte
VoitureElectrique
part of
is a
is ais a
is a
is a
is ais a
Marie ZOEmate xyz
appartient
is a
is a
Moteur
is a
Moyende transport
is a
Femme
is a
is a
Comment faire concrètement ?
Les Technologies du Web Sémantique
Représentation
RequêteRaisonnement
Confiance
RDFS signifie RDF Schema
RDFS pour la hiérarchie de classes et de relations
rdfs:Class
rdfs:subClassOf
Person
Woman Man
rdf:Property
rdfs:subPropertyOf
parentOf
motherOf fatherOf
rdfs:domainrdfs:range
Woman PersonmotherOf
Ontology Web Language (OWL)
OWL en un
Slide extrait d’une représetation de Fabien Gondon
Couche de représentation
RDF
Resource: entreprises, livres, personnes,
programmes, média, services, idées…Description: attributs, qualités, et
des relations entre les ressources
Framework: modèle, langages et
syntaxes pour ces descriptions
RDF : un modèle de triplets
( sujet , predicat, objet )
Structure d’une phrase simple
ex:
Lynda Temal worksFor Sfeir
( sujet , verbe, complément )
(Temal, worksFor, Sfeir)
URI : Uniforme Resource Identifier
Triplet RDF.
Temal worksFor Sfeir
http://home.sfeir.com/sw#temal
http://schema.org/worksFor
http://home.sfeir.com/sw#sfeir
Prefix in turtle format
@prefix sfeir: <http://home.sfeir.com/sw#> .@prefix sch: <http://schema.org/> .@prefix foaf: <http://xmlns.com/foaf/0.1/> .@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
sfeir:Temal sch:worksFor sfeir:Sfeir;
foaf:givenName "Lynda"^^xsd:String;
foaf:familyName "Temal"^^xsd:String.
N-Triples
<http://home.sfeir.com/sw#Temal>
<http://schema.org/worksFor>
<http://home.sfeir.com/sw#Sfeir>.
<http://home.sfeir.com/sw#Temal>
<http://xmlns.com/foaf/0.1/givenName>
"Lynda"^^<http://www.w3.org/2001/XMLSchema#String>.
<http://home.sfeir.com/sw#Temal>
<http://xmlns.com/foaf/0.1/familyName>
"Temal"^^<http://www.w3.org/2001/XMLSchema#String>.
RDF/XML format
<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:sch="http://schema.org"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<rdf:Description rdf:about="http://home.sfeir.com/sw#Temal">
<sch:worksFor rdf:resource="http://home.sfeir.com/sw#Sfeir"/>
<foaf:givenName rdf:datatype="http://www.w3.org/2001/XMLSchema#String>Lynda</foaf:givenName>
<foaf:familyName rdf:datatype="http://www.w3.org/2001/XMLSchema#String>Temal</foaf:familyName>
</rdf:Description>
</rdf:RDF>
sfeir:Temal
sfeir:SFEIR
sch:worksFor
foaf:givenName
Lynda(xsd:string)
Temal(xsd:string)
foaf:familyName
dbr:Neuilly-sur-Seine
sch:location
dbr:France
dbo:country
dbr:Paris
dbo:capital
freebase:Paris
geo:2968815
owl:sameAs
Exemple from scrach
D’une vue tabulaire vers une vue en graphe
ID Prénom Nom titre Techno client genre role
Temal Lynda Temal developerjava, Web Semantique QuickSign F
Louvet Céline Louvet developerjava, maven appEngine
société générale F teamLeadr
Garnotel Goeffrey Garnotel developerjava, solr dataFlow
M6M techLead
@prefix sfeir: <http://home.sfeir.com/sw#>
@prefix foaf: <http://xmlns.com/foaf/0.1/>
@prefix sch: <http://schema.org>
sfeir:temal foaf:givenName "Lynda";
foaf:familyName "Temal";
foaf:gender "female";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "QuickSign";
sfeir:hasSkill "java" , "web semantique".
sfeir:garnotel foaf:givenName "Geoffrey" ;
foaf:familyName "Garnotel";
foaf:gender "male";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "M6";
sfeir:hasSkill "java", "DataFlow", "Solr";
sfeir:playesRole "teamLeader" .
sfeir:louvet foaf:givenName "Céline";
foaf:familyName "Louvet";
foaf:gender "female" ;
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:hasSkill "java", "AppEngine", "maven";
sfeir:involvedInMissionnAt "Societe Generale";
sfeir:playesRole "techLead" .
D’une vue tabulaire vers une vue en graphe
@prefix sfeir: <http://home.sfeir.com/sw#>
@prefix foaf: <http://xmlns.com/foaf/0.1/>
@prefix sch: <http://schema.org>
sfeir:temal foaf:givenName "Lynda";
foaf:familyName "Temal";
foaf:gender "female";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "QuickSign";
sfeir:hasSkill "java" , "web semantique".
sfeir:garnotel foaf:givenName "Geoffrey" ;
foaf:familyName "Garnotel";
foaf:gender "male";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "M6";
sfeir:hasSkill "java", "DataFlow", "Solr";
sfeir:playesRole "teamLeader" .
sfeir:louvet foaf:givenName "Céline";
foaf:familyName "Louvet";
foaf:gender "female" ;
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:hasSkill "java", "AppEngine", "maven";
sfeir:involvedInMissionnAt "Societe Generale";
sfeir:playesRole "techLead" .
D’une vue tabulaire vers une vue en graphe
@prefix sfeir: <http://home.sfeir.com/sw#>
@prefix foaf: <http://xmlns.com/foaf/0.1/>
@prefix sch: <http://schema.org>
sfeir:temal foaf:givenName "Lynda";
foaf:familyName "Temal";
foaf:gender "female";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "QuickSign";
sfeir:hasSkill "java" , "web semantique".
sfeir:garnotel foaf:givenName "Geoffrey" ;
foaf:familyName "Garnotel";
foaf:gender "male";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "M6";
sfeir:hasSkill "java", "DataFlow", "Solr";
sfeir:playesRole "teamLeader" .
sfeir:louvet foaf:givenName "Céline";
foaf:familyName "Louvet";
foaf:gender "female" ;
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:hasSkill "java", "AppEngine", "maven";
sfeir:involvedInMissionnAt "Societe Generale";
sfeir:playesRole "techLead" .
D’une vue tabulaire vers une vue en graphe
@prefix sfeir: <http://home.sfeir.com/sw#>
@prefix foaf: <http://xmlns.com/foaf/0.1/>
@prefix sch: <http://schema.org>
sfeir:temal foaf:givenName "Lynda";
foaf:familyName "Temal";
foaf:gender "female";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "QuickSign";
sfeir:hasSkill "java", "web semantique".
sfeir:garnotel foaf:givenName "Geoffrey" ;
foaf:familyName "Garnotel";
foaf:gender "male";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "M6";
sfeir:hasSkill "java", "DataFlow", "Solr";
sfeir:playesRole "teamLeader" .
sfeir:louvet foaf:givenName "Céline";
foaf:familyName "Louvet";
foaf:gender "female" ;
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "Societe Generale";
sfeir:hasSkill "java", "AppEngine", "maven";
sfeir:playesRole "techLead" .
D’une vue tabulaire vers une vue en graphe
@prefix sfeir: <http://home.sfeir.com/sw#>
@prefix foaf: <http://xmlns.com/foaf/0.1/>
@prefix sch: <http://schema.org>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
sfeir:temal rdf:type foaf:Person;
foaf:givenName "Lynda";
foaf:familyName "Temal";
foaf:gender "female";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "QuickSign";
sfeir:hasSkill "java" , "web semantique".
sfeir:garnotel rdf:type foaf:Person;
foaf:givenName "Geoffrey" ;
foaf:familyName "Garnotel";
foaf:gender "male";
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "M6";
sfeir:hasSkill "java", "DataFlow", "Solr".
sfeir:louvet rdf:type foaf:Person;
foaf:givenName "Céline";
foaf:familyName "Louvet";
foaf:gender "female" ;
sch:jobTitle "developer";
sch:worksFor sfeir:Sfeir;
sfeir:involvedInMissionnAt "Societe Generale".
D’une vue tabulaire vers une vue en graphe
SPARQL
SPARQL Protocol and RDF Query Language
SPARQL en trois parties
1. Un langage de requêtes
2. Un format de résultats
3. Un protocole d’accès
SPARQL : langage de requêtes
Prefix
Select ...
From ...
Where {...}
WHERE
SELECT
Fuseki pour manipuler SPARQL
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?person
WHERE {
?person rdf:type foaf:Person.
}
------------------| person |=================| sfeir:louvet || sfeir:temal |
| sfeir:garnotel | ------------------
foaf:Person
?person
rdf:type
Qui sont les persons ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?person ?prenom
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
}
-------------------------------| person | prenom |===============================| sfeir:louvet | "Céline" || sfeir:temal | "Lynda" || sfeir:garnotel | "Geoffrey" |-------------------------------
foaf:Person
?person
rdf:type
?prenom
foaf:givenName
Quel est leur prenom ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?person ?prenom ?nom
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
}
--------------------------------------------| person | prenom | nom |============================================| sfeir:louvet | "Céline" | "Louvet" || sfeir:temal | "Lynda" | "Temal" || sfeir:garnotel | "Geoffrey" | "Garnotel" |--------------------------------------------
foaf:Person
?person
rdf:type
?prenom
foaf:givenName
?nom
foaf:familyName
Quel est leur nom ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?person ?prenom ?nom ?competence
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
?person sfeir:hasSkill ?competence.
}
Quel sont leurs compétences ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?nom ?prenom ?role
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
?person sfeir:playesRole ?role.
}
Quel sont leurs rôles ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?nom ?prenom ?role
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
OPTIONAL {?person sfeir:playesRole ?role.}
}
OPTIONAL : quel sont leurs rôle s’il existe ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?nom ?prenom
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
NOT EXISTS {?person sfeir:playesRole ?role.}
}
--------------------------| nom | prenom |===============| "Temal" | "Lynda" |--------------------------
NOT EXISTS: qui n’a pas de rôle ?
@prefix sfeir: <http://home.sfeir.com/sw#>
@prefix sch: <http://schema.org>
@prefix foaf: <http://xmlns.com/foaf/0.1/>
sfeir:temal rdf:type foaf:Person;
foaf:givenName "Lynda";
foaf:familyName "Temal";
foaf:gender "female";
sch:jobTitle "developer";
sfeir:involvedInMissionnAt "QuickSign";
sfeir:hasSkill "java" , "web semantique";
sfeir:hireDate "2014-02-10".
sfeir:garnotel rdf:type foaf:Person;
foaf:givenName "Geoffrey" ;
foaf:familyName "Garnotel";
foaf:gender "male";
sch:jobTitle "developer";
sfeir:involvedInMissionnAt "M6";
sfeir:hasSkill "java", "DataFlow", "Solr";
sfeir:playesRole "teamLeader" ;
sfeir:hireDate "2006-10-25".
sfeir:louvet df:type foaf:Person;
foaf:givenName "Céline";
foaf:familyName "Louvet";
foaf:gender "female" ;
sch:jobTitle "developer";
sfeir:hasSkill "java", "AppEngine", "maven";
sfeir:involvedInMissionnAt "Societe Generale";
sfeir:playesRole "techLead" ;
sfeir:hireDate "2011-04-17".
Ajouter la date de recrutement
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?nom ?prenom ?date
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
?person sfeir:hireDate ?date.
FILTER (?date <= "2013-01-01")
}
FILTER : qui était déjà là en 2013 ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?nom ?prenom ?date
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
BIND("some values" As ?aVariable)
}
BIND
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?nom ?prenom ?nomPrenom
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
BIND(concat(?nom, " ", ?prenom) As ?nomPrenom)
}
BIND : concatener Nom & Prenom
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT {?person foaf:name ?nomPrenom}
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
BIND(concat(?nom, " ", ?prenom) As ?nomPrenom)
}
@prefix foaf: <http://xmlns.com/foaf/0.1/> .@prefix sfeir: <http://home.sfeir.com/sw#> .
sfeir:temal foaf:name "Temal Lynda" .sfeir:louvet foaf:name "Louvet Céline" .sfeir:garnotel foaf:name "Garnotel Geoffrey" .
CONSTRUCT : full name
PREFIX sfeir: <http://home.sfeir.com/sw#> PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX sch: <http://schema.org/>
CONSTRUCT {
?person rdf:type sch:Person.
?person sch:name ?nomPrenom.
?person sch:givenName ?prenom.
?person sch:familyName ?nom.
?person sch:gender ?gender.
}
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?prenom.
?person foaf:familyName ?nom.
?person foaf:gender ?gender.
BIND(concat(?nom, " ", ?prenom) As ?nomPrenom)
}
CONSTRUCT : foaf ⇒ schema.org
@prefix sch: <http://schema.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix sfeir: <http://home.sfeir.com/sw#> .
sfeir:temal a sch:Person ;
sch:familyName "Temal" ;
sch:gender "female" ;
sch:givenName "Lynda" ;
sch:name "Temal Lynda" .
sfeir:louvet a sch:Person ;
sch:familyName "Louvet" ;
sch:gender "female" ;
sch:givenName "Céline" ;
sch:name "Louvet Céline" .
sfeir:garnotel a sch:Person ;
sch:familyName "Garnotel" ;
sch:gender "male" ;
sch:givenName "Geoffrey" ;
sch:name "Garnotel Geoffrey" .
Résultat du Construct
PREFIX sfeir: <http://home.sfeir.com/sw#>
ASK { ?x sfeir:hasSkill "Solr" } yes
ASK { ?x sfeir:hasSkill "Solr", "java" }
ASK { ?x sfeir:hasSkill "Solr","java", "web semantique"}
ASK { ?x sfeir:hasSkill "java" , "web semantique"}
yes
yes
No
Ask : Avons nous ces compétences ?
@prefix sfeir: <http://home.sfeir.com/sw#> @prefix sch: <http://schema.org/> @prefix foaf: <http://xmlns.com/foaf/0.1/>
sfeir:temal rdf:type foaf:Person;foaf:givenName "Lynda";foaf:familyName "Temal";foaf:gender "female";sch:jobTitle "developer";sfeir:involvedInMissionnAt "QuickSign";sfeir:hasSkill "java" , "web semantique";sfeir:hireDate "2014-02-10".
sfeir:garnotel rdf:type foaf:Person;foaf:givenName "Geoffrey" ;foaf:familyName "Garnotel";foaf:gender "male";sch:jobTitle "developer";sfeir:involvedInMissionnAt "M6";sfeir:hasSkill "java", "DataFlow", "Solr";sfeir:playesRole "teamLeader" ;sfeir:hireDate "2006-10-25".
sfeir:louvet df:type foaf:Person;foaf:givenName "Céline";foaf:familyName "Louvet";foaf:gender "female" ;sch:jobTitle "developer";sfeir:hasSkill "java", "AppEngine", "maven";sfeir:involvedInMissionnAt "Societe Generale";sfeir:playesRole "techLead" ;sfeir:hireDate "2011-04-17".
Graphe mais pas vraiment lié
GET in the Linked Open Data
Évolution du Linked Open Data
Août 2014
DBpedia
Linked Open Data
Apache Solr dans dbpedia
@prefix sfeir: <http://home.sfeir.com/sw#> .@prefix sch: <http://schema.org/> .@prefix foaf: <http://xmlns.com/foaf/0.1/>.prefix dbpedia: <http://dbpedia.org/resource/>.
sfeir:garnotel foaf:givenName "Geoffrey" ;
foaf:familyName "Garnotel";
foaf:gender "male";
sch:jobTitle "developer";
sfeir:involvedInMissionnAt dbpedia:M6_(TV_channel);
sfeir:hasSkill dbpedia:Java_(programming_language);
sfeir:hasSkill "DataFlow" ;
sfeir:hasSkill dbpedia:Apache_Solr;
sfeir:playesRole "teamLeader" .
sfeir:louvet rdf:type foaf:Person.
sfeir:louvet foaf:givenName "Céline";
foaf:familyName "Louvet";
foaf:gender "female" ;
sch:jobTitle "developper";
sfeir:hasSkill dbpedia:Java_(programming_language);
sfeir:hasSkill dbpedia:Google_App_Engine;
sfeir:hasSkill dbpedia:Apache_Maven;
sfeir:involvedInMissionnAt dbpedia:Société_générale;
sfeir:playesRole "techLead".
Lien vers dbpedia
PREFIX sfeir: <http://home.sfeir.com/sw#> PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX dbr: <http://dbpedia.org/resource/>PREFIX dbpo: <http://dbpedia.org/ontology/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?person ?name ?label ?genre
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?name.
?person sfeir:hasSkill dbr:Apache_Solr.
SERVICE <http://Dbpedia.org/sparql>{
dbr:Apache_Solr rdfs:label ?label;
dbpo:genre ?genre.
FILTER(lang(?label)="en").
}
}
Qui connait solr, quel est sont label et genre ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbpo: <http://dbpedia.org/ontology/>
SELECT ?person ?name ?skill ?skillName ?genre
WHERE {
?person rdf:type foaf:Person.
?person foaf:givenName ?name.
?person sfeir:hasSkill ?skill.
SERVICE <http://Dbpedia.org/sparql>{
?skill dbpo:genre ?genre.
?skill foaf:name ?skillName.
}
}
Qui a les compétences avec name et genre ?
PREFIX sfeir: <http://home.sfeir.com/sw#> PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX dbr: <http://dbpedia.org/resource/>PREFIX dbpo: <http://dbpedia.org/ontology/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Select ?name ?skill ?label ?skillName ?genreWHERE{
?person rdf:type foaf:Person. ?person foaf:givenName ?name. ?person sfeir:hasSkill ?skill.
SERVICE <http://Dbpedia.org/sparql>{ OPTIONAL{?skill rdfs:label ?label.} OPTIONAL{?skill foaf:name ?skillName.} OPTIONAL{?skill dbpo:genre ?genre.} FILTER (lang(?label) = 'fr' && lang(?skillName) = 'en').
}}
OPTIONAL : Encore plus d’info compétences
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?skillName ?sameSkillURI
WHERE{
?person rdf:type foaf:Person.
?person foaf:givenName ?name.
?person sfeir:hasSkill ?skill.
SERVICE <http://Dbpedia.org/sparql>{
OPTIONAL{?skill rdfs:label ?label.}
OPTIONAL{?skill foaf:name ?skillName.}
OPTIONAL{?skill owl:sameAs ?sameSkillURI.}
FILTER (lang(?label) = 'fr')
FILTER (lang(?skillName) = 'en')
}
}
owl:sameAs : encore plus de resources
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
INSERT{ ?man a sfeir:Man.
?woman a sfeir:Woman.
}
WHERE {
?man foaf:gender "male".
?woman foaf:gender "female".
}
PREFIX sfeir: <http://home.sfeir.com/sw#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA{sfeir:Woman a rdfs:Class.sfeir:Woman rdfs:subClassOf foaf:Person.sfeir:Man a rdfs:Class.sfeir:Man rdfs:subClassOf foaf:Person.
}
Person
Woman Man
Enrichir le vocabulaire: Man vs Woman ?
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sch: <http://schema.org>
INSERT{
?person1 sfeir:colleague ?person2.
}
WHERE {
?person1 sch:worksFor ?organisation.
?person2 sch:worksFor ?organisation.
FILTER (?person1 != ?person2)
}
PREFIX sfeir: <http://home.sfeir.com/sw#> PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX owl: <http://www.w3.org/2002/07/owl#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT DATA{sfeir:colleague a owl:SymmetricProperty;
rdfs:domain foaf:Person;rdfs:range foaf:Person;
}
Enrichir le vocabulaire: qui sont mes collègues ?
colleague
owl:ObjectProperty
owl:SymmetricProperty
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX sch: <http://schema.org>
SELECT *
WHERE{
?person1 sfeir:colleague ?person2.
} order by ?person1 ?person2
PREFIX sfeir: <http://home.sfeir.com/sw#> PREFIX dbr: <http://dbpedia.org/resource/>
DELETE DATA {
sfeir:garnotel sfeir:hasSkill dbr:JavaScript.
}
Supprimer les données erronées
PREFIX sfeir: <http://home.sfeir.com/sw#> PREFIX dbr: <http://dbpedia.org/resource/>
SELECT *
WHERE{
sfeir:garnotel ?p ?o.
}
Enrichir le vocabulaire: décrire les Soirées Sfeir
soirée presentation date
Louvet NoSQL Google datastore and search 16/12/2014
Garnotel I love My Data Moteur de recherche 11/02/2015
Garnotel Data Manipulation Dataflow 03/12/2015
Temal I love My Data Introduction au web semantique 11/02/2015
Temal Web Semantique Introduction à SPARQL 17/02/2016
Orpeliere Web Semantique Introducation à Stardog 17/02/2016
Ontology pour décrire les évènements
http://purl.org/NET/c4dm/event.owl#
Définir l’ontologie pour les soirées sfeir
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
sfeir:SoireeSfeir a rdfs:Class.
sfeir:SoireeSfeir rdfs:subClassOf evt:Event.
Event
SoireeSfeir
Définir l’ontologie pour les soirées sfeir
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
sfeir:SoireeSfeir a rdfs:Class.
sfeir:SoireeSfeir rdfs:subClassOf evt:Event.
sfeir:Presentation a rdfs:Class.
sfeir:Presentation rdfs:subClassOf evt:Event.
Event
SoireeSfeir Presentation
Définir l’ontologie pour les soirées sfeir
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
sfeir:SoireeSfeir a rdfs:Class.
sfeir:SoireeSfeir rdfs:subClassOf evt:Event.
sfeir:Presentation a rdfs:Class.
sfeir:Presentation rdfs:subClassOf evt:Event.
sfeir:SoireeSfeir evt:hasSubEvent sfeir:Presentation.
Event
SoireeSfeir Presentation
hasSubEvent
Définir l’ontologie pour les soirées sfeir
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT DATA{
sfeir:SoireeSfeir a rdfs:Class.
sfeir:SoireeSfeir rdfs:subClassOf evt:Event.
sfeir:Presentation a rdfs:Class.
sfeir:Presentation rdfs:subClassOf evt:Event.
sfeir:SoireeSfeir evt:hasSubEvent sfeir:Presentation.
}
Event
SoireeSfeir Presentation
hasSubEvent
Décrire une soirée sfeir : I Love My DataPREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
INSERT DATA{
GRAPH sfeir:soireeSfeir{
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-17T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Moteur de recherche"@fr ;
foaf:agent sfeir:garnotel .
sfeir:IntoductionWebSemantiquePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Introduction au Web Sémantique"@fr ;
foaf:agent sfeir:temal.
}
}
Décrire une soirée sfeir : I Love My DataPPREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
Décrire une soirée sfeir : I Love My DataPREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
Décrire une soirée sfeir : I Love My Data
Décrire une soirée sfeir : I Love My DataPREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Moteur de recherche"@fr ;
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Moteur de recherche"@fr ;
foaf:agent sfeir:garnotel .
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Moteur de recherche"@fr ;
foaf:agent sfeir:garnotel .
sfeir:IntoductionWebSemantiquePresentation
rdf:type sfeir:Presentation ;
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Moteur de recherche"@fr ;
foaf:agent sfeir:garnotel .
sfeir:IntoductionWebSemantiquePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Introduction au Web Sémantique"@fr ;
foaf:agent sfeir:temal.
}
}
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
INSERT DATA{
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Moteur de recherche"@fr ;
foaf:agent sfeir:garnotel .
sfeir:IntoductionWebSemantiquePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Introduction au Web Sémantique"@fr ;
foaf:agent sfeir:temal.
}
Décrire une soirée sfeir : I Love My Data
PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
INSERT DATA{
GRAPH sfeir:soireeSfeir{
sfeir:ILoveMyDataEvent a sfeir:SoireeSfeir ;
rdfs:label "I Love My Data"@en ;
evt:hasSubEvent sfeir:MoteurDeRecherchePresentation ;
evt:hasSubEvent sfeir:IntroductionWebSemantiquePresentation ;
evt:place sfeir:SalleReunion1Sfeir ;
evt:time _:b0 .
_:b0 rdf:type tl:Interval ;
tl:at "2015-02-11T07:00:00"^^xsd:dateTime ;
tl:duration "PT3H"^^xsd:duration .
sfeir:MoteurDeRecherchePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Moteur de recherche"@fr ;
foaf:agent sfeir:garnotel .
sfeir:IntoductionWebSemantiquePresentation
rdf:type sfeir:Presentation ;
rdfs:label "Introduction au Web Sémantique"@fr ;
foaf:agent sfeir:temal.
}
}
Décrire une soirée sfeir : I Love My Data
Quelle soirée, qui présente quoi et quand ?PREFIX sfeir: <http://home.sfeir.com/sw#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX evt: <http://purl.org/NET/c4dm/event.owl#>
PREFIX tl: <http://purl.org/NET/c4dm/timeline.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?labelSoiree ?labelPresentation ?date ?agent ?graph
WHERE {
GRAPH ?graph {
?soiree rdf:type sfeir:SoireeSfeir;
rdfs:label ?labelSoiree;
evt:hasSubEvent ?presentation;
evt:time ?time.
?time tl:at ?date.
?presentation rdfs:label ?labelPresentation.
?presentation foaf:agent ?agent.
}
}
PREFIX imdb: <http://data.linkedmdb.org/resource/movie/>PREFIX dcterms: <http://purl.org/dc/terms/>PREFIX dbo: <http://dbpedia.org/ontology/>PREFIX dbp: <http://dbpedia.org/property/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX dbr: <http://dbpedia.org/resource/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?birthDate ?birthPlace ?husbandName ?movieTitle ?movieDate {
{ SERVICE <http://dbpedia.org/sparql>{
dbr:Angelina_Jolie dbo:birthDate ?birthDate ;
dbp:birthPlace ?birthPlace.
?husbandURI dbo:spouse dbr:Angelina_Jolie;
rdfs:label ?husbandName.
Filter (lang (?husbandName) = "en")
}}
{ SERVICE <http://data.linkedmdb.org/sparql>{
?actor imdb:actor_name "Angelina Jolie".
?movie imdb:actor ?actor ;
dcterms:title ?movieTitle ;
dcterms:date ?movieDate .
}}
}
Requête fédérée: dbpedia & linkedmoviedb
Résultat de la requête fédérée : dbpedia&linkedmoviedb
Ce que vous devez retenir
➔ Web sémantique extension du web actuel
➔ RDF standard pour représenter les données
➔ Sparql standard pour interroger du RDF
➔ Requêtes fédérées & interopérabilité
➔ Plusieurs sources ouvertes prêtes à être exploitées
➔ Linked data pas forcement open
Merci !
Questions ?