OWL2 modelling a subclass with one different axiom

前端 未结 1 1877
渐次进展
渐次进展 2021-01-25 02:38

I\'m trying to model some lexical data using OWL 2 (DL, using Protege). My main class is \"Lemma\", which has a number of axioms (using Manchester syntax):

Every         


        
相关标签:
1条回答
  • 2021-01-25 03:16

    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é:

    object properties about lem1

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

    inferred properties about lem2

    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>
    
    0 讨论(0)
提交回复
热议问题