OWL实例参与逻辑 [英] OWL instance participation logic

查看:114
本文介绍了OWL实例参与逻辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在猫头鹰中:

  • 有一个类X,其属性P1,P2和P3都具有域X.

我想说:

  • X的每个实例必须至少参与与属性P1或P3之一的关系.
  • 参与X与P2的关系的每个X实例也必须参与与P1的关系.
  • 但是X的每个实例只能参与与P1和P2的关系或与P3的关系.

也许通过一些语法和标签更容易理解:

Maybe it is easier to understand with some syntax and labels:

:Chronology a owl:Class ;
    rdfs:label "X" ;
:hasBegin a owl:DatatypeProperty ;
    rdfs:label "P1" ;
    rdfs:domain :Chronology .
:hasEnd a owl:DatatypeProperty ;
    rdfs:label "P2" ;
    rdfs:domain :Chronology .
:hasNoBeginNoEnd a owl:DatatypeProperty ;
    rdfs:label "P3" ;
    rdfs:domain :Chronology .

我了解匿名类和限制的概念,但是似乎没有什么合适的.

I understand the concept of anonymous classes and restrictions but nothing really seems to fit.

推荐答案

您在这里有一些不同的约束,但是它们都可以用OWL表示.让我们一次解决一个约束.

You have a few different constraints here, but they can all be represented in OWL. Let us address the constraints one at a time.

  • X的每个实例必须至少参与与属性P1或P3之一的关系.
  • Every instance of X must at least participate in a relation with one of the properties P1 or P3.

这表示,对于每个 x ,要么有一个 y 这样的 P1(x,y),要么有一个 z 这样的 P2(x,z).在OWL中,这表示为

This says that for every x, either there is a y such that P1(x,y), or there is a z such that P2(x,z). In OWL, this is expressed by

X SubClassOf ((P1 some Thing) or (P2 some Thing))

类表达式P1 some Thing表示P1与某些实体相关的事物的类.对于P2 some Thing同样.总体而言,subClassOf公理说:如果某物是X,则它是P1 some ThingP2 some Thing." (如果需要,您也可以使用P min 1而不是P some Thing.这没有显着差异.)

The class expression P1 some Thing represents the class of things that are related by P1 to some entity. Similarly for P2 some Thing. The subClassOf axiom as a whole says that "if something is an X, then it is either a P1 some Thing or a P2 some Thing." (You could also use P min 1 instead of P some Thing, if you wanted to. It is not a significant difference.)

  • 参与X与P2的关系的每个X实例也必须参与与P1的关系.
  • Every instance of X which participates in a relation with P2 must also participate in a relation with P1.

这表示,对于每个 x if 都有一个 y ,这样 P2(x,y),然后还有一个 z ,如 P1(x,z).换句话说,对于每个 x ,如果 x X 并且有 y 这样的 P2(x,y),然后还有一个 z 这样的 P1(x,z)."这可以由另一个子类公理表示:

This says that for every x, if there is a y such that P2(x,y), then there is also a z such that P1(x,z). Another way of saying this is that "for every x, if x is an X and there is a y such that P2(x,y), then there is also a z such that P1(x,z)." This can be expressed by another subclass axiom:

(X and (P2 some Thing)) SubClassOf (P1 some Thing)

(出于一般性考虑,我在该子类公理的左侧使用了X and (P2 some Thing).在此特定情况下,由于 X P2 的域,我们可以推断P2 some Thing X 的子类,因此我们也可以只在左侧使用P2 some Thing.)

(For the sake of generality, I used X and (P2 some Thing) on the left side of this subclass axiom. In this specific case, since X is the domain of P2, we can infer that P2 some Thing is a subclass of X, so we could also have used just P2 some Thing on the left.)

  • 但是X的每个实例只能参与与P1和P2的关系或与P3的关系.
  • But every instance of X may only participate in relations with P1 and P2 or in relations with P3.

这表示如果某个 x X ,并且存在一个 y ,则 P3(x,y),则没有 z 这样的 P1(x,z) P2(x,y),反之亦然.您可以通过几种方式来表示.您可以使用两个子类公理:

