1

我已经在 Virtuoso (Windows) 中加载了 :BaseKB Lite。

我应该在 Vitruoso SPARQL 端点(http:/comphost:8890/sparql)中使用什么 SPARQL 语句来获取除 Person 之外的所有主题名称及其与 Freebase 'Sports' 域(英文)相关的所有别名?

在 Freebase 中有一个包含所有子主题的“/sports”主题,例如“/sports/sports_league_season”。到目前为止,我找不到它如何映射到 BaseKB 架构((

结果示例:

 .......

 Manchester United F.C.|Manchester United FC|The Red Devils|Manch Untd|Manchester United Football Club
 London 2012|London 2012 Olympic Games| XXX Olympic games

 ........

注意:此列表中没有运动员(没有玛丽亚莎拉波娃,维多利亚阿扎伦卡等)

4

1 回答 1

0

以下 SPARQL 返回“Manchester United FC”的所有别名

     prefix basekb: <http://rdf.basekb.com/ns/>
     prefix public: <http://rdf.basekb.com/public/>
     prefix fbase: <http://rdf.freebase.com/ns/>
     prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
     prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
     prefix dbpedia: <http://dbpedia.org/resource/>
      select ?label ?alias{
                 basekb:m.050fh <http://rdf.basekb.com/ns/m.01gr> ?alias ; 
                                                       rdfs:label ?label.
      filter(lang(?label) = 'en').
      } limit 100

    Output:
      label     alias
      "Manchester United F.C."@en   "United"@en
      "Manchester United F.C."@en   "Manchester United"@en
      "Manchester United F.C."@en   "Red Devils"@en
      "Manchester United F.C."@en   "The Red Devils"@en
      "Manchester United F.C."@en   "Manchester United Football Club"@en
      "Manchester United F.C."@en   "Manchester United FC"@en
      "Manchester United F.C."@en   "Man United"@en
于 2013-02-03T20:24:44.337 回答