|
|
|
Utiliser un client SPARQL:
|
|
|
|
* Emacs: sparkl-mode dans
|
|
|
|
* web: http://dbpedia.org/sparql
|
|
|
|
|
|
|
|
Paramètres:
|
|
|
|
* Endpoint: http://live.dbpedia.org/sparql
|
|
|
|
|
|
|
|
Quelques liens:
|
|
|
|
* Ontology dbpedia: http://dbpedia.org/ontology/
|
|
|
|
* Exemple de définition: http://dbpedia.org/ontology/Band
|
|
|
|
* Exemple de ressource: http://dbpedia.org/resource/Iron_Maiden
|
|
|
|
|
|
|
|
## Exemples
|
|
|
|
|
|
|
|
Toutes les personnes membre d'un groupe
|
|
|
|
```
|
|
|
|
select * where {
|
|
|
|
?band dbo:bandMember ?person.
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Tous les artistes associés aux artistes du groupe Iron Maiden:
|
|
|
|
|
|
|
|
```
|
|
|
|
select * where {
|
|
|
|
<http://dbpedia.org/resource/Iron_Maiden> dbo:bandMember ?member.
|
|
|
|
?member <http://dbpedia.org/ontology/associatedMusicalArtist> ?artist
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Le résumé en français du groupe Iron Maiden:
|
|
|
|
|
|
|
|
```
|
|
|
|
select * where {
|
|
|
|
<http://dbpedia.org/resource/Iron_Maiden> dbo:bandMember ?o.
|
|
|
|
?o dbo:abstract ?summary.
|
|
|
|
filter ( langMatches(lang(?summary),'fr')).
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Les noms des groupes rattachés à la personne dont le nom est "Steve Harris":
|
|
|
|
```
|
|
|
|
select ?band_name where {
|
|
|
|
?person a <http://dbpedia.org/ontology/Person>.
|
|
|
|
?person dbp:name "Steve Harris"@en.
|
|
|
|
|
|
|
|
?band dbo:bandMember ?person.
|
|
|
|
?band dbp:name ?band_name
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
La liste des albums et résumés triés par date de sortie du groupe nommé "Iron Maiden":
|
|
|
|
|
|
|
|
```
|
|
|
|
select ?release_date, ?album_name, ?summary where {
|
|
|
|
?band a dbo:Band.
|
|
|
|
?band dbp:name "Iron Maiden"@en.
|
|
|
|
|
|
|
|
?album a dbo:Album.
|
|
|
|
?album dbo:artist ?band.
|
|
|
|
?album dbp:name ?album_name.
|
|
|
|
|
|
|
|
?album dbo:abstract ?summary.
|
|
|
|
filter ( langMatches(lang(?summary),'fr')).
|
|
|
|
|
|
|
|
?album dbp:released ?release_date.
|
|
|
|
|
|
|
|
} order by desc(?release_date)
|
|
|
|
``` |
|
|
|
\ No newline at end of file |