SWRL 和 Rolification 不能 return 我想要的
SWRL and Rolification cannot return what I want
我已经开发了一个 ontology,我想在 protege 中添加以下 SWRL:
Divider_intersection(?node), is_extent_of(?node, ?s), builds(?s, ?l),Segment(?s),Lane(?l),detailed_partition(?d), builds(?l, ?d)-> is_divided_at(?d, ?node)
有了这个,我希望在来自 detailed_partition (?d) 的个体和分类为 [=25= 的节点之间添加一个对象 属性、is_divided_at ] 如果它是构建车道(?l)的段(?s)的范围,然后构建详细的?分区(?d)。如此处所述,我正在寻找 NamedIndividuals,因此我认为 SWRL 应该可以完成这项工作。
进一步研究,我发现 Rolification (1, 2, 3) 是一个可能的答案,但我以前从未使用过它,但我制作了以下链:
r_Divider_intersection o is_extent_of o r_Segment o builds o r_Lane o builds o r_detailed_partition
我还是没有得到答案。知道哪里出了问题吗?
您的方法有效,并且没有看到您的 ontology(您的 link 需要权限,而场外 link 无论如何都不是很有用)我们无法理解您的原因它的特殊结构有效。从你的问题中跳出的一件事是它看起来像你的 is_divided_at 属性 有它的参数 (?d,?node) 与 属性 链公理产生的顺序相反。无论如何,这是一个工作示例。
@prefix : <urn:ex:#> .
@prefix ex: <urn:ex:#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
ex:isDividedAt a owl:ObjectProperty ;
owl:propertyChainAxiom ( ex:_DividerIntersection ex:isExtentOf ex:_Segment ex:builds ex:_Lane ex:builds ex:_DetailedPartition ) .
ex:Segment a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_Segment
] .
ex:_DetailedPartition
a owl:ObjectProperty .
ex:DividerIntersection
a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_DividerIntersection
] .
ex:_Segment a owl:ObjectProperty .
ex:_Lane a owl:ObjectProperty .
ex:builds a owl:ObjectProperty .
ex:dividerIntersection0
a owl:NamedIndividual , ex:DividerIntersection ;
ex:isExtentOf ex:segment0 .
<urn:ex:> a owl:Ontology .
ex:detailedPartition0
a owl:NamedIndividual , ex:DetailedPartition .
ex:_DividerIntersection
a owl:ObjectProperty .
ex:segment0 a owl:NamedIndividual , ex:Segment ;
ex:builds ex:lane0 .
ex:DetailedPartition a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_DetailedPartition
] .
ex:isExtentOf a owl:ObjectProperty .
ex:lane0 a owl:NamedIndividual , ex:Lane ;
ex:builds ex:detailedPartition0 .
ex:Lane a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_Lane
] .
我已经开发了一个 ontology,我想在 protege 中添加以下 SWRL:
Divider_intersection(?node), is_extent_of(?node, ?s), builds(?s, ?l),Segment(?s),Lane(?l),detailed_partition(?d), builds(?l, ?d)-> is_divided_at(?d, ?node)
有了这个,我希望在来自 detailed_partition (?d) 的个体和分类为 [=25= 的节点之间添加一个对象 属性、is_divided_at ] 如果它是构建车道(?l)的段(?s)的范围,然后构建详细的?分区(?d)。如此处所述,我正在寻找 NamedIndividuals,因此我认为 SWRL 应该可以完成这项工作。
进一步研究,我发现 Rolification (1, 2, 3) 是一个可能的答案,但我以前从未使用过它,但我制作了以下链:
r_Divider_intersection o is_extent_of o r_Segment o builds o r_Lane o builds o r_detailed_partition
我还是没有得到答案。知道哪里出了问题吗?
您的方法有效,并且没有看到您的 ontology(您的 link 需要权限,而场外 link 无论如何都不是很有用)我们无法理解您的原因它的特殊结构有效。从你的问题中跳出的一件事是它看起来像你的 is_divided_at 属性 有它的参数 (?d,?node) 与 属性 链公理产生的顺序相反。无论如何,这是一个工作示例。
@prefix : <urn:ex:#> .
@prefix ex: <urn:ex:#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
ex:isDividedAt a owl:ObjectProperty ;
owl:propertyChainAxiom ( ex:_DividerIntersection ex:isExtentOf ex:_Segment ex:builds ex:_Lane ex:builds ex:_DetailedPartition ) .
ex:Segment a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_Segment
] .
ex:_DetailedPartition
a owl:ObjectProperty .
ex:DividerIntersection
a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_DividerIntersection
] .
ex:_Segment a owl:ObjectProperty .
ex:_Lane a owl:ObjectProperty .
ex:builds a owl:ObjectProperty .
ex:dividerIntersection0
a owl:NamedIndividual , ex:DividerIntersection ;
ex:isExtentOf ex:segment0 .
<urn:ex:> a owl:Ontology .
ex:detailedPartition0
a owl:NamedIndividual , ex:DetailedPartition .
ex:_DividerIntersection
a owl:ObjectProperty .
ex:segment0 a owl:NamedIndividual , ex:Segment ;
ex:builds ex:lane0 .
ex:DetailedPartition a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_DetailedPartition
] .
ex:isExtentOf a owl:ObjectProperty .
ex:lane0 a owl:NamedIndividual , ex:Lane ;
ex:builds ex:detailedPartition0 .
ex:Lane a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty ex:_Lane
] .