OWL本体:不会将个体推断为在其类表达式中使用Data属性的类的成员

问题描述 投票:1回答:1

我面临的问题是,reasoners(例如Pellet)不会将个人分类为其定义使用数据属性限制的类。

我在protege 5中创建了一个最小的OWL本体示例(基于着名的比萨示例)来说明这个问题。

有三个类:MarghartiaPizza,LowCaloriePizza,HighCaloriePizza。有一个hasCalorificContentValue数据属性。 MarghartiaPizza类有两个人,ExampleMarghartiaPizza和QuattroFormaggio,分别有263和723个值作为hasCalorificContentValue。

HighCaloriePizza和LowCaloriePizza类定义为沿着hasCalorificContentValue具有> = 400,<400,值的那些类。

问题是,为什么推理人根据他们的价值观推断这两个人属于HighCaloriePizza和LowCaloriePizza课程?

在High / LowCaloriePizza或hasCalorificContentValue中我的类表达式的语法有什么问题吗?

您应该能够将代码复制/粘贴到文件中,使用protege 5打开它,然后尝试运行Pellet推理器。

<?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
 xml:base="http://www.pizza.com/ontologies/pizza.owl"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:xml="http://www.w3.org/XML/1998/namespace"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 ontologyIRI="http://www.pizza.com/ontologies/pizza.owl"
 versionIRI="http://www.pizza.com/ontologies/pizza.owl/v1.0">
<Prefix name="" IRI="http://www.pizza.com/ontologies/pizza.owl"/>
<Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/>
<Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
<Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
<Declaration>
    <Class IRI="#HighCaloriePizza"/>
</Declaration>
<Declaration>
    <Class IRI="#LowCaloriePizza"/>
</Declaration>
<Declaration>
    <Class IRI="#MargheritaPizza"/>
</Declaration>
<Declaration>
    <DataProperty IRI="#hasCalorificContentValue"/>
</Declaration>
<Declaration>
    <NamedIndividual IRI="#ExampleMargherita"/>
</Declaration>
<Declaration>
    <NamedIndividual IRI="#QuattroFormaggio"/>
</Declaration>
<EquivalentClasses>
    <Class IRI="#HighCaloriePizza"/>
    <DataSomeValuesFrom>
        <DataProperty IRI="#hasCalorificContentValue"/>
        <DatatypeRestriction>
            <Datatype abbreviatedIRI="xsd:integer"/>
            <FacetRestriction facet="http://www.w3.org/2001/XMLSchema#minInclusive">
                <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#integer">400</Literal>
            </FacetRestriction>
        </DatatypeRestriction>
    </DataSomeValuesFrom>
</EquivalentClasses>
<EquivalentClasses>
    <Class IRI="#LowCaloriePizza"/>
    <DataSomeValuesFrom>
        <DataProperty IRI="#hasCalorificContentValue"/>
        <DatatypeRestriction>
            <Datatype abbreviatedIRI="xsd:integer"/>
            <FacetRestriction facet="http://www.w3.org/2001/XMLSchema#maxExclusive">
                <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#integer">400</Literal>
            </FacetRestriction>
        </DatatypeRestriction>
    </DataSomeValuesFrom>
</EquivalentClasses>
<ClassAssertion>
    <Class IRI="#MargheritaPizza"/>
    <NamedIndividual IRI="#ExampleMargherita"/>
</ClassAssertion>
<ClassAssertion>
    <Class IRI="#MargheritaPizza"/>
    <NamedIndividual IRI="#QuattroFormaggio"/>
</ClassAssertion>
<DataPropertyAssertion>
    <DataProperty IRI="#hasCalorificContentValue"/>
    <NamedIndividual IRI="#ExampleMargherita"/>
    <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#integer">263</Literal>
</DataPropertyAssertion>
<DataPropertyAssertion>
    <DataProperty IRI="#hasCalorificContentValue"/>
    <NamedIndividual IRI="#QuattroFormaggio"/>
    <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#integer">723</Literal>
</DataPropertyAssertion>
<FunctionalDataProperty>
    <DataProperty IRI="#hasCalorificContentValue"/>
</FunctionalDataProperty>
</Ontology>

这是Pellet运行的protege应用程序的屏幕截图。如您所见,HighCaloriePizza已被选中,但QuattroFormaggio不在“实例”下。

enter image description here

owl ontology protege
1个回答
0
投票

确保选中右下方的“显示推理”复选框!

附:屏幕截图与上面发送的最小示例不对应,但是选中该框将使最小示例也起作用。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.