OWL2 modelling a subclass with one different axiom

巧了我就是萌 提交于 2019-12-02 05:04:46

You can do this. In the situation that you have the

         isVariantOf             hasLanguage
lemma2 ---------------> lemma1 ---------------> language1

then you want to infer an additional propertty:

         hasLanguage
lemma2 ---------------> language1

Since you can find a path in the first graph from lemma2 to language1, you assert that the second graph must exist by the following subproperty chain axiom. You need to do the same for the other properties, too, of course.

isVariantOf o hasLanguage SubPropertyOf hasLanguage

When you have an OWL reasoner and these axioms, then if you have assertions that about lem1, and that lem2 isVariantOf lem1, you'll see the inferred properties for lem2. Here's a lem1 and its properties in Protégé:

With the Pellet reasoner attached, the hasEtymology and hasLanguage properties are inferred for lem2 (shown with a yellow background):

Here's the OWL ontology, if you're interested:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns="http://www.example.org/lemmata#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <owl:Ontology rdf:about="http://www.example.org/lemmata"/>
  <owl:Class rdf:about="http://www.example.org/lemmata#Morphology"/>
  <owl:Class rdf:about="http://www.example.org/lemmata#VariantLemma">
    <owl:equivalentClass>
      <owl:Class>
        <owl:intersectionOf rdf:parseType="Collection">
          <owl:Class rdf:about="http://www.example.org/lemmata#Lemma"/>
          <owl:Restriction>
            <owl:onProperty>
              <owl:ObjectProperty rdf:about="http://www.example.org/lemmata#isVariantOf"/>
            </owl:onProperty>
            <owl:someValuesFrom rdf:resource="http://www.example.org/lemmata#Lemma"/>
          </owl:Restriction>
        </owl:intersectionOf>
      </owl:Class>
    </owl:equivalentClass>
  </owl:Class>
  <owl:Class rdf:about="http://www.example.org/lemmata#Language"/>
  <owl:Class rdf:about="http://www.example.org/lemmata#Etymology"/>
  <owl:ObjectProperty rdf:about="http://www.example.org/lemmata#hasEtymology">
    <owl:propertyChainAxiom rdf:parseType="Collection">
      <rdf:Description>
        <owl:inverseOf rdf:resource="http://www.example.org/lemmata#isVariantOf"/>
      </rdf:Description>
      <owl:ObjectProperty rdf:about="http://www.example.org/lemmata#hasEtymology"/>
    </owl:propertyChainAxiom>
  </owl:ObjectProperty>
  <owl:ObjectProperty rdf:about="http://www.example.org/lemmata#hasLanguage">
    <owl:propertyChainAxiom rdf:parseType="Collection">
      <rdf:Description>
        <owl:inverseOf rdf:resource="http://www.example.org/lemmata#isVariantOf"/>
      </rdf:Description>
      <owl:ObjectProperty rdf:about="http://www.example.org/lemmata#hasLanguage"/>
    </owl:propertyChainAxiom>
  </owl:ObjectProperty>
  <owl:ObjectProperty rdf:about="http://www.example.org/lemmata#hasMorphology"/>
</rdf:RDF>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!