2

我想建立一个本体来处理感染或未感染疾病的人:

<?xml version="1.0"?>
</rdf:RDF>
    <owl:Class rdf:about="&person;Disease"/>

    <owl:Class rdf:about="&person;HealthyPerson">
        <rdfs:subClassOf rdf:resource="&person;Person"/>
        <owl:disjointWith rdf:resource="&person;SickPerson"/>
    </owl:Class>

    <owl:Class rdf:about="&person;Person"/>

    <owl:Class rdf:about="&person;SickPerson">
        <rdfs:subClassOf rdf:resource="&person;Person"/>
    </owl:Class>
</rdf:RDF>

图形化:

类层次结构为树

如何定义属性has_disease(Person, Disease)Person以使与 some Diseaseby相关的类型的个体has_disease也被推断为具有 type SickPerson

4

2 回答 2

5

这个怎么样?

<owl:ObjectProperty rdf:ID="hasDisease">
  <rdfs:domain rdf:resource="#SickPerson"/>
  <rdfs:range rdf:resource="#Disease"/>
</owl:ObjectProperty>
于 2012-03-05T19:45:33.043 回答
0

您可以为此使用存在限制。在下面的示例中,个人joe将被推断为SickPerson

<owl:ObjectProperty rdf:about="has_disease"/>
<owl:Class rdf:about="Disease"/>
<owl:Class rdf:about="Person"/>
<owl:Class rdf:about="SickPerson">
    <owl:equivalentClass>
        <owl:Restriction>
            <owl:onProperty rdf:resource="has_disease"/>
            <owl:someValuesFrom rdf:resource="Disease"/>
        </owl:Restriction>
    </owl:equivalentClass>
    <rdfs:subClassOf rdf:resource="Person"/>
</owl:Class>

<owl:NamedIndividual rdf:about="flu">
    <rdf:type rdf:resource="Disease"/>
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="joe">
    <rdf:type rdf:resource="Person"/>
    <has_disease rdf:resource="flu"/>
</owl:NamedIndividual>
于 2013-09-04T08:41:30.430 回答