简体   繁体   中英

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).

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.

Both mentioned classes(EmployedPerson and UnEmployedPerson) are subclasses of Person, and person is set as "EmployedPerson or UnEmployedPerson". Person class has three individuals: Ivan, Lenka and Martin. All individuals are different individuals.

Another class Place, has an individual "WorksApplication". The object property 'worksin' links class 'Person' and class '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.

For Ivan doesn't belong to EmployedPerson, and UnEmployedPerson is complement of EmployedPerson, so Evan should be inferred as a member of class UnEmployedPerson .

But in fact, after the reasoning by Pellet and Hermit, Ivan can not be inferred in class UnEmployedPerson . The result didn't meet my expectation. Is there something wrong with my ONTOLOGY, or I neglect the effect of OWA ? Please help me deal with that problem, I want to see Ivan is inferred in class 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

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.

1) That is indeed the result of OWA. We do not know whether Ivan have a place to work or not. As we don't know that it has working place, we couldn't deduce that he is EmployedPerson . As we don't know whether it doesn't have working place, we couldn't deduce that he is 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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