【问题标题】:Obtaining information from is dbp: ... of [duplicate]从中获取信息是 dbp: ... of [重复]
【发布时间】:2016-04-19 15:30:17
【问题描述】:

我正在尝试获取有关 Rodger Federer 的 DBpedia 页面的一些信息。我想问一下罗杰·费德勒是哪年奥运会的旗手。我可以从普通属性字段 (dbp:plays) 中提取信息,但如果属性是格式 (is dbp:flagbearer of) 则不能。

谁能给我一些建议,如何提取罗杰·费德勒担任旗手的年份并可能提出疑问?

【问题讨论】:

  • 您知道该旗手或获胜者类别所需的谓词吗?我想出了这个查询 select * where { values ?you {<http://dbpedia.org/resource/Roger_Federer>} ?you <http://purl.org/dc/terms/subject> ?o } 检查它是否对你有一些有趣的值
  • 不幸的是,它没有产生任何有趣的值。还有其他建议吗?
  • 不,对不起……我对时态词汇不太熟悉

标签: sparql dbpedia sparqlwrapper


【解决方案1】:

您可以使用以下查询获取该信息。

PREFIX dbp:<http://dbpedia.org/property/>

select ?olympics ?year where { 
   ?olympics dbp:flagbearer <http://dbpedia.org/resource/Roger_Federer>;
             dbp:games ?year .
}

此查询将在DBpedia 中为您提供以下结果。

+---------------------------------------------+------+
|                  olympics                   | year |
+---------------------------------------------+------+
| dbr:Switzerland_at_the_2008_Summer_Olympics | 2008 |
| dbr:Switzerland_at_the_2004_Summer_Olympics | 2004 |
+---------------------------------------------+------+

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-24
    • 1970-01-01
    相关资源
    最近更新 更多