[英]How can get information about sport in Germany from dbpedia using SPARQL query
How can I get information about sports in Germany from DBpedia using SPARQL? 我如何使用SPARQL从DBpedia获得有关德国体育的信息? What SPARQL query can get that information? 哪些SPARQL查询可以获取该信息? I used this SPARQL query, but I get no results! 我使用了这个SPARQL查询,但是没有结果!
SELECT * WHERE {
?c a dbpedia.org/ontology/Country .
?c rdfs:label dbpedia:Germany .
}
The query you posted is malformed. 您发布的查询格式不正确。 Attempting to run it on the public DBpedia SPARQL endpoint produces an error. 尝试在公共DBpedia SPARQL端点上运行它会产生错误。 The reference dbpedia.org/ontology/Country
should be dbpedia-owl:Country
, and rdfs:label
s are usually strings, so "Germany"@en
should replace dbpedia:Germany
. 参考dbpedia.org/ontology/Country
应该是dbpedia-owl:Country
,而rdfs:label
通常是字符串,因此"Germany"@en
dbpedia:Germany
应该替换dbpedia:Germany
。 The corrected query, however, just returns a single result, http://dbpedia.org/resource/Germany . 但是,更正后的查询仅返回一个结果,即http://dbpedia.org/resource/Germany 。
SELECT * WHERE {
?c a dbpedia-owl:Country .
?c rdfs:label "Germany"@en .
}
Without more information about what kind of data you're trying to obtain, the simplest answer for querying about sport in Germany is that you should ask DBpedia to describe sport in Germany for you, almost literally. 在没有更多关于您要获取哪种数据的信息的情况下,查询德国运动的最简单答案就是,您应该要求DBpedia几乎从字面上描述德国的运动。 The following query is legal SPARQL that you can paste into the public DBpedia endpoint . 以下查询是合法的SPARQL,您可以将其粘贴到公共DBpedia端点中 。
describe dbpedia:Sport_in_Germany
There is a Wikipedia article Sport in Germany , and DBpedia's naming convention is such that there is a corresponding DBpedia resource, dbpedia:Sport_in_Germany , which the previous query describes. 在Wikipedia上有一篇德国的文章Sport ,并且DBpedia的命名约定是这样的,即存在一个对应的DBpedia资源dbpedia:Sport_in_Germany ,上一查询对此进行了描述。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.