这里是我的本体创建与抗议者。
Prefix(:=<http://www.semanticweb.org/kolam/ontologies/2020/9/exInference#>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)
Ontology(<http://www.semanticweb.org/kolam/ontologies/2020/9/exInference>
Declaration(Class(:Course))
Declaration(Class(:Professor))
Declaration(Class(:ProfessorBusy))
Declaration(Class(:ProfessorLazy))
Declaration(ObjectProperty(:hasChild))
Declaration(ObjectProperty(:teaches))
Declaration(NamedIndividual(:INF1000))
Declaration(NamedIndividual(:INF2000))
Declaration(NamedIndividual(:INF3000))
Declaration(NamedIndividual(:INF4000))
Declaration(NamedIndividual(:INF5000))
Declaration(NamedIndividual(:John))
Declaration(NamedIndividual(:Marc))
############################
# Classes
############################
# Class: :Professor (:Professor)
EquivalentClasses(:Professor ObjectSomeValuesFrom(:teaches :Course))
# Class: :ProfessorBusy (:ProfessorBusy)
EquivalentClasses(:ProfessorBusy ObjectIntersectionOf(:Professor ObjectComplementOf(:ProfessorLazy)))
# Class: :ProfessorLazy (:ProfessorLazy)
EquivalentClasses(:ProfessorLazy ObjectIntersectionOf(:Professor ObjectMaxCardinality(2 :teaches :Course)))
############################
# Named Individuals
############################
# Individual: :INF1000 (:INF1000)
ClassAssertion(:Course :INF1000)
# Individual: :INF2000 (:INF2000)
ClassAssertion(:Course :INF2000)
# Individual: :INF3000 (:INF3000)
ClassAssertion(:Course :INF3000)
# Individual: :INF4000 (:INF4000)
ClassAssertion(:Course :INF4000)
# Individual: :INF5000 (:INF5000)
ClassAssertion(:Course :INF5000)
# Individual: :John (:John)
ObjectPropertyAssertion(:teaches :John :INF1000)
ObjectPropertyAssertion(:teaches :John :INF2000)
# Individual: :Marc (:Marc)
ObjectPropertyAssertion(:teaches :Marc :INF3000)
ObjectPropertyAssertion(:teaches :Marc :INF4000)
ObjectPropertyAssertion(:teaches :Marc :INF5000)
DifferentIndividuals(:INF1000 :INF2000 :INF3000 :INF4000 :INF5000)
)正如预期的那样,推理者正确地将Marc归类为ProfessorBusy的一个实例,因为他教授了超过2门课程。然而,John只教两门课,推理者不会把他归类为ProfessorLazy。
我猜想,由于开放世界的假设,我们从来不确定约翰实际上只教了两门课。
还有别的办法让这件事成功吗?如果某物不是ProfessorBusy,那么它就是ProfessorLazy?
发布于 2020-11-02 17:11:10
推理者没有推断John是ProfessorLazy的原因是由于开放世界的假设。开放世界假设基本上意味着推理者只能根据明确声明的信息或从明确声明的信息中派生出来的信息进行推理。推理者不能做出任何判断的东西。
这就是为什么推理者不能推断John是ProfessorLazy的原因。它只知道约翰教了两门课。没有任何信息表明John只教授2门课程。推理者假设约翰可能正在教授一门目前尚不清楚的课程。
为了得到你想要的,你需要关闭这个世界。这实质上就是@Stanislav Kralin的评论所表达的意思。
NegativeObjectPropertyAssertion(:teaches :John :INF3000)等为了(1)工作,您需要声明有有限数量的课程:EquivalentClasses(:Course ObjectOneOf(:INF1000 :INF2000 :INF3000 :INF4000 :INF5000))
https://stackoverflow.com/questions/64638586
复制相似问题