DatatypeProperty,ObjectProperty和&之间有什么区别? FunctionalProperty,什么时候应该使用它们? [英] What is the difference between DatatypeProperty, ObjectProperty, & FunctionalProperty, and when should I use them?

查看:162
本文介绍了DatatypeProperty,ObjectProperty和&之间有什么区别? FunctionalProperty,什么时候应该使用它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编写本体时,有几种非常常用的类型,包括:

When writing an ontology, there are several very commonly used types, including:

  • DatatypeProperty
  • ObjectProperty
  • FunctionalProperty
  • InverseFunctionalProperty

前三种有点像它们会以特定的方式使用,但是我发现我对它们在FOAF中的使用方式的挑战给我带来了挑战.

The first three kinda look like they'd be used in a particular set of ways, but I find my idea of them being challenged by how I've seen them used in FOAF.

何时应分别使用或不使用它们?

When should each of them be used or not be used?

推荐答案

其中的前两个,DatatypeProperty和ObjectProperty,描述具有该属性的三元组应具有什么样的.数据类型属性将个人与文字数据(例如字符串,数字,日期时间等)相关联,而对象属性将个人与其他个人相关联.像hasAge这样的东西通常是一个数据类型属性,因为年龄是一个数字,但是因为一个母亲是另一个个体,所以hasMother将会是对象属性.

The first two of these, DatatypeProperty and ObjectProperty, describe what kind of values a triple with the property should have. Datatype properties relate individuals to literal data (e.g., strings, numbers, datetimes, etc.) whereas object properties relate individuals to other individuals. Something like hasAge would typically be a datatype property, since an age is a number, but hasMother would be an object property, since a mother is another individual.

其中的最后两个,FunctionalProperty和InverseFunctionalProperty,用于对个人的属性值施加一些约束.某种东西是一种功能特性,意味着给定的个人最多可以拥有一个价值.从逻辑上讲,这意味着如果 p 是功能属性,则

The last two of these, FunctionalProperty and InverseFunctionalProperty, are used to put some constraints on the values of properties for individuals. That something is an functional property means that a given individual can have at most one value for it. Logically, this means that if p is a functional property, then

