简体   繁体   English

如何推断猫头鹰中拥有超过 2 个属性的个体

[英]How to infer individual with more than 2 property in owl

I have an ontology with Person and Animal_Lover classes.我有一个包含 Person 和 Animal_Lover 类的本体。 People are Animal_Lover if they have more than 2 pet.如果人们拥有超过 2 只宠物,则他们是 Animal_Lover。 How can I do this in my ontology?我怎样才能在我的本体中做到这一点?

<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.example.com/test"
 xml:base="http://www.example.com/test"
 xmlns:test="http://www.example.com/test#"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:owl="http://www.w3.org/2002/07/owl#"
 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#">
 <owl:Ontology rdf:about="http://www.example.com/test"/>

 <owl:ObjectProperty rdf:about="http://www.example.com/test#hasPet"/>

    <owl:Class rdf:about="http://www.example.com/test#Animal_Lover">
    <owl:equivalentClass>
        <owl:Restriction>
            <owl:onProperty rdf:resource="http://www.example.com/test#hasOwner"/>
            <owl:minQualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">2</owl:minQualifiedCardinality>
            <owl:onClass rdf:resource="http://www.example.com/test#Mammal"/>
        </owl:Restriction>
    </owl:equivalentClass>
    <rdfs:subClassOf rdf:resource="http://www.example.com/test#Person"/>
 </owl:Class>

 <!-- http://www.example.com/test#Mammal -->

 <owl:Class rdf:about="http://www.example.com/test#Mammal"/>

 <!-- http://www.example.com/test#Person -->

 <owl:Class rdf:about="http://www.example.com/test#Person">
    <rdfs:subClassOf rdf:resource="http://www.example.com/test#Mammal"/>
 </owl:Class>
    <!-- http://www.example.com/test#Smith -->

 <owl:NamedIndividual rdf:about="http://www.example.com/test#Smith">
    <rdf:type rdf:resource="http://www.example.com/test#Person"/>
    <test:hasPet rdf:resource="http://www.example.com/test#Lulu"/>
    <test:hasPet rdf:resource="http://www.example.com/test#Nala"/>
    <test:hasPet rdf:resource="http://www.example.com/test#Tank"/>
 </owl:NamedIndividual>

</rdf:RDF>

I want Smith to be inferred and become Animal_Lover.我希望史密斯被推断并成为Animal_Lover。 But This code does not work in owl( or GraphDB).但是这段代码在 owl(或 GraphDB)中不起作用。 What is the problem?问题是什么?

Thanks for your help.谢谢你的帮助。

There are three problems:存在三个问题:

  1. First, it is quite possible that "Nala" and "Tank" are two nicknames of the pet Lulu.首先,“娜拉”和“坦克”很有可能是宠物露露的两个昵称。 So perhaps Smith only has one pet, whose name is Lulu and that people like to call Nala, or Tank, for some reasons.所以也许史密斯只有一只宠物,它的名字叫露露,出于某些原因,人们喜欢叫它娜拉或坦克。
  2. Second, the inference can only happen if you use the hasOnwer property.其次,只有使用hasOnwer属性才能进行推理。 You are using hasPet instead.您正在使用hasPet代替。
  3. Third, you did not say that Lula, Nala, and Tank are mammals.第三,你没有说卢拉、娜拉和坦克是哺乳动物。 If they are fishes, then you can't infer that Smith is an animal lover (!)如果它们是鱼,那么你不能推断史密斯是一个动物爱好者(!)

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

相关问题 如何在 OWL / GraphDB 中推断具有 2 个以上属性的个体? - How to infer individual with more than 2 properties in OWL / GraphDB? 从其属性的owl域推断个人的rdf类型 - Infer rdf type of individual from owl domain of its property 在 OWL 中,一个属性是否可能是多个属性的倒数? - In OWL, is possible that a property is the inverse of more than one property? 如何用OWL或SWRL推断这种“间接”主张? - How to Infer such “indirect” assertion with OWL or SWRL? 一个对象在OWL中的数据属性可以具有多个文字值吗? - Can an object have more than one literal value for a data property in OWL? 如何在猫头鹰中基于该类的子类的限制来推断该类中的限制? - How to infer a restriction in a class based on the restrictions of that class's subclasses, in owl? 如何使用SWI-Prolog从OWL RDF / XML查询个人的对象属性? - How to query an individual for its object property from an OWL RDF/XML using SWI-Prolog? OWL 2(概念产品)中每个人的班级财产断言 - property assertions on class level for every individual in OWL 2 (concept product) 如何在OWL中定义属性的域? - How to define the domain of a property in OWL? 如何找到OWL Lite,DL,完全推断规则? - How to find OWL Lite,DL,Full infer rules?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM