你可以这样做。在你有的情况下
isVariantOf hasLanguage
lemma2 ---------------> lemma1 ---------------> language1
那么你想推断一个额外的属性:
hasLanguage
lemma2 ---------------> language1
由于您可以在第一个图中找到从lemma2
到的路径,因此language1
您断言第二个图必须通过以下子属性链公理存在。当然,您也需要对其他属性执行相同的操作。
isVariantOf o hasLanguage SubPropertyOf hasLanguage
当你有一个 OWL 推理器和这些公理时,如果你有关于lem1
和 that的断言lem2 isVariantOf lem1
,你会看到lem2
. 这是 alem1
及其在 Protégé 中的属性:
附加 Pellet 推理器后,推断hasEtymology
和hasLanguage
属性lem2
(以黄色背景显示):
如果您有兴趣,这是 OWL 本体:
<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>