∀ x,y,z.([[p(x,y)∧ p(x,z)]→ y = z)

∀ x, y, z.( [p(x,y) ∧ p(x,z)] → y = z )

由于OWL不会做出 的唯一名称假设,因此不同的IRI可以引用同一个人,因此,如果 hasMother 是一个功能属性,我们可以从

Since OWL does not make the unique name assumption, a different IRI can refer to the same individual, so if hasMother is a functional property, we can infer from

:John :hasMother :Margaret .
:John :hasMother :Peggy .

那个

:Margaret owl:sameAs :Peggy

当然,这也可以用于提供一些负推论".如果我们知道Susan与Peggy是一个不同的人,那么我们可以推断Susan不是John的母亲.即来自

Of course, this can also be used to provide some "negative inference," too. If we know that Susan is a different person than Peggy, then we can infer that Susan is not John's mother. I.e., from

:John :hasMother :Peggy .
:Susan owl:differentFrom :Peggy .

那是 false

:John :hasMother :Susan .

对于数据类型属性,其工作方式相同,但是有关哪些文字不同的信息更多.例如,推理机应该知道"1"^^xsd:int"2"^^xsd:int不同.

For datatype properties, this works the same way, but there's much more built in information about which literals are different. E.g., a reasoner should know that "1"^^xsd:int is different from "2"^^xsd:int.

相反的功能特性相似,但方向相反.如果特性p是逆函数特性,那么对于给定的个体y,最多应有一个x,使得p(x,y).

Inverse functional properties are similar, but in the reverse direction. If a property p is an inverse functional property, then for a given individual y, there should be at most one x such that p(x,y).

但是,这里有一些警告. OWL 2 DL仅支持逆功能对象属性,不支持逆功能数据类型属性.虽然我们可以将反函数数据类型属性的语义描述为∀ x,y,z([p(x,z)∧ p(y,z)]→ x = y),但我们不能等于条件之间的等价

However, there is a slight caveat here. OWL 2 DL only supports inverse functional object properties, not inverse functional datatype properties. While we can describe the semantics that an inverse functional datatype property would have as ∀x,y,z ( [p(x,z) ∧ p(y,z)] → x = y), we cannot have the equivalence between the conditions that

p是反函数属性

p is an inverse functional property

p -1 是一种功能属性

因为数据类型属性不能有逆.这是由于RDF(至少在当前版本中;我听说有更改此更改的想法,尽管我不知道更改是否会影响到OWL)不允许将字面值作为主题的三元组.如果数据类型属性具有反函数,我们将遇到这种情况:

because datatype properties cannot have inverses. This arises from the fact that RDF (at least in the current versions; I've heard that there's talk of changing this, though I don't know whether the change would ripple out to OWL) does not allow literal values as the subjects of triples. If datatype properties had inverses, we would have this situation:

:hasName owl:inverseOf :nameOf .
:john :hasName "John"@en .

然后我们推断

"John"@en :nameOf :john . # Not legal.

这意味着逆函数属性必须是对象属性.

This means that a inverse functional property must be an object property.

(在OWL Full中,推理机可以使用逻辑断言,并根据逻辑表示在该处进行适当的推断.或者,某些推理机,例如的基于规则的推理程序的问题),从其内部表示中删除了不允许文字作为主题"限制,然后过滤出结果,以确保非法的RDF不会逃脱.)

(In OWL Full, a reasoner could use the logical assertion and make the appropriate inferences there, I guess, based on the logical representation. Alternatively, some reasoners, e.g., jena's rule-based reasoners) remove the "no literals allowed as subjects" restriction from their internal representations, and then filter the results on the way out to make sure that illegal-RDF doesn't escape.)

现在,让我们看看您提到的情况:

Now, let's look at the cases you mentioned:

这是有效的,因为我们希望每个人的性别属性最多具有一个值.这是一个数据类型属性,因为FOAF的设计人员希望这些值类似于"male""female".如果他们定义了一些符号常量,例如<http://.../MALE><http://.../FEMALE>,那么这可能是对象属性.

This is functional, because we expect each individual to have at most one value for the gender property. It's a datatype property because the designers of FOAF expected the values to be something like "male" or "female". If they had defined some symbolic constants, e.g., <http://.../MALE> and <http://.../FEMALE>, then this could have been an object property.

mbox是一个对象属性,大概是因为它的值是形式为<mailto:someone@example.com>的IRI.这是相反的功能属性,因为对于给定的邮箱,我们希望最多只有一个人拥有该邮箱. (当然,有些人可能会共享一个邮箱,所以这并不总是很正确,但是,哦.)但这不是 功能属性,因为一个人可以轻松拥有多个邮箱

mbox is an object property, presumably because its values are IRIs of the form <mailto:someone@example.com>. It's an inverse functional property because for a given mailbox, we'd expect at most one person to have that mailbox. (Of course, some people might share a mailbox, so this isn't quite right all the time, but oh well.) It's not a functional property, though, because a person can easily have multiple mailboxes.

我记得,此属性将其个人与其邮箱的sha1sum关联.使用此属性意味着人们不必共享他们的真实电子邮件地址.出于mbox相同的原因,它是一种逆函数属性.我们希望每个mbox_sha1sum最多属于一个人.同样,它也不是功能属性,因为一个人可以拥有多个邮箱,因此可以拥有多个sha1sum.

As I recall, this property relates an indvidual to the sha1sum of their mailbox. Use of this property means that people don't necessarily have to share their real email address. It's an inverse functional property for the same reason that mbox is; we expect each mbox_sha1sum to belong to at most one individual. Similarly, it's not an functional property, because a person can have more than one mailbox, and thus more than one sha1sum.

这是有问题的情况,因为这是数据类型属性和逆函数属性,并且不应发生(如上所述).但是,OWL Full推理程序仍然可以让您推断,如果x和y都具有相同的mbox1_shasum,则x = y.

This is the problematic case, because this is a datatype property and an inverse functional property, and that shouldn't happen (as described above). However, an OWL Full reasoner still might let you infer that if x and y both have the same mbox1_shasum, then x = y.

您可以在 OWL 2 Web本体语言直接语义学(第二部分)中阅读正式定义.版).您可能会感兴趣 2.3.2对象属性表达式公理 2.3.3数据属性表达式公理.

You can read the formal definitions in OWL 2 Web Ontology Language Direct Semantics (Second Edition). You'd be interested in 2.3.2 Object Property Expression Axioms and 2.3.3 Data Property Expression Axioms.

这篇关于DatatypeProperty,ObjectProperty和&amp;之间有什么区别? FunctionalProperty,什么时候应该使用它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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