How to infer isBrotherOf property between two individuals

前端 未结 4 544
轮回少年
轮回少年 2020-11-30 10:47

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

So, if I have this:

Bart hasFather Homer.

4条回答
  •  遥遥无期
    2020-11-30 11:22

    Assuming that everyone is their own brother, and that sisters are brothers too:

    :hasBrother  owl:propertyChainAxiom  (:hasFather [ owl:inverseOf :hasFather ]) .
    

    It is hardly possible to define :hasBrother more precisely, excluding female brothers and self-brotherhood. But you can infer all the brothers of Lisa as follows:

    :Female  a  owl:Class .
    :Male  a  owl:Class;
      owl:disjointWith  :Female .
    :Lisa  a  :Female .
    :Bart  a  :Male .
    :Homer a  :Male .
    :hasFather  a  owl:ObjectProperty;
      rdfs:range  :Male .
    :hasBrother a  owl:ObjectProperty;
      rdfs:range  :Male .
    :hasSiblingOrSelf  owl:propertyChainAxiom  ( :hasFather [ :hasFather ] ) .
    :LisaBrother  owl:equivalentClass  [
        a  owl:Restriction;
        owl:onProperty  [ owl:inverseOf  :hasBrother ];
        owl:hasValue  :Lisa
      ], [
        a  owl:Class;
        owl:intersectionOf  (
          [ a owl:Restriction; owl:onProperty :hasSiblingOrSelf; owl:hasValue :Lisa ]
          :Male
        )
      ] .
    

提交回复
热议问题