双关推理似乎在 graphdb 中不起作用

Punning Inference seems not working in graphdb

我在 GraphDB 的存储库中加载了以下语句:

@prefix foo: <http://fopo.com#> .
@prefix bar: <http://dd.com#> .

foo:Car a owl:Class .

foo:Animal a owl:Class ;
owl:disjointWith foo:Car .

foo:isEndangered a owl:ObjectProperty ;
rdf:domain foo:Animal ;
rdf:range bar:SomeSpecies .

foo:Ape a owl:Class ;
foo:isEndangered bar:SomeSpecies .

如果我没记错的话,因为 OWL2 引入了 punning(即,对个体使用相同的 Class IRI 进行元建模),应该推断出以下陈述:

foo:Ape a foo:Animal .

但这并没有发生。我也尝试了不同的存储库设置,但没有成功。

有没有办法得出这种推论,还是我做错了什么?

您应该只替换此语句:

foo:isEndangered rdf:domain foo:Animal .

有了这个:

foo:isEndangered rdfs:domain foo:Animal .

替换后,foo:Ape a foo:Animal应该推断为:

  • Visual Graph mode screenshot,
  • SPARQL mode screenshot.

在SPARQL模式下,确保>>图标中的第二个>没有点,否则点击图标。

它在 RDFS 和 OWL-Max 规则集下对我有用,我没有检查其他的。


正如@Ignazio 所说,OWL 2 DL 双关不授予推论,双关的目的恰恰相反。 OWL 2 深度学习双关允许实体同时成为 类 和个人,而不考虑 ontology 不一致(即充满推论)或无效。

OWL 双关只是总 RDF(S) 的一小部分 freedom:

RDFS does not partition the universe into disjoint categories of classes, properties and individuals. Anything in the universe can be used as a class or as a property, or both, while retaining its status as an individual which may be in classes and have properties. Thus, RDFS permits classes which contain other classes, classes of properties, properties of classes, etc.

实际上,rdfs2 RDFS 蕴含模式授予了您需要的推理。


希望下面的助记符table对您有所帮助。它显示了 RDFS 词汇表中提到的术语是哪个前缀。

+--------------------+----------------+
|       rdfs:        |      rdf:      |
+--------------------+----------------+
|                Classes              |
+--------------------+----------------+
| rdfs:Resource      | rdf:Property   |
| rdfs:Class         | rdf:langString |
| rdfs:Literal       | rdf:HTML       |
| rdfs:Datatype      | rdf:XMLLiteral |
+--------------------+----------------+
|               Properties            |
+--------------------+----------------+
| rdfs:range         | rdf:type       |
| rdfs:domain        |                |
| rdfs:subClassOf    |                |
| rdfs:subPropertyOf |                |
| rdfs:label         |                |
| rdfs:comment       |                |
+--------------------+----------------+
|             Other Vocabulary        |
+--------------------+----------------+
| rdfs:Container     | rdf:Bag        |
| rdfs:member        | rdf:Seq        |
| rdfs:seeAlso       | rdf:Alt        |
| rdfs:isdDefinedBy  | rdf:List       |
|                    | rdf:first      |
|                    | rdf:rest       |
|                    | rdf:nil        |
|                    | rdf:_1         |
|                    | rdf:Statement  |
|                    | rdf:subject    |
|                    | rdf:predicate  |
|                    | rdf:object     |
|                    | rdf:value      |
+--------------------+----------------+

P.S。即使没有推断出你需要的语句,这也是not a bug:

For example, while an RDF vocabulary can assert that an author property is used to indicate resources that are instances of the class Person, it does not say whether or how an application should act in processing that range information. Different applications will use this information in different ways. For example, data checking tools might use this to help discover errors in some data set, an interactive editor might suggest appropriate values, and a reasoning application might use it to infer additional information from instance data.

:-)