This says that if some x is an X and there is a y such that P3(x,y), then there is no z such that P1(x,z) or P2(x,y), and vice versa. You can represent this in a few ways. You could use two subclass axioms:

(X and (P3 some Thing))                      SubClassOf ((P1 max 0) and (P2 max 0))
(X and ((P1 some Thing) or (P2 some Thing))) SubClassOf (P3 max 0)

您还可以使用一个不相交的类公理(注意, X 出现在两侧)

You could also use a single disjoint class axiom (notice that X appears on both sides)

(X and (P3 some Thing)) DisjointWith (X and ((P1 some Thing) or (P2 some Thing)))

(正如我在前面的案例中提到的那样,由于属性的域是 X ,所以类X and (P3 some Thing)等效于P3 some Thing.这些子类公理的左侧也可以是只需P3 some Thing(P1 some Thing) or (P2 some Thing),并且不相交的公理中的类可以是P3 some Thing(P1 some Thing) or (P2 some Thing).)

(As I noted in the previous case, since the domain of the properties is X, the class X and (P3 some Thing) is equivalent to P3 some Thing. The left side of these subclass axioms could also be simply P3 some Thing and (P1 some Thing) or (P2 some Thing), and the classes in the disjoint axioms could be P3 some Thing and (P1 some Thing) or (P2 some Thing).)

这是本体中的类和公理的样子(采用N3格式):

Here's what the classes and axioms in the ontology looks like (in the N3 format):

:X    a       owl:Class ;
      rdfs:subClassOf
              [ a       owl:Class ;
                owl:unionOf ([ a       owl:Restriction ;
                            owl:onProperty :P1 ;
                            owl:someValuesFrom owl:Thing
                          ] [ a       owl:Restriction ;
                            owl:onProperty :P2 ;
                            owl:someValuesFrom owl:Thing
                          ])
              ] .

[]    a       owl:Class ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:onProperty :P1 ;
                owl:someValuesFrom owl:Thing
              ] ;
      owl:intersectionOf (:X [ a       owl:Restriction ;
                  owl:onProperty :P2 ;
                  owl:someValuesFrom owl:Thing
                ]) .

[]    a       owl:Class ;
      owl:disjointWith
              [ a       owl:Class ;
                owl:intersectionOf (:X [ a       owl:Restriction ;
                            owl:onProperty :P3 ;
                            owl:someValuesFrom owl:Thing
                          ])
              ] ;
      owl:intersectionOf (:X [ a       owl:Class ;
                  owl:unionOf ([ a       owl:Restriction ;
                              owl:onProperty :P1 ;
                              owl:someValuesFrom owl:Thing
                            ] [ a       owl:Restriction ;
                              owl:onProperty :P2 ;
                              owl:someValuesFrom owl:Thing
                            ])
                ]) .

关于空白节点使用情况的评论

如评论中所指出的,上面的本体使用由空白节点表示的类表达式作为两个通用类公理"的主题,即,与两个类表达式相关的子类公理,这两个类都不是简单的类标识符.原始的 OWL Web本体语言 参考书包含在附录E:OWL DL本体的经验法则:

Commentary on Blank Node Usage

As pointed out in the comments, the ontology above uses class expressions represented by blank nodes as the subjects of the two "general class axioms", i.e., the subclass axioms that related two class expressions, neither of which is a simple class identifier. The original OWL Web Ontology Language Reference includes, in Appendix E: Rules of Thumb for OWL DL Ontologies:

避免孤立的空白节点 通常,图中出现的空白节点要么代表未命名的个人,要么应完全是以下其中之一:

Avoid orphan blank nodes In general, blank nodes occurring in the graph either represent unnamed individuals, or should be exactly one of the following:

  • rdfs:subClassOf,owl:equivalentClass,owl:disjointWith,owl:someValuesFrom,owl:allValuesFrom或rdf:type三元组的对象.
  • 具有对象owl:AllDifferent的rdf:type三元组的主题.
  • rdf:List中的元素.
  • The object of an rdfs:subClassOf, owl:equivalentClass, owl:disjointWith, owl:someValuesFrom, owl:allValuesFrom or rdf:type triple.
  • The subject of an rdf:type triple with object owl:AllDifferent.
  • An element in an rdf:List.

通常不允许使用孤立的空白节点,即不是三元组对象的空白节点(上述的owl:AllDifferent情况除外).

Orphan blank nodes, i.e. those which are not the object of a triple are, in general, not allowed (other than the owl:AllDifferent case described above).

乍看之下,上面提供的本体似乎违反了这一点,因为通用类公理"(其主题不是类标识符的类公理)具有类表达式作为其主题.但是, 3.2类公理部分给出了例如rdfs:subClassOf的语法.公理为

At first glance, it would seem that the ontology provided above violates this, because the "general class axioms" (class axioms whose subject is not a class identifier) have class expressions as their subject. However, section 3.2 Class Axioms gives the syntax of, e.g., rdfs:subClassOf axioms as

AXIOM SCHEMA:类描述 rdfs:subClassOf 类描述

该部分还包含注释:

注意:在OWL Lite中,rdfs:subClassOf语句的主题必须是类标识符.该对象必须是类标识符或属性限制.

NOTE: In OWL Lite the subject of an rdfs:subClassOf statement must be a class identifier. The object must be either a class identifier or a property restriction.

这表明附录E 在忽略某些允许孤立空白节点"的情况下是错误的.当然,这个建议不是规范性的.它以引言开头:

This suggests that Appendix E is mistaken in omitting certain cases where "orphan blank nodes" are allowed. That suggestion isn't normative, of course; it opens with the introduction:

以下规则对RDF图成为DL本体的条件进行了非正式表征.这并不是要取代S& AS中给出的特征,而是要提供一些通用指针-的想法是,如果您遵循这些准则,则更有可能 >生成OWL DL本体. [加重]

The following rules give an informal characterization of the conditions for an RDF graph to be a DL ontology. This is not intended to replace the characterization given in S&AS, but instead gives some general pointers — the idea is that if you stick to these guidelines, you're more likely to produce OWL DL ontologies. [emphasis added]

为进行确认,我们需要查看 8部分. OWL Full,OWL DL和OWL Lite ,描述了OWL Full,OWL DL和Owl Lite本体中允许的精确构造.该部分重申,在OWL Lite中,

For confirmation, we need to look at section 8. OWL Full, OWL DL and OWL Lite, which describes the precise constructs that are allowed in OWL Full, OWL DL, and Owl Lite ontologies. That section reiterates that, in OWL Lite,

rdfs:subClassOf三元组的主题为类名,rdfs:subClassOf三元组的对象为类名或限制;

the subject of rdfs:subClassOf triples be class names and the object of rdfs:subClassOf triples be class names or restrictions;

,但是对OWL DL本体没有这样的限制.对于OWL DL本体,第8节确实要求

but puts no such restrictions on OWL DL ontologies. Section 8 does require, for OWL DL ontologies, that

所有公理必须格式正确,没有任何遗漏或多余的成分,并且必须形成树状结构.最后一个约束意味着将一个人所引用的所有类和属性分别明确地键入为OWL类或属性.

All axioms must be well-formed, with no missing or extra components, and must form a tree-like structure. The last constraint implies that all classes and properties that one refers to are explicitly typed as OWL classes or properties, respectively.

这表明

[] rdfs:subClassOf :Foo . 

不是有效的OWL DL,但是

is not valid OWL DL, but that

[] a owl:Class ; 
   rdfs:subClassOf :Foo .

是(当然,前提是:Fooowl:Class).非规范性的附录E 只是错过了可以使用孤立空白节点"的情况.一般类公理不会经常使用,除非需要表达一些特别复杂的句子,所以这不是一个很难犯的错误.

is (provided that :Foo is an owl:Class, of course). The non-normative Appendix E simply missed a case where "orphan blank nodes" can be used. General class axioms don't get used all that often, except when some particularly complicated sentences need to be represented, so it's not a hard mistake to make.

有关通用类公理的更多信息,请参见在左侧变得复杂:通用概念包含项.

For some more information about general class axioms, see Being complex on the left-hand-side: General Concept Inclusions.

这篇关于OWL实例参与逻辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