如何推断两个人之间的isBrotherOf属性 [英] How to infer isBrotherOf property between two individuals

查看:112
本文介绍了如何推断两个人之间的isBrotherOf属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要推断一个人是另一个人的兄弟,如果他们有相同的父亲.

I need to infer that one individual is the brother of other one if they have the same father.

所以,如果我有这个:

巴特有父亲荷马.

Bart hasFather Homer.

丽莎有父亲荷马.

由于BartLisa具有相同的父亲,我想推断:

Because Bart and Lisa have the same father, I would like to infer:

丽莎有巴特兄弟.

Lisa hasBrother Bart.

是否有任何方法可以利用任何属性特征来做到这一点?

Is there any method to do that using any property characteristics?

推荐答案

使用财产链和解散

Antoine Zimmermann的答案是此问题的一个很好的开始,它涉及您需要解决的要点这类任务:

Use Property Chains and Rolification

Antoine Zimmermann's answer is a very good start to this problem, and touches on the major point that you need to solve this sort of task:

x x 的每个兄弟,都有以下形式的路径: hasFather或hasFather -1 .

From x to each of x's brothers, there is a path of the form hasFather o hasFather-1.

现在,尽管如此,但实际上不仅仅是兄弟.对于所有兄弟姐妹和 x 本身都是如此.这意味着您将具有 hasSibling 的以下定义:

Now, that's actually not true of just brothers, though. That's true for all siblings and for x itself. This means you'll have the following definition of hasSibling:

具有同级≡ hasFather o hasFather -1

(实际上,实际上只是 hasPaternalSibling ;更精确的定义将使用 hasParent .)现在,您可以使用它来请求兄弟,他们只是兄弟姐妹,是男性,是 x ,查询如下:

(Actually, that's really just hasPaternalSibling; a more refined definition would use hasParent.) Now, using this, you could ask for brothers, which are simply siblings who are men, of x with a query like:

(具有兄弟值x)和Man

(hasSibling value x) and Man

但是,定义一个合适的 hasBrother 属性.如果您有一个特殊的属性可以将每个 Man 链接到自己,并且仅将男性链接到自己,则可以使用属性链和 hasSibling 来做到这一点.

However, it would be nice to define a proper hasBrother property. You could do this with a property chain and hasSibling if you had a special property that linked each Man to himself, and only linked males to themselves:

有兄弟≡ hasSibling o specialProperty

hasBrother ≡ hasSibling o specialProperty

实际上,这种属性是我们从称为 rolification 的技术中获得的,该问题在

In fact, such a property is what we get from a technique called rolification, which has been described more in a question, OWL 2 rolification, and its answer. The idea is that for the class Man, we create a new property rMan and add the equivalence:

男人≡ r Man 一些自我

表示每个 Man 通过 r Man 属性与自己相关,并且 only 实例的之间是如此的联系.这正是我们上面 specialProperty 所需的属性.因此,我们最终得到以下 Man hasSibling hasBrother 的定义:

which says that each Man is related to himself by the rMan property, and that only instances of Man are so connected. This is exactly the property that we need as specialProperty above. Thus, we end up with the following definitions of Man, hasSibling, and hasBrother:

现在,我们可以通过以下查询来请求 x 的兄弟们:

Now we can ask for the brothers of x with a query like:

hasBrother -1 值x

例如,我们可以要求 Greg 的兄弟姐妹,并获得 Peter Greg (他自己)和 Bobby .

For instance, we can ask for Greg's siblings, and get Peter, Greg (himself), and Bobby.

这是Turtle中的本体:

Here's that ontology in Turtle:

@prefix :      <http://www.example.org/brady#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix brady: <http://www.example.org/brady#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

brady:hasSibling  a             owl:ObjectProperty ;
        owl:propertyChainAxiom  ( brady:hasFather [ owl:inverseOf
                          brady:hasFather ] ) .

brady:Carol  a  owl:NamedIndividual , brady:Woman .

brady:hasBrother  a             owl:ObjectProperty ;
        owl:propertyChainAxiom  ( brady:hasSibling brady:r_Man ) .

<http://www.example.org/brady>
        a       owl:Ontology .

brady:Woman  a               owl:Class ;
        rdfs:subClassOf      brady:Person ;
        owl:equivalentClass  [ a               owl:Restriction ;
                               owl:hasSelf     true ;
                               owl:onProperty  brady:r_Woman
                             ] .

brady:hasFather  a  owl:ObjectProperty .

brady:Person  a  owl:Class .

brady:Man  a                 owl:Class ;
        rdfs:subClassOf      brady:Person ;
        owl:equivalentClass  [ a               owl:Restriction ;
                               owl:hasSelf     true ;
                               owl:onProperty  brady:r_Man
                             ] .

brady:r_Woman  a  owl:ObjectProperty .

brady:r_Man  a  owl:ObjectProperty .

brady:Marcia  a          owl:NamedIndividual , brady:Woman ;
        brady:hasFather  brady:Mike .

brady:Peter  a           owl:NamedIndividual , brady:Man ;
        brady:hasFather  brady:Mike .

brady:Jan  a             owl:NamedIndividual , brady:Woman ;
        brady:hasFather  brady:Mike .

brady:Cindy  a           owl:NamedIndividual , brady:Woman ;
        brady:hasFather  brady:Mike .

brady:Bobby  a           owl:NamedIndividual , brady:Man ;
        brady:hasFather  brady:Mike .

brady:Greg  a            owl:NamedIndividual , brady:Man ;
        brady:hasFather  brady:Mike .

brady:Mike  a   owl:NamedIndividual , brady:Man .

这篇关于如何推断两个人之间的isBrotherOf属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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