我在 DBpedia 聚光灯下的 sparql 选项有问题。我的结果集在没有 sparql 过滤器的情况下看起来像这样:
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
这些实体中有几个拥有该属性rdf:type
dbpedia-owl:Place
。但是当我使用以下 sparql 查询进行过滤时:
" 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 . }";
我只得到两个结果:
http://dbpedia.org/resource/San_Francisco_International_Airport
http://dbpedia.org/resource/Minas_Gerais
其他人在哪里:
http://dbpedia.org/resource/Golden_Gate_Bridge
http://dbpedia.org/resource/Sausalito,_California
http://dbpedia.org/resource/Richmond_Park
ETC。?