OWL2使用一种不同的公理为子类建模 [英] OWL2 modelling a subclass with one different axiom
问题描述
我正在尝试使用OWL 2(DL,使用Protege)对一些词法数据进行建模.我的主要课程是引理",它具有许多公理(使用曼彻斯特语法):
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 Lemma hasLanguage some Language.
Every Lemma hasEtymology some Etymology.
Every Lemma hasMorphology some Morphology.
等
我也有一个VariantLemma类,它基本上是原始引理的变体拼写,但它始终具有与其父引理相同的语言和词源,但是可以具有不同的形态.我最初将其建模为等同于:
I also have a class VariantLemma, which is basically a variant spelling of the original lemma, but it will always have the same language and etymology as its parent Lemma, but can have different morphology. I originally modelled it as being equivalent to:
Lemma and (isVariantOf some Lemma)
但是我如何声明它对于除形态学之外的所有公理将具有与其父引理相同的值?我可以通过某种方式使用财产链吗?
but how can I state that it'll have the same values as its parent lemma for all axioms except Morphology? Can I use property chains in some way?
感谢您的任何建议!
推荐答案
您可以执行此操作.如果您有
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
由于可以在第一个图中找到从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
如果您拥有OWL推理程序和这些公理,那么如果您有关于lem1
和lem2 isVariantOf lem1
的断言,您将看到lem2
的推断属性.这是lem1
及其在Protégé中的属性:
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é:
在附加了Pellet推理程序的情况下,可以推断lem2
的hasEtymology
和hasLanguage
属性(以黄色背景显示):
With the Pellet reasoner attached, the hasEtymology
and hasLanguage
properties are inferred for lem2
(shown with a yellow background):
如果您感兴趣的话,这里是OWL本体:
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>
这篇关于OWL2使用一种不同的公理为子类建模的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!