简体   繁体   English

OWL和Pr​​otege中的互补推理

[英]Complement reasoning in OWL and Protege

I had recently created a little ontology to practice. 我最近创建了一个小本体来练习。 In my ontology, there exists a class which is EmployedPerson, defined by one SWRL rule: Person(?x), (worksin min 1 Place)(?x) -> EmployedPerson(?x). 在我的本体中,存在一个由EmployedPerson定义的类,该类由一个SWRL规则定义:Person(?x),(在1个位置内最小工作)(?x)-> EmployedPerson(?x)。

Also I have another class which is UnEmployedPerson, defined by a class expression: Equivalent to (Person and (not (EmployedPerson))), which means UnEmployedPerson is complement of EmployedPerson. 我还有另一个类,它是UnEmployedPerson,由一个类表达式定义:等效于(Person和(not(EmployedPerson))),这意味着UnEmployedPerson是EmployedPerson的补充。

Both mentioned classes(EmployedPerson and UnEmployedPerson) are subclasses of Person, and person is set as "EmployedPerson or UnEmployedPerson". 提到的两个类(EmployedPerson和UnEmployedPerson)都是Person的子类,并且person被设置为“ EmployedPerson或UnEmployedPerson”。 Person class has three individuals: Ivan, Lenka and Martin. 人物课有三个人:伊万,伦卡和马丁。 All individuals are different individuals. 所有个人都是不同的个人。

Another class Place, has an individual "WorksApplication". 另一个类Place,具有单独的“ WorksApplication”。 The object property 'worksin' links class 'Person' and class 'Place'. 对象属性“ worksin”链接类“ Person”和类“ Place”。

In my ontology, there are two axioms: Lenka worksin Worksapplication Martin worksin Worksapplication After reasoning by Pellet and HermiT, Lenka and Martin could be inferred as members of EmployedPerson based on SWRL rule. 在我的本体中,有两个公理:Lenka worksin在Worksapplication中Martin工作在Worksapplication中在经过Pellet和HermiT的推理后,可以根据SWRL规则将Lenka和Martin推断为EmployedPerson的成员。

For Ivan doesn't belong to EmployedPerson, and UnEmployedPerson is complement of EmployedPerson, so Evan should be inferred as a member of class UnEmployedPerson . 因为Ivan不属于EmployedPerson,并且UnEmployedPerson是EmployedPerson的补充,所以应将Evan推断为UnEmployedPerson类的成员。

But in fact, after the reasoning by Pellet and Hermit, Ivan can not be inferred in class UnEmployedPerson . 但是实际上,经过Pellet和Hermit的推理,不能将Ivan归类为UnEmployedPerson。 The result didn't meet my expectation. 结果没有达到我的期望。 Is there something wrong with my ONTOLOGY, or I neglect the effect of OWA ? 我的本体论是否有问题,或者我忽略了OWA的影响? Please help me deal with that problem, I want to see Ivan is inferred in class UnEmployedPerson!! 请帮助我解决这个问题,我想看看Ivan是在UnEmployedPerson类中推断出来的!!

Here is my ontology that demonstrates this behavior: 这是我的本体,演示了此行为:

<Declaration>
    <Class IRI="#Adult"/>
</Declaration>
<Declaration>
    <Class IRI="#EmployedPerson"/>
</Declaration>
<Declaration>
    <Class IRI="#Parent"/>
</Declaration>
<Declaration>
    <Class IRI="#Person"/>
</Declaration>
<Declaration>
    <Class IRI="#Place"/>
</Declaration>
<Declaration>
    <Class IRI="#UnemployedPerson"/>
</Declaration>
<Declaration>
    <ObjectProperty IRI="#wokrsin"/>
</Declaration>
<Declaration>
    <NamedIndividual IRI="#Ivan"/>
</Declaration>
<Declaration>
    <NamedIndividual IRI="#Lenka"/>
</Declaration>
<Declaration>
    <NamedIndividual IRI="#Martin"/>
</Declaration>
<Declaration>
    <NamedIndividual IRI="#TreatHighBloodSugar"/>
</Declaration>
<Declaration>
    <NamedIndividual IRI="#worksapplication"/>
</Declaration>
<EquivalentClasses>
    <Class IRI="#Person"/>
    <ObjectUnionOf>
        <Class IRI="#EmployedPerson"/>
        <Class IRI="#UnemployedPerson"/>
    </ObjectUnionOf>
</EquivalentClasses>
<EquivalentClasses>
    <Class IRI="#UnemployedPerson"/>
    <ObjectIntersectionOf>
        <Class IRI="#Person"/>
        <ObjectComplementOf>
            <Class IRI="#EmployedPerson"/>
        </ObjectComplementOf>
    </ObjectIntersectionOf>
