如何在 OWL 中区分描述表示对象的属性和描述表示的属性?
How to distinguish in OWL properties describing the represented object from properties describing the representation?
如何在 OWL 中区分描述表示对象的属性和描述表示的属性。这是一个小例子:
:fgst1425 rdf:type :Building ,
owl:NamedIndividual ;
rdfs:label "B28"@en ;
:isWorkLocationOf :hugr9807 ; #this is a property of the building
:hasURItype :ihuy8965 . #this is a property of the URI representing the building
:hugr9807 rdf:type :Person ,
owl:NamedIndividual ;
rdfs:label "Ivo"@en .
:ihuy8965 rdf:type owl:NamedIndividual ,
owl:Thing ;
rdfs:label "OpaqueURI"@en .
以类似的方式,描述访问权限的 属性 可以表示对建筑物的访问权限和对代表建筑物的 URI 的读取权限。
目的是对所表示的对象和表示都使用推理。例如,如果我有一个人被爆炸杀死,并且这个爆炸是用一个 URI 注册的,我想说只有满足特定条件的人才能访问这个 URI,并且有理由找出谁是非法访问,但是避免 URI 杀死人的那种推论。
我想到的一个可能的解决方案是将所有元数据属性放在 :metaDataProperty
下,然后使用 SPARQL 查询可以区分两种不同类型的语句。
建议的另一种方法是对元数据使用单独的 ontology。
你有什么建议?
How to distinguish in OWL properties describing the represented object from properties describing the representation.
这是 OWL 所不具备的。制作此 ontology 的人做了一些可能被认为有些不寻常的事情。而
:hasURItype :ihuy8965 . #this is a property of the URI representing the
建筑物
可能是"about the representation",就OWL而言,它只是另一栋属性。毕竟根据
:ihuy8965 rdf:type owl:NamedIndividual , owl:Thing ;
该值只是另一个命名的个体。
但是,有一件事 可能 是可能的,这取决于 ontology 设计师的做法。 OWL 允许您定义 三种 类型的属性:
- 对象属性
- 数据类型属性
- 注释属性
前两个属性,对象和数据类型属性,是 OWL 推理器使用的属性,应该表示数据的实际 含义。第三种类型,注释属性是 "extra" 类数据。 ontology 设计师 可能 将 :hasURItype 定义为 注释 属性表示推理不需要它的值;也就是说,它们是 "real" 数据的注释。如果是这种情况,那么您可以执行以下操作:
construct { ?s ?p ?o }
where {
values ?s { :fgst1425 }
?s ?p ?o .
filter not exists {
?p rdf:type owl:AnnotationProperty
}
}
排除已声明为注解属性的属性。不过,我们没有足够的数据来了解该方法是否适用于此。
更新
根据问题的更新,我认为您可能想要创建一个新注释 属性 来区分属性是否为 "representation properties"。例如,
:isRepresentationProperty a owl:AnnotationProperty
那么您的 属性 定义可以考虑到这一点:
:isWorkLocationOf a owl:ObjectProperty .
:hasURItype a owl:ObjectProperty ;
:isRepresentationProperty true .
然后您可以将 SPARQL 查询更新为:
construct { ?s ?p ?o }
where {
values ?s { :fgst1425 }
?s ?p ?o .
filter not exists {
?p :isRepresentationProperty true
}
}
如何在 OWL 中区分描述表示对象的属性和描述表示的属性。这是一个小例子:
:fgst1425 rdf:type :Building ,
owl:NamedIndividual ;
rdfs:label "B28"@en ;
:isWorkLocationOf :hugr9807 ; #this is a property of the building
:hasURItype :ihuy8965 . #this is a property of the URI representing the building
:hugr9807 rdf:type :Person ,
owl:NamedIndividual ;
rdfs:label "Ivo"@en .
:ihuy8965 rdf:type owl:NamedIndividual ,
owl:Thing ;
rdfs:label "OpaqueURI"@en .
以类似的方式,描述访问权限的 属性 可以表示对建筑物的访问权限和对代表建筑物的 URI 的读取权限。
目的是对所表示的对象和表示都使用推理。例如,如果我有一个人被爆炸杀死,并且这个爆炸是用一个 URI 注册的,我想说只有满足特定条件的人才能访问这个 URI,并且有理由找出谁是非法访问,但是避免 URI 杀死人的那种推论。
我想到的一个可能的解决方案是将所有元数据属性放在 :metaDataProperty
下,然后使用 SPARQL 查询可以区分两种不同类型的语句。
建议的另一种方法是对元数据使用单独的 ontology。
你有什么建议?
How to distinguish in OWL properties describing the represented object from properties describing the representation.
这是 OWL 所不具备的。制作此 ontology 的人做了一些可能被认为有些不寻常的事情。而
:hasURItype :ihuy8965 . #this is a property of the URI representing the
建筑物
可能是"about the representation",就OWL而言,它只是另一栋属性。毕竟根据
:ihuy8965 rdf:type owl:NamedIndividual , owl:Thing ;
该值只是另一个命名的个体。
但是,有一件事 可能 是可能的,这取决于 ontology 设计师的做法。 OWL 允许您定义 三种 类型的属性:
- 对象属性
- 数据类型属性
- 注释属性
前两个属性,对象和数据类型属性,是 OWL 推理器使用的属性,应该表示数据的实际 含义。第三种类型,注释属性是 "extra" 类数据。 ontology 设计师 可能 将 :hasURItype 定义为 注释 属性表示推理不需要它的值;也就是说,它们是 "real" 数据的注释。如果是这种情况,那么您可以执行以下操作:
construct { ?s ?p ?o }
where {
values ?s { :fgst1425 }
?s ?p ?o .
filter not exists {
?p rdf:type owl:AnnotationProperty
}
}
排除已声明为注解属性的属性。不过,我们没有足够的数据来了解该方法是否适用于此。
更新
根据问题的更新,我认为您可能想要创建一个新注释 属性 来区分属性是否为 "representation properties"。例如,
:isRepresentationProperty a owl:AnnotationProperty
那么您的 属性 定义可以考虑到这一点:
:isWorkLocationOf a owl:ObjectProperty .
:hasURItype a owl:ObjectProperty ;
:isRepresentationProperty true .
然后您可以将 SPARQL 查询更新为:
construct { ?s ?p ?o }
where {
values ?s { :fgst1425 }
?s ?p ?o .
filter not exists {
?p :isRepresentationProperty true
}
}