SPARQL 查询不返回任何数据

SPARQL query not returning any data

我是 RDF 的新手,所以如果你能帮助我,那就太好了!

我正在尝试查询名为 "Umeboshi" 的泡菜的 主题(这是日本泡菜),如下所示:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX type: <http://dbpedia.org/class/yago/>       
PREFIX prop: <http://dbpedia.org/property/>
PREFIX onto: <http://dbpedia.org/ontology/>

SELECT  ?label ?subject
WHERE {

?Thing
       rdfs:label ?label;
       prop:subject?subject.
 FILTER (?label = "Umeboshi")
}

这个查询没有给我任何数据。

因为我不知道在哪里可以找到可用的属性,所以我指的是 dbpedia 上的 Umeboshi 页面 http://live.dbpedia.org/page/Umeboshi

非常感谢您的帮助!

我发现了两件事:

  1. 在您提供的页面中,标签是英文的,但在您的查询中省略了语言。
  2. subject 具有不同的命名空间。这是一个 dcterm 概念而不是 dbpedia 属性.

这导致以下更改查询,which results in three bindings

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX dct:  <http://purl.org/dc/terms/>

SELECT ?label ?subject
WHERE {

?Thing
       rdfs:label   ?label;
       dct:subject ?subject.

 FILTER (?label = "Umeboshi"@en)
}