【问题标题】:OWL DL Query on Symmetric propertyOWL DL 查询对称属性
【发布时间】:2014-03-29 14:50:23
【问题描述】:

我正在尝试组合一个小型本体(HP 类、HEWLETT_PACKARD 类通过对称属性链接在一起)。猫头鹰在下面。我想要做的是在 Protege “equal_symmetric only hp”或“equal_symmetric only hewlett_packard”中查询并获得对方公司。本质上,我想获得每个公司名称的同义词。

    <owl:ObjectProperty rdf:about="ontologies/2014/1/untitled-ontology-2#equal_symmetric">
        <rdf:type rdf:resource="&owl;SymmetricProperty"/>
    </owl:ObjectProperty>

    <owl:Class rdf:about="ontologies/2014/1/untitled-ontology-2#hewlett_packard">
        <owl:equivalentClass>
            <owl:Restriction>
                <owl:onProperty rdf:resource="ontologies/2014/1/untitled-ontology-2#equal_symmetric"/>
                <owl:allValuesFrom rdf:resource="ontologies/2014/1/untitled-ontology-2#hp"/>
            </owl:Restriction>
        </owl:equivalentClass>        
    </owl:Class>

    <owl:Class rdf:about="ontologies/2014/1/untitled-ontology-2#hp">
        <rdfs:subClassOf rdf:resource="ontologies/2014/1/untitled-ontology-2#brand"/>
    </owl:Class>

【问题讨论】:

  • 作为一般说明,StackOverflow 不是一个论坛,所以虽然一开始可能看起来很奇怪,但我们不需要一些我们经常在电子邮件、看板、等等,比如签名和感谢。这次我把它们删掉了。同样,我删除了“任何建议赞赏”,因为 StackOverflow 问题往往很好并且专注于特定问题;开放式的事情进展不顺利。
  • 你到底想在这里做什么?如果它们是类,您可以声明 HEWLETT_PACKARD 和 HP 是等价的类。如果你有个人,你可以声明他们是owl:sameAs each other。你对 allValuesFrom 限制所做的事情不太清楚。所说的是类 hewlett_packard 等价于“这样的事物类,使得它们对属性 equal_symmetric 的任何值都必须是 hp。”我真的没有看到那里的实用程序。

标签: rdf semantic-web owl protege


【解决方案1】:

如果你有两个类并且你试图说它们是相同的,你可能应该只使用一个等价的类公理。在 Protégé 和 RDF/XML 中,它看起来像这样:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://stackoverflow.com/q/22047101/1281433/ontology#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <owl:Ontology rdf:about="http://stackoverflow.com/q/22047101/1281433/ontology"/>
  <owl:Class rdf:about="http://stackoverflow.com/q/22047101/1281433/ontology#HEWLETT_PACKARD">
    <owl:equivalentClass>
      <owl:Class rdf:about="http://stackoverflow.com/q/22047101/1281433/ontology#HP"/>
    </owl:equivalentClass>
  </owl:Class>
</rdf:RDF>

如果你使用 DL 查询,你可以看到等价的类:

【讨论】:

  • 谢谢约书亚。我现在走在正确的轨道上。我的印象是必须通过财产建立等效性,但我现在发现它没有。再次感谢。
  • @mj_ 恰恰相反;如果您希望两个类是等价的,您通常会断言它们是等价的。如果你最终通过各种公理使两个类等价,这表明你可能错过了一些东西。 (不总是,但经常。)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多