试图理解 Freebase 中的 "expected types" 和 "type.property.schema" 属性

Trying to understand "expected types" and "type.property.schema" properties in Freebase

属性: 预期类型

Definition: The expected type of the object referred to by this property [1].


属性: type.property.schema

Definition: The link from a property to its underlying type. This forces a property to only belong to a single type [1].


我不是 freebase 用户,所以我没有太多关于 Freebase 特定部分的上下文,但我可以谈谈与

的可能关系
  • is expected type equal to rdfs:range?
  • is type.property.schema equal to rdfs:domain?

我会解释这样的描述:

Definition: The expected type of the object referred to by this property

表示比 rdfs:range 更弱的意思。 rdfs:range 属性 意味着你可以 推断 具有 属性 的三元组的对象实际上有 范围作为一种类型。即来自:

p rdfs:range R

x p y

你可以推断

y rdf:type R

如果您可以独立地推断出 y 具有 R 类型,那么您就有了逻辑上的不一致。然而,听起来 "expected type",你只是有一些东西 "unexpected",但不一定是逻辑上的不一致。例如,您可能 期望 价格以某种国家货币表示,但用其他货币表示并不是 不正确 ,只是 意外.

另一方面,定义:

Definition: The link from a property to its underlying type. This forces a property to only belong to a single type

实际上似乎与 rdfs:domain 非常匹配。如果您知道某些东西具有 属性 的值,那么具有 属性 的东西必须具有指定的类型。但是,我不知道 freebase 是否有另一个更类似于(通用)面向对象编程语言的对象模型,其中属性 "belong" 到 类。在 RDF 中,属性并不真正属于类型。

Expected Type 主要是 social/UI 结构。它会影响 Freebase 网络 UI [过去] 引导用户选择合适的 link 目标的方式,但是如果要使用 MQLwrite 或其中一种批量上传 API 编写 triple/quad,它不会有任何影响,因此在尝试推断其意图时不适合依赖它。

同样,type/property/schema 属性 指导几个网络 UI 操作,但只是按照惯例,对原始三重级别允许或不允许的内容没有影响。

由于上述行为,从与 Freebase Web 客户端中显示的内容不匹配的三元组推断意图时应特别小心,因为它们不太可能被许多(或任何!)人审查过. "Naked triples"(即没有相应的断言类型),没有断言类型 /common/topic 的潜在主题,以及各种其他极端情况在试图推断意图时都应该被视为斜视。

回答部分子问题:

  • 是的,属性 "belongs" 属于单一类型(尽管如上所述,这是一种非常弱的归属关系)。您可以通过 属性 描述
  • 旁边的斜体 unique 从架构页面中看到这一点
  • 不,一个 属性 不能 "belong" 到多个类型(见上文关于唯一性)
  • 不,rdfs:range 和 rdfs:domain 不等同于给定的 Freebase 属性,原因如上所述。