代码之家  ›  专栏  ›  技术社区  ›  Marc W

RDF上的属性链推理:类型

  •  4
  • Marc W  · 技术社区  · 15 年前

    我试图让小球将属性从类传播到属于这些类的个人。例如,如果我有一个具有属性x的类A和一个具有rdf:type=class A的个体B,我希望个体B在运行reasoner之后具有属性x。我正在使用上引用的属性链包含技术 OWL 2 New Features 页。如果我在属性链中使用自己的自定义属性,这种技术就可以很好地工作,但是如果我尝试使用rdf:type本身,它就不能工作。下面是我的RDF/XML的一些相关片段。

    本体类(由Jena生成;注意“spread”属性,因为这是我试图传播给类人的个人的内容):

    <rdf:Description rdf:about="http://family/person">
        <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
        <owl:sameAs rdf:resource="http://family/person"/>
        <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
        <owl:equivalentClass rdf:resource="http://family/person"/>
        <owl:disjointWith rdf:resource="http://www.w3.org/2002/07/owl#Nothing"/>
        <j.1:spread rdf:resource="http://spread/specificSpread"/>
        <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
    </rdf:Description>
    

    “Spread”属性本身(由我手动编写,不是由Jena生成的,因为Jena的API不支持对象属性链):

    <rdf:Description rdf:about="http://spread/generalSpread">
        <owl:propertyChainAxiom rdf:parseType="Collection">
            <owl:ObjectProperty rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
            <owl:ObjectProperty rdf:about="http://spread/generalSpread"/>
        </owl:propertyChainAxiom>
    </rdf:Description>
    

    在推理之前,俄狄浦斯人看起来是这样的:

    <rdf:Description rdf:about="http://family/Oedipus">
        <rdf:type rdf:resource="http://family/person"/>
    </rdf:Description>
    

    其想法是,经过推理,它看起来像这样:

    <rdf:Description rdf:about="http://family/Oedipus">
        <rdf:type rdf:resource="http://family/person"/>
        <j.1:spread rdf:resource="http://spread/specificSpread"/>
    </rdf:Description>
    

    我有一种感觉,把rdf:type称为rdf:resource可能是事情变得越来越糟的地方,因为我很确定它不是资源。但我不知道怎么修。我也运行了Peel的命令行lint程序,除了它为rdf:type创建了一个显式条目,它看起来没有问题:

    <owl:ObjectProperty rdf:about="&rdf;type"/>
    

    在我看来有点奇怪,也可能是它不理解我对rdf:type的引用。

    有人能解释一下可能发生的事情吗?我真的很感激任何人能提供的帮助。

    1 回复  |  直到 12 年前
        1
  •  2
  •   Marc W    15 年前

    非常重要的编辑

    事实证明,在owl-dl领域中,属性传播是可能的。例如,如果要传播属性 spread 用价值 simpleSpread (假设已经在RDF中定义了这两者),您可以这样做(在RDF/XML中):

      <rdf:Description rdf:about="http://family/person">
        <rdfs:subClassOf>
            <owl:hasValue rdf:resource="http://spread/simpleSpread"/>
            <owl:onProperty rdf:resource="http://spread/hasSpread"/>
            <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Restriction"/>
        </rdfs:subClassOf>
        <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
      </rdf:Description> 
    

    不再那么重要了

    好的,为了信息的完整性,我将在这里发布相关的答案信息。这些东西来自与颗粒用户邮件列表上的人交谈。线程已存档,并以我的 initial message . 沿着这条线,找出具体发生了什么。

    基本上, OWL DL 不允许对内置属性和数据类型进行“反射”。允许这样做可能会违反owl dl所保证的多项式时间可判定性。为了实现这一点,您必须使用 OWL RL profile 关于猫头鹰的完整性,它对猫头鹰中的所有事物都给予平等的对待,从而允许使用推理 rdf:type .

    与此相关的主要问题是找到一个既支持dl又支持rl的推理机(或推理机组合),因为rl比dl轻得多,表达能力也差(更不用说保证在多项式时间内是可判定的)。

    推荐文章