0

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.?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
user2498899
  • 153
  • 8
  • I think this isn't the exact query that you're running. If you take that query over to the public endpoint, it returns lots of results. – Joshua Taylor Oct 10 '13 at 01:42

1 Answers1

0

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

SPARQL results

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.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • I am including the sparql query as a filter option to the DBpedia Spotlight API – user2498899 Oct 11 '13 at 17:59
  • @user2498899 I think you'll need to include your code to execute the query then. Your query works just fine on the DBpedia SPARQL endpoint. Please include code that we can test. – Joshua Taylor Oct 11 '13 at 18:01