</EquivalentClasses>
<SubClassOf>
    <Class IRI="#Adult"/>
    <Class IRI="#Person"/>
</SubClassOf>
<SubClassOf>
    <Class IRI="#EmployedPerson"/>
    <Class IRI="#Person"/>
</SubClassOf>
<SubClassOf>
    <Class IRI="#Parent"/>
    <Class IRI="#Person"/>
</SubClassOf>
<SubClassOf>
    <Class IRI="#UnemployedPerson"/>
    <Class IRI="#Person"/>
</SubClassOf>
<DisjointClasses>
    <Class IRI="#Person"/>
    <Class IRI="#Place"/>
</DisjointClasses>
<ClassAssertion>
    <Class IRI="#Person"/>
    <NamedIndividual IRI="#Ivan"/>
</ClassAssertion>
<ClassAssertion>
    <Class IRI="#Person"/>
    <NamedIndividual IRI="#Lenka"/>
</ClassAssertion>
<ClassAssertion>
    <Class IRI="#Person"/>
    <NamedIndividual IRI="#Martin"/>
</ClassAssertion>
<ClassAssertion>
    <Class IRI="#Place"/>
    <NamedIndividual IRI="#worksapplication"/>
</ClassAssertion>
<DifferentIndividuals>
    <NamedIndividual IRI="#Ivan"/>
    <NamedIndividual IRI="#Lenka"/>
</DifferentIndividuals>
<DifferentIndividuals>
    <NamedIndividual IRI="#Ivan"/>
    <NamedIndividual IRI="#Martin"/>
</DifferentIndividuals>
<DifferentIndividuals>
    <NamedIndividual IRI="#Ivan"/>
    <NamedIndividual IRI="#worksapplication"/>
</DifferentIndividuals>
<DifferentIndividuals>
    <NamedIndividual IRI="#Lenka"/>
    <NamedIndividual IRI="#Martin"/>
</DifferentIndividuals>
<DifferentIndividuals>
    <NamedIndividual IRI="#Lenka"/>
    <NamedIndividual IRI="#worksapplication"/>
</DifferentIndividuals>
<DifferentIndividuals>
    <NamedIndividual IRI="#Martin"/>
    <NamedIndividual IRI="#worksapplication"/>
</DifferentIndividuals>
<ObjectPropertyAssertion>
    <ObjectProperty IRI="#wokrsin"/>
    <NamedIndividual IRI="#Lenka"/>
    <NamedIndividual IRI="#worksapplication"/>
</ObjectPropertyAssertion>
<ObjectPropertyAssertion>
    <ObjectProperty IRI="#wokrsin"/>
    <NamedIndividual IRI="#Martin"/>
    <NamedIndividual IRI="#worksapplication"/>
</ObjectPropertyAssertion>
<DLSafeRule>
    <Body>
        <ClassAtom>
            <Class IRI="#Person"/>
            <Variable abbreviatedIRI="var:x"/>
        </ClassAtom>
        <ClassAtom>
            <ObjectMinCardinality cardinality="1">
                <ObjectProperty IRI="#wokrsin"/>
                <Class IRI="#Place"/>
            </ObjectMinCardinality>
            <Variable abbreviatedIRI="var:x"/>
        </ClassAtom>
    </Body>
    <Head>
        <ClassAtom>
            <Class IRI="#EmployedPerson"/>
            <Variable abbreviatedIRI="var:x"/>
        </ClassAtom>
    </Head>
</DLSafeRule>

0) Instead of using SWRL rule, you can use GCI 0)您可以使用GCI代替SWRL规则

Person and (works min 1 Place) subClassOf EmployedPerson . Person and (works min 1 Place) subClassOf EmployedPerson

This would allow you to use reasoners that does not support SWRL, works on classes as well (and not only on named individuals), and provides better performance in general. 这样一来,您就可以使用不支持SWRL的推理机,该推理机也可以在类上工作(不仅限于命名的个人),并且总体上可以提供更好的性能。

1) That is indeed the result of OWA. 1)这确实是OWA的结果。 We do not know whether Ivan have a place to work or not. 我们不知道Ivan是否有工作场所。 As we don't know that it has working place, we couldn't deduce that he is EmployedPerson . 由于我们不知道它工作场所,因此我们无法推断出他是EmployedPerson As we don't know whether it doesn't have working place, we couldn't deduce that he is UnEmployedPerson . 由于我们不知道它是否没有工作场所,因此我们无法推断出他是UnEmployedPerson The fact that Person is completely covered by EmployedPerson and UnEmployedPerson doesn't matter here: we still don't know (and couldn't infer due to OWA) which kind of Person he is and couldn't reject any option. 这里的Person完全由EmployedPersonUnEmployedPerson覆盖这一事实并不重要:我们仍然不知道(由于OWA而无法推断)他是哪种Person ,也不能拒绝任何选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM