下载dbpedia本体类的所有实例

时间:2014-10-17 18:46:27

标签: rdf sparql semantic-web owl dbpedia

我想以N-Triple格式从dbpedia下载所有类型为d0:Loaction的对象。 http://dbpedia.org/sparql中的查询是:

DESCRIBE ?x
WHERE { ?x rdf:type d0:Location
}

但我会暂停。有没有更简单的方法来下载这样的数据库?

1 个答案:

答案 0 :(得分:3)

如果您从DBpedia下载大量数据,您应该只需下载数据转储并在本地运行您自己的终端。但是,如果您只想要一个给定类型的个人列表,您可以使用选择查询:

select ?location where {
  ?location a d0:Location
}
order by ?location  #-- need an order for offset to work
limit 1000          #-- how many to get each time
offset 3000         #-- where to start in the list

如果您确实需要返回RDF数据,则可以将其更改为构建查询:

construct where {
  ?location a d0:Location
}
order by ?location
limit 1000
offset 3000