有没有办法使用 SPARQL 从 DBPedia 获取实体的 'is skos:broader of'?

Is there a way to get the 'is skos:broader of' of an entity from DBPedia using SPARQL?

基本上,我正在尝试获取此实体的 'subclasses'。例如:

我尝试使用 --

select ?p1 where {
   <http://dbpedia.org/resource/Category:Norwegian_silent_film_actors> skos:narrower ?p1 .
}

-- 和--

select ?p1 where {
   <http://dbpedia.org/resource/Category:Norwegian_silent_film_actors> rdfs:subclass ?p1 .
}

-- 但由于这实际上不是它的谓词,所以它不起作用。如果在谓词后添加 *,两者实际上 return 只是实体本身。

有什么方法可以得到这些对象吗?

重要的是要记住 is skos:broader of 关系是反向 skos:broader 关系——暗示 但不一定表示存在 skos:narrower 声明。 DBpedia 并没有所有可能从那里推断出来的明确陈述,并且默认情况下推理规则不活跃。

您可以使用像这样的查询中确实存在的显式语句,它使用 属性 路径 + 用于一个或多个 skos:broader 关系 --

select ?p1 
where 
  {
    ?p1  
       skos:broader+
         <http://dbpedia.org/resource/Category:Norwegian_silent_film_actors> 
  }

--或者这个,用属性路径^来反转关系--

select ?p1 
where 
  {
    <http://dbpedia.org/resource/Category:Norwegian_silent_film_actors>
       ^skos:broader*
          ?p1
  }

这是inference rules might well be brought to bear. Unfortunately, there are no predefined inference rules relating skos:broader and skos:narrower, and this public endpoint does not accept ad-hoc rule additions. You could create some on a personal endpoint, whether pre-built and pre-populated with DBpedia in the cloud或其他地方。