简体   繁体   English

Punning推理似乎在graphdb中不起作用

[英]Punning Inference seems not working in graphdb

I loaded in a repository of GraphDB the following statements: 我在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 .

If I'm not wrong, since OWL2 introduced the punning (ie, using the same IRI of a Class for an individual for metamodelling), the following statements should be inferred: 如果我没有错,因为OWL2引入了双关语 (即,对于个人进行元模型使用类的相同IRI),应该推断出以下语句:

foo:Ape a foo:Animal .

But it doesn't happen. 但它不会发生。 I tried also different repositories settings without luck. 我没有运气也尝试了不同的存储库设置。

Is there a way to get that kind of inferences or am I doing something wrong? 有没有办法得到那种推论或我做错了什么?

You should just replace this statement: 您应该只替换此语句:

foo:isEndangered rdf:domain foo:Animal .

with this: 有了这个:

foo:isEndangered rdfs:domain foo:Animal .

After replacing, foo:Ape a foo:Animal should be inferred: 更换后, foo:Ape a foo:Animal应该推断foo:Ape a foo:Animal

In SPARQL mode, be sure that the second > in the >> icon is not dotted, otherwise click the icon. 在SPARQL模式下,请确保>>图标中的第二个>未点缀,否则单击图标。

It works for me under RDFS and OWL-Max rulesets, I have not checked other ones. 它适用于我在RDFS和OWL-Max规则集下,我还没有检查过其他规则集。


As @Ignazio has said, OWL 2 DL punning does not grant inferences, the purpose of punning is rather opposite. 正如@Ignazio所说,OWL 2 DL的惩罚不会给予推论,但是惩罚的目的恰恰相反。 OWL 2 DL punning allows entities to be classes and individuals simultaneously without considering an ontology being inconsistent (ie full of inferences) or invalid. OWL 2 DL惩罚允许实体同时成为类和个体而不考虑本体不一致(即充满推论)或无效。

OWL punning is just a small part of total RDF(S) freedom : OWL双打只是RDF(S) 自由度的一小部分:

RDFS does not partition the universe into disjoint categories of classes, properties and individuals. RDFS不会将Universe划分为不相似的类,属性和个体。 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. 因此,RDFS允许包含其他类,属性类,类属性等的类。

Actually, the inference you need is granted by the rdfs2 RDFS entailment pattern. 实际上,您需要的推断由rdfs2 RDFS蕴涵模式授予。


I hope the mnemonic table below would be helpful. 我希望下面的助记符表会有所帮助。 It shows which term mentioned in the RDFS vocabulary is of which prefix. 它显示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      |
+--------------------+----------------+

PS Even if the statement you need is not inferred, this is not a bug : PS即使您不需要推断您需要的陈述,这也不是错误

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. 例如,虽然RDF词汇表可以声明author属性用于指示作为Person类实例的资源,但它没有说明应用程序在处理该范围信息时是否应该或如何操作。 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. 例如,数据检查工具可能使用它来帮助发现某些数据集中的错误,交互式编辑器可能会建议适当的值,而推理应用程序可能会使用它来从实例数据中推断出其他信息。

:-) :-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM