Reputation: 181
I have trouble with the sparql option in DBpedia spotlight. My result set looks like this without a sparql filter:
http://dbpedia.org/resource/Starting_lineup
http://dbpedia.org/resource/One_Week_%28song%29
http://dbpedia.org/resource/Longitude
http://dbpedia.org/resource/The_Fly_%281986_film%29
http://dbpedia.org/resource/San_Francisco_International_Airport
http://dbpedia.org/resource/Cycling
http://dbpedia.org/resource/Golden_Gate_Bridge
http://dbpedia.org/resource/Sausalito,_California
http://dbpedia.org/resource/Lunch
http://dbpedia.org/resource/Ferry
http://dbpedia.org/resource/Angel_Island_%28California%29
http://dbpedia.org/resource/Cycling
http://dbpedia.org/resource/Twin_Peaks
http://dbpedia.org/resource/Richmond_Park
http://dbpedia.org/resource/China_Beach
http://dbpedia.org/resource/Minas_Gerais
http://dbpedia.org/resource/Jazz
Several of these entities have the property rdf:type
dbpedia-owl:Place
. But when I filter with the following sparql query:
" PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> "+
" PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> " +
" PREFIX dbpedia_ont: <http://dbpedia.org/ontology/> " +
" SELECT DISTINCT ?x WHERE { ?x rdf:type dbpedia_ont:Place . }";
I only get two results:
http://dbpedia.org/resource/San_Francisco_International_Airport
http://dbpedia.org/resource/Minas_Gerais
Where are the others:
http://dbpedia.org/resource/Golden_Gate_Bridge
http://dbpedia.org/resource/Sausalito,_California
http://dbpedia.org/resource/Richmond_Park
etc.?
Upvotes: 0
Views: 450
Reputation: 85853
There must be something you're not showing us. When I run your query (with a limit 100
) on the DBpedia public SPARQL endpoint, I get lots of results:
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbpedia_ont: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?x WHERE { ?x rdf:type dbpedia_ont:Place . }
limit 100
Note: I'd also suggest that, when possible, you use the same prefixes that DBpedia already defines for its endpoint. E.g., use dbpedia-owl:
for http://dbpedia.org/ontology/
, not dbpedia_ont
. This will make it much easier for other people to copy and paste your queries to try them out.
Upvotes: 0