问题描述
是否可以在OWL中的表达式前面有一个列表?像这样:
Is it possible to have a list in front of an expression in OWL? Something like:
( :Dairy :Egg :Nut ) rdfs:subClassOf :FoodGroup .
或:
:Dairy , :Egg , :Nut rdfs:subClassOf :FoodGroup .
或者一般来说,一组类型的表达式是否有语法糖?:
Or in general, is there a syntactic sugar for a group of expressions of the type?:
:Diary rdfs:subClassOf :FoodGroup .
:Egg rdfs:subClassOf :FoodGroup .
:Nut rdfs:subClassOf :FoodGroup .
推荐答案
乌龟
在Turtle中,没有类似于对象列表的主题列表.
In Turtle, there are no subject lists that would be similar to object lists.
写(:a :b) rdfs:subClassOf :c
之类的东西可能.但是,这不等于:a rdfs:SubClassOf :c . :b rdfs:SubClassOf :c
.
实际上,您可以在主题中使用 RDF列表来编写最有用的东西位置是(:a :b) a rdf:List
.
It is possible to write something like (:a :b) rdfs:subClassOf :c
.
However, this is not equal to :a rdfs:SubClassOf :c . :b rdfs:SubClassOf :c
.
In fact, the most useful thing you can write using RDF list in subject position is (:a :b) a rdf:List
.
I.例如,没有 syntactic 糖.
OWL
使用OWL推理功能,可以实现类似这样的功能.
Using OWL inferencing capabilities, it is possible to achieve something like this.
可以声明一个逆属性,然后在序列化中使用Turtle对象列表:
One can declare an inverse property and then use Turtle object lists in serialization:
:inverseProperty owl:inverseOf :directProperty .
:c :inverseProperty :a, :b .
限制
但是,这不适用于rdfs:subClassOf
.对象属性连接个人,而不是类. :c rdfs:superClassOf :a, :b
之类的东西将被视为与同名的个人有关.
However, this doesn't work for rdfs:subClassOf
. Object properties connect individuals, not classes. Something like :c rdfs:superClassOf :a, :b
will be treated as related to the same-name individuals.
OWL punning 的工作方式(请参阅也这令人大开眼界的答案).
This is how OWL punning works (see also this eye-opening answer).
对于rdfs:subClassOf
的特殊情况,请写[ owl:unionOf (:a :b) ] rdfs:subClassOf :c
,
如果您不需要:c owl:unionOf (:a :b)
或:c owl:disjointUnionOf (:a :b)
.
For the particular case of rdfs:subClassOf
, write [ owl:unionOf (:a :b) ] rdfs:subClassOf :c
,
if you don't need simply :c owl:unionOf (:a :b)
or :c owl:disjointUnionOf (:a :b)
.
不幸的是,通用类包含公理不能保存在曼彻斯特语法中.
Unfortunately, general class inclusion axioms can not be saved in the Manchester syntax.
这篇关于在OWL表达式前面列出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!