获取 DBpedia 类的所有属性
如何获取特定类的属性列表?考虑类 dbpedia-owl:Person
。 Person
类的所有实例都有一些以 dbpprop:
为前缀的属性。如何获取 Person
类的所有实例的所有 dbpprop:
属性?
How to get a list of properties for a specific class? Consider the class dbpedia-owl:Person
. All instances of the Person
class have some properties prefixed with dbpprop:
. How can I get all the dbpprop:
properties that we may find for all the instance of the Person
class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有效的方法是:
在此查询中,您要求提供将
dbpedia:Person
作为rdfs:domain
的所有属性。此查询需要架构定义才能工作,有时数据集并不真正完全遵循架构。对于这些数据集,您将尝试另一个查询。该查询查看绑定从中产生的每个属性的每个人的实例。这比第一个难多了,在 dbpedia 公共实例中你会超时。因此,如果您想使用公共端点,最好使用第一个。
The one that works is:
In this query you are asking for all the properties that have
dbpedia:Person
asrdfs:domain
. This query requires a schema definition to work and sometime datasets don't really follow perfectly the schemas. For those datasets you would try this other queryThis query looks at every instance of person binding every property that comes out of it. It is much harder than the first one, and in the dbpedia public instance you will get a time out. So you are better off with the first one if you want to use the public endpoint.
要获取所有传递属性,您可以询问此查询。
“rdfs:subClassOf”中的“+”是一个属性路径表达式 [1],它也获取 Person 的所有超类。
这些属性对于 Person 也有效。
另请注意,不建议使用 dbprop 命名空间,因为数据是原始数据并且未标准化为数据类型。
[1] http://www.w3.org/TR/2010/WD- sparql11-property-paths-20100126/
披露:我是 DBpedia 开发人员
To get all transitive properties you can ask this query
The '+' in the 'rdfs:subClassOf' is a property path expression [1] that fetches all uperclasses of Person as well.
These properties are also valid for Person.
Also note that the dbprop namespace is not recommended because the data is raw and not normalized to a datatype.
[1] http://www.w3.org/TR/2010/WD-sparql11-property-paths-20100126/
Disclosure: I am a DBpedia developer