描述 需要对两个个体的相同性或差异进行建模的逻辑表示
Description Logic representation that requires the modelling of sameness or distiction of two individuals
我正在尝试在描述逻辑中对以下语句建模。
共同教学的教员是指作为学术人员并教授至少一门由他人教授的课程的人
我想到的表示法是:
CoTeachingFaculty EQUIV Person INTERSECTION AcademicStaff EXISTS teaches.(Course INTERSECTION EXISTS isTaughtBy.TOP)
我觉得这是一个不正确的表示,因为 EXISTS isTaughtBy.TOP
会通过链条 x--teaches-->c--isTaughtBy-->x
将个人与自己联系起来。因此,即使教员不与其他人共享课程,她也将属于 class CoTeachingFaculty
.
因此需要建立一条x和y不同的链x--teaches-->c--isTaughtBy-->y
。 是否可以在描述逻辑框架中对这种情况进行建模?
是的,你说的很对,你的陈述不会达到预期的效果。
我能想到的可能有 2 种方法可以实现 more-or-less 你想要的:
(1) 引入一个非反身的coTeachesWith
角色,定义teaches
为
teaches \sqsubseteq coTeachesWith o teaches
。通过这种方式,您可以声明一位讲师 co-teaches 和另一位讲师,您可以从中推断出讲授相同的课程。缺点是它会推断该讲师教授的所有 类 也由 co-teaching 讲师教授 - 这可能不是您想要的。
(2) 另一种方法是使用SWRL 规则。有了它,您可以提供如下规则:
teaches(?x, ?c) ^ teaches(?y, ?c) ^ differentFrom(?x, ?y) ->
CoTeachingFaculty(?x) ^ CoTeachingFaculty(?y)
下面我为 ontology 应用这两个选项提供 OWL 曼彻斯特语法:
前缀::http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#
前缀:owl:http://www.w3.org/2002/07/owl#
前缀:rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#
前缀:rdfs:http://www.w3.org/2000/01/rdf-schema#
前缀:xml:http://www.w3.org/XML/1998/namespace
前缀:xsd:http://www.w3.org/2001/XMLSchema#
Ontology: <http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual>
<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual/0.0.1>
AnnotationProperty: <http://swrl.stanford.edu/ontologies/3.3/swrla.owl#isRuleEnabled>
AnnotationProperty: rdfs:comment
AnnotationProperty: rdfs:label
Datatype: xsd:boolean
Datatype: xsd:string
ObjectProperty: coTeachesWith
Characteristics: Irreflexive
Domain: CoTeachingFaculty
Range: CoTeachingFaculty
ObjectProperty: isTaughtBy
Domain: Course
Range: AcademicStaff
ObjectProperty: teaches
SubPropertyChain: coTeachesWith o teaches
Domain: AcademicStaff
Range: Course
Class: AcademicStaff
SubClassOf: Person,
teaches some Course
Class: CoTaughtCourse
EquivalentTo: isTaughtBy min 2 owl:Thing
SubClassOf: Course
Class: CoTeachingFaculty
SubClassOf: AcademicStaff
Class: Course
DisjointWith: Person
Class: Person
DisjointWith: Course
Class: owl:Thing
Individual: course1
Types: Course
Facts:
isTaughtBy lecturer1,
isTaughtBy lecturer2
DifferentFrom: course2
Individual: course2
Types: Course
DifferentFrom: course1
Individual: course3
Individual: lecturer1
Facts: coTeachesWith lecturer2
DifferentFrom: lecturer2
Individual: lecturer2
Facts:
teaches course1,
teaches course2
DifferentFrom: lecturer1
Individual: lecturer3
Facts: teaches course2
DifferentFrom: lecturer4
Individual: lecturer4
Facts: teaches course2
DifferentFrom: lecturer3
DifferentIndividuals:
course1,course2,course3
Rule:
teaches(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#x>, ?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#c>), teaches(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#y>, ?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#c>), DifferentFrom (?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#x>, ?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#y>) -> CoTeachingFaculty(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#x>), CoTeachingFaculty(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#y>)
PS。我没有将 teaches
设置为 taughtBy
的反函数,因为这样 teaches
不再是一个简单的角色,因此不能在角色链中使用。有关详细信息,请参阅 SROIQ.
上的论文
最具表现力的 DL 和 OWL2 语言包括对角色的“数量限制”,例如“至少由两个不同的人教授的课程”。 OWL 2 规范 provides 是使用其“ObjectMinCardinality”功能完成所需任务的一个非常清楚的示例。
我正在尝试在描述逻辑中对以下语句建模。
共同教学的教员是指作为学术人员并教授至少一门由他人教授的课程的人
我想到的表示法是:
CoTeachingFaculty EQUIV Person INTERSECTION AcademicStaff EXISTS teaches.(Course INTERSECTION EXISTS isTaughtBy.TOP)
我觉得这是一个不正确的表示,因为 EXISTS isTaughtBy.TOP
会通过链条 x--teaches-->c--isTaughtBy-->x
将个人与自己联系起来。因此,即使教员不与其他人共享课程,她也将属于 class CoTeachingFaculty
.
因此需要建立一条x和y不同的链x--teaches-->c--isTaughtBy-->y
。 是否可以在描述逻辑框架中对这种情况进行建模?
是的,你说的很对,你的陈述不会达到预期的效果。
我能想到的可能有 2 种方法可以实现 more-or-less 你想要的:
(1) 引入一个非反身的coTeachesWith
角色,定义teaches
为
teaches \sqsubseteq coTeachesWith o teaches
。通过这种方式,您可以声明一位讲师 co-teaches 和另一位讲师,您可以从中推断出讲授相同的课程。缺点是它会推断该讲师教授的所有 类 也由 co-teaching 讲师教授 - 这可能不是您想要的。
(2) 另一种方法是使用SWRL 规则。有了它,您可以提供如下规则:
teaches(?x, ?c) ^ teaches(?y, ?c) ^ differentFrom(?x, ?y) ->
CoTeachingFaculty(?x) ^ CoTeachingFaculty(?y)
下面我为 ontology 应用这两个选项提供 OWL 曼彻斯特语法:
前缀::http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual# 前缀:owl:http://www.w3.org/2002/07/owl# 前缀:rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns# 前缀:rdfs:http://www.w3.org/2000/01/rdf-schema# 前缀:xml:http://www.w3.org/XML/1998/namespace 前缀:xsd:http://www.w3.org/2001/XMLSchema#
Ontology: <http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual>
<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual/0.0.1>
AnnotationProperty: <http://swrl.stanford.edu/ontologies/3.3/swrla.owl#isRuleEnabled>
AnnotationProperty: rdfs:comment
AnnotationProperty: rdfs:label
Datatype: xsd:boolean
Datatype: xsd:string
ObjectProperty: coTeachesWith
Characteristics: Irreflexive
Domain: CoTeachingFaculty
Range: CoTeachingFaculty
ObjectProperty: isTaughtBy
Domain: Course
Range: AcademicStaff
ObjectProperty: teaches
SubPropertyChain: coTeachesWith o teaches
Domain: AcademicStaff
Range: Course
Class: AcademicStaff
SubClassOf: Person,
teaches some Course
Class: CoTaughtCourse
EquivalentTo: isTaughtBy min 2 owl:Thing
SubClassOf: Course
Class: CoTeachingFaculty
SubClassOf: AcademicStaff
Class: Course
DisjointWith: Person
Class: Person
DisjointWith: Course
Class: owl:Thing
Individual: course1
Types: Course
Facts:
isTaughtBy lecturer1,
isTaughtBy lecturer2
DifferentFrom: course2
Individual: course2
Types: Course
DifferentFrom: course1
Individual: course3
Individual: lecturer1
Facts: coTeachesWith lecturer2
DifferentFrom: lecturer2
Individual: lecturer2
Facts:
teaches course1,
teaches course2
DifferentFrom: lecturer1
Individual: lecturer3
Facts: teaches course2
DifferentFrom: lecturer4
Individual: lecturer4
Facts: teaches course2
DifferentFrom: lecturer3
DifferentIndividuals:
course1,course2,course3
Rule:
teaches(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#x>, ?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#c>), teaches(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#y>, ?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#c>), DifferentFrom (?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#x>, ?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#y>) -> CoTeachingFaculty(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#x>), CoTeachingFaculty(?<http://www.henrietteharmse.com/turtorial/ontologies/DistinctIndividual#y>)
PS。我没有将 teaches
设置为 taughtBy
的反函数,因为这样 teaches
不再是一个简单的角色,因此不能在角色链中使用。有关详细信息,请参阅 SROIQ.
最具表现力的 DL 和 OWL2 语言包括对角色的“数量限制”,例如“至少由两个不同的人教授的课程”。 OWL 2 规范 provides 是使用其“ObjectMinCardinality”功能完成所需任务的一个非常清楚的示例。