简体   繁体   English

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

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

Basically, I'm trying to get the 'subclasses' of this entity. 基本上,我正在尝试获取此实体的“子类”。 For example: 例如:

DBpedia埃及电影演员

I tried using -- 我尝试使用-

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

-- and -- -和-

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

-- but since that's not actually its predicate, it doesn't work. -但由于这实际上不是它的谓词,因此它不起作用。 Both actually return just the entity itself if a * is added after the predicate. 如果在谓词后加*则两者实际上都只返回实体本身。

Is there any way of getting those objects? 有什么办法来获取那些对象?

It's important to remember that is skos:broader of relations are inverse skos:broader relations -- which imply but do not necessarily indicate the presence of skos:narrower statements. 重要的是要记住, is skos:broader of关系是逆skos:broader关系- 暗示但不一定表示存在skos:narrower语句。 DBpedia doesn't have every explicit statement that might be inferred from what's there, and inference rules are not active by default. DBpedia并没有从那里可以推断出的每个显式语句,并且默认情况下,推断规则不处于活动状态。

You can use the explicit statements that do exist with queries like this, which uses the property path + for one-or-more skos:broader relationships -- 您可以使用此类查询中确实存在的显式语句,该查询将属性path +用于一个或多个skos:broader关系-

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

-- or this, which uses the property path ^ to reverse the relationship -- -或使用属性路径^反转关系-

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

This is a place where 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. 不幸的是,没有与skos:broaderskos:narrower相关的预定义推理规则,并且此公共端点不接受即席规则添加。 You could create some on a personal endpoint, whether pre-built and pre-populated with DBpedia in the cloud or otherwise. 您可以在个人端点上创建一些对象,无论是在云中还是使用DBpedia预先构建和预填充

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM