在Protege上使用类表达式进行类型推断 [英] Type inference using class expresions on Protege
问题描述
我希望我可以这样定义Elective_Course
,使得所有partOf
a Knowledge_Unit
而不是Core_Course
类型的个人都是Elective_Course
s.
对于Course
我有这个:
我想也许(partOf only Knowledge_unit) and not(Core_Course)
上的某些东西可以解决这个问题,但这是行不通的.
也许是因为我需要only
的逆属性和only
,但是我没有定义该属性,因为我不需要其余的属性.所以我可以在Knowledge_Unit
中说hasPart only Course
,然后在Elective_Course
上说not(Core_Course)
.
但是我迷路了,因此欢迎您提供任何帮助或示例链接.
在此处
您遇到的问题是由于OWL和描述逻辑中的开放世界假设所致.这意味着推理者将仅从明确声明的信息中推断出新的推论,而不会从缺乏信息中推断出新的推论.
因此,要获得所需的结果,必须声明Core_Course
和Elective_Course
是不相交的.然后,您可以执行以下两项操作之一:
(1)为每个要选修的个人声明其为not
(Core_Course)
类型.但是然后您可以很好地声明它为Elective_Course
类型.
(2)用core1, core2, ... coren, elective1, elective2, ..., electivek
来定义您所有知识单元的个人.然后将Knowledge_Unit
设置为等同于所有个人,并将Core_Course
设置为所有核心课程个人,即
Class: Knowledge_Unit
EquivalentTo: {core1, core2, ... coren, elective1, elective2, ..., electivek}
Class: Core_Course
SubClassOf: Knowledge_Unit,
EquivalentTo: {core1, core2, ... coren}
更新:20180510
Wrt通用属性限制(例如partOf only KnowledgeUnit
)很重要,要理解它还包括已知不参与任何partOf
关系的个人.这可能导致难以理解的含义.我已经在此处中写过信.. >
I was hoping I could defined Elective_Course
in such a way that all individuals that are partOf
a Knowledge_Unit
and are not of type Core_Course
are Elective_Course
s.
For Course
I have this:
I thought maybe something on the lines of (partOf only Knowledge_unit) and not(Core_Course)
would do the trick, but it doesn't work.
Maybe it is because I need and only
with the inverse property of partOf
, but I haven't defined that property since I didn't need it for the rest. So I could say in Knowledge_Unit
that hasPart only Course
and then not(Core_Course)
on the Elective_Course
.
But I'm lost, so any help or links to examples are welcome.
The full ontology is available here
The problem you are experiencing is due to the open world assumption in OWL and Description Logics. This means the reasoner will only infer new inferences from explicitly stated information and not from absence of information.
So to achieve your desired result you have to state that Core_Course
and Elective_Course
are disjoint. Then you can do one of two things:
(1) State for each individual that is an elective that it is of type not
(Core_Course)
. But then you could just as well state it as of type Elective_Course
.
(2) Define all your knowledge unit individuals as say core1, core2, ... coren, elective1, elective2, ..., electivek
. Then set Knowledge_Unit
equivalent to all individuals and Core_Course
to all core course individuals, i.e.
Class: Knowledge_Unit
EquivalentTo: {core1, core2, ... coren, elective1, elective2, ..., electivek}
Class: Core_Course
SubClassOf: Knowledge_Unit,
EquivalentTo: {core1, core2, ... coren}
Update: 20180510
Wrt universal property restrictions like partOf only KnowledgeUnit
, it is important to understand that it also includes individuals for which it is known that they do not take part in any partOf
relation. This can lead to entailments that can be difficult to understand. I have written about this here.
这篇关于在Protege上使用类表达式进行类型推断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!