从 属性 的 owl 域推断个人的 rdf 类型

Infer rdf type of individual from owl domain of its property

我正在研究 OWL 中的推论,目前是来自其 属性 域的单个类型的向下转换。我构建了以下示例 ontology:

@prefix : <http://www.test.org/2015/4/ontology#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.test.org/2015/4/ontology> .

<http://www.test.org/2015/4/ontology> rdf:type owl:Ontology .

:Class1 rdf:type owl:Class .

:Sub1 rdf:type owl:Class ;
      rdfs:subClassOf :Class1 .

:Prop1 rdf:type owl:DatatypeProperty ;
       rdfs:domain :Sub1 .

:Ind1 rdf:type :Class1 , owl:NamedIndividual ;
      :Prop1 "p" .

正如预期的那样,推理者(在我的例子中是 Pellet)推断出 :Ind1 的类型是 :Sub1:

:Ind1 :Prop1 "p" 
:Prop1 rdfs:domain :Sub1
=> :Ind1 a :Sub1

然后我添加了以下定义:

:Class2 rdf:type owl:Class .

:Sub2 rdf:type owl:Class ;
      rdfs:subClassOf :Class2 .

:Prop2 rdf:type owl:DatatypeProperty ;
       rdfs:domain [ rdf:type owl:Class ;
                     owl:unionOf ( :Sub1
                                   :Sub2
                                 )
                   ] .

:Ind2 rdf:type :Class2 , owl:NamedIndividual ;
      :Prop2 "p" .

属性 :Prop2 的域现在是 :Sub1 或 :Sub2。

在这种情况下,我还期望 class :Sub2 被 reasoner 推断为 :Ind2 的类型。但它并没有发生。

为什么不能推断呢?我哪里错了?

I expected also in this case that the class :Sub2 is inferred by reasoner as the type of the :Ind2. But it does not occur.

你为什么这么期待? class A 或 B 是元素的 class,它们是 A 或 B(或两者)。如果你说一个属性的域是A或B,那么从一个属性的断言中,你可以推断该主题是联合class A 或 B,但仅凭这一点不足以推断该主题是 A 或 [=31 的成员=]B。

当并集 class 由不相交的 class 组成时,这一点可能尤其明显。例如,假设 属性 hasWings 的域为 Plane or Bird。如果我断言 x hasWings 2,那么你知道 xPlane,因此它是飞机或鸟,但你还不知道是否x飞机

You are right, belonging to domains Plane or Bird is alone not enough to infer that the X is a Plane or a Bird if it has only one feature - the property hasWings. But in my example the individual has also a second feature - the type, that is the super class of one of the classes building the union. Imagine that the Plane is subClassOf Machine and the Bird is subClassOf Animal. If we define that the X is a Machine and hasWings 2 then the type of X should be inferred to be Plane.

仅仅因为一个人属于某个 class 并不意味着它一定属于那个 class 的任何特定子class。现在,你知道

(a) Ind2 ∈ Class2
(b) Ind2 ∈ (Sub1 ⊔ Sub2)
(c) Sub2 ⊑ Class2;

你声称我们应该能够推断出

Ind2 ∈子 2

但事实并非如此。假设 classes 的实际解释是这样的:

Class2 ≡ {Ind2}
Sub1 ≡ {Ind2}
Sub2 ≡ {}

这与公理和推论完全一致;它使它们全部为真:

  • (a) 为真,因为 Ind2 是 Class2 的一个元素。
  • (b) 为真,因为 Ind2 是 Sub1 ⊔ 的一个元素; Sub2 (≡ {Ind2} ⊔ {} ≡ {Ind2}).
  • (c) 为真,因为 Sub2 是 Class2 ({} ⊑ {Ind2}) 的子class。