以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  请问RDF Schema文档中的一句话如何理解  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=27379)


--  作者:fuji246
--  发布时间:2/17/2006 5:09:00 PM

--  请问RDF Schema文档中的一句话如何理解
请问这句话如何解释:
The basic facilities provided by rdfs:domain and rdfs:range do not provide any direct way to indicate property restrictions that are local to a class. Although it is possible to combine use rdfs:domain and rdfs:range with sub-property hierarchies , direct support for such declarations are provided by richer Web Ontology languages such as [OWL].

谢谢!


--  作者:jpz6311whu
--  发布时间:2/17/2006 6:23:00 PM

--  
这个应该是说rdfs里面的domain/range和owl里面Property Restrictions的allValuesFrom, someValuesFrom等的区别:
In addition to designating property characteristics, it is possible to further constrain the range of a property in specific contexts in a variety of ways. We do this with property restrictions. The various forms described below can only be used within the context of an owl:Restriction. The owl:onProperty element indicates the restricted property.
后者是直接针对类的约束


--  作者:fuji246
--  发布时间:2/17/2006 6:48:00 PM

--  
有道理,但是“Although it is possible to combine use rdfs:domain and rdfs:range with sub-property hierarchies ”应该怎么理解呢?
--  作者:jpz6311whu
--  发布时间:2/17/2006 7:01:00 PM

--  
它的意思是如果你不owl的Property Restrictions,直接用rdfs:domain and rdfs:range以及sub-property hierarchies的组合,也可以完成indicate property restrictions that are local to a class的功能。
--  作者:superc_7
--  发布时间:2/17/2006 7:19:00 PM

--  
"indicate property restrictions that are local to a class"是什么意思呢
这段话就这里不太明白

--  作者:fuji246
--  发布时间:2/17/2006 7:45:00 PM

--  
怎么完成?

还有一句话:“ RDFS does not require that there be only one first element of a list-like structure, or even that a list-like structure have a first element. ”


来源 http://www.w3.org/TR/rdf-schema/#ch_bag 5.2 RDF Collections


--  作者:jpz6311whu
--  发布时间:2/17/2006 7:54:00 PM

--  
我觉得indicate property restrictions that are local to a class说的就是owl里面Property Restrictions
--  作者:jpz6311whu
--  发布时间:2/17/2006 8:11:00 PM

--  
怎么完成我也不是很清楚,它说是联合使用domain/range和sub-propertyof,我觉得有这种可能:对于需要添加属性约束的类,都继承父属性形成subproperty,然后针对这个子属性建立domain和range,这样的效果和owl里面Property Restrictions差不多,只过要形成一个子属性的sub-property hierarchies。
可能理解对,:)
--  作者:fuji246
--  发布时间:2/17/2006 8:57:00 PM

--  
RDFS does not require that there be only one first element of a list-like structure, or even that a list-like structure have a first element

RDF并不要求列表结构只能有一个rdf:first元素,如可以是一个嵌套的结构。
也不要求列表结构必须有一个rdf:first元素


--  作者:Lee
--  发布时间:2/17/2006 10:40:00 PM

--  
以下是引用fuji246在2006-2-17 17:09:00的发言:
请问这句话如何解释:
The basic facilities provided by rdfs:domain and rdfs:range do not provide any direct way to indicate property restrictions that are local to a class. Although it is possible to combine use rdfs:domain and rdfs:range with sub-property hierarchies , direct support for such declarations are provided by richer Web Ontology languages such as [OWL].

不知是否可以这样理解:

rdfs:domain和rdfs:rang并没有任何直接的方法提供对类的局部属性限制。虽然可以将它们与子属性层次结构结合在一起使用,但对这种声明的支持仅在表达能力更强的Web本体语言OWL中提供。


--  作者:admin
--  发布时间:2/17/2006 11:21:00 PM

--  
以下是引用Lee在2006-2-17 22:40:00的发言:
不知是否可以这样理解:

rdfs:domain和rdfs:rang并没有任何直接的方法提供对类的局部属性限制。虽然可以将它们与子属性层次结构结合在一起使用,
~~~~~~~~对的

但对___这种声明____的支持仅在表达能力更强的Web本体语言OWL中提供。
~~~~~~~~补充一下,这里的“这种声明”指的是“直接用于描述局部property的方法”


我觉得楼主体的问题很好!很有代表性!大家以后如果遇到把握不大的句子,都可以贴出来(最好给出出处的链接),大家一起讨论。

这句话表达了以下意思(其中包括jpz6311whu和Lee已经提到的):

The basic facilities provided by rdfs:domain and rdfs:range do not provide any direct way to indicate property restrictions that are local to a class.

RDFS中的rdfs:domain and rdfs:range是所针对的,是全局的property,而不是针对某个类的property。

正如jpz6311whu所说的:
{{
这个应该是说rdfs里面的domain/range和owl里面Property Restrictions的allvaluesFrom, somevaluesFrom等的区别:
In addition to designating property characteristics, it is possible to further constrain the range of a property in specific contexts in a variety of ways. We do this with property restrictions. The various forms described below can only be used within the context of an owl:Restriction. The owl:onProperty element indicates the restricted property.
后者是直接针对类的约束
}}

Although it is possible to combine use rdfs:domain and rdfs:range with sub-property hierarchies,

如果实在要表达针对某个类的Property的rdfs:domain and rdfs:range,那么可以采取一种workaround(也就是说,是一种迂回的方法,不是直接的方法),就是组合使用 rdfs:domain and rdfs:range 和  sub-property 。什么意思呢,就如Lee所说的:

{{
rdfs:domain和rdfs:rang并没有任何直接的方法提供对类的局部属性限制。虽然可以将它们与子属性层次结构结合在一起使用,
}}

direct support for such declarations are provided by richer Web Ontology languages such as [OWL].

刚才说了,上面这种方法不是直接的方法。不幸的是,RDFS中并没有提供直接的方法;不过OWL这种表达能力更丰富的语言直接提供了描述针对某个类的Property的构词:即allvaluesFrom, somevaluesFrom等。

[此贴子已经被作者于2006-2-18 1:27:38编辑过]

--  作者:jpz6311whu
--  发布时间:2/17/2006 11:39:00 PM

--  
版版总结得很好,关于这个我还有一个疑问,如果一个.owl中的一个属性全局定义了rdfs:domain and rdfs:range,又针对某一个类的这个属性定义了局部属性约束allvaluesFrom, somevaluesFrom,这两个同时出现应该怎么处理?特别是两者发生冲突的时候怎么办?
--  作者:Lee
--  发布时间:2/18/2006 11:34:00 AM

--  
我举个简单的例子,不知是否可以回答你的问题。

比如说你要请一帮朋友去吃饭,为什么呢?因为你长得帅。于是你领他们到了一家你经常去的酒楼。请客当然要喝酒了,朋友们倒不挑剔什么酒都行。老板一听就送了你一瓶法国进口精品红葡萄酒,要你们非喝不可。

好了,现在我们用OWL来描述一下你是怎么请客的。

定义两个大类:朋友和酒。酒再划分小类:白酒、啤酒、红酒(这里用“红酒”代替老板送的那瓶精品红;虽然这样不够严密,但领会精神,领会精神,呵呵)
再为“朋友”定义一个属性:喝酒

那么“喝酒”这个属性的
domain  就是  朋友
rang  就是  酒
allValuesFrom  就是   或白酒或啤酒或红酒
someValueFrom  就是  红酒  (表示一定要喝)


--  作者:jpz6311whu
--  发布时间:2/18/2006 1:16:00 PM

--  
谢谢Lee举了一个生动的例子。这个例子对于全局和局部的约束之间没有冲突,应该是没有问题。我把它改一下:

定义两个大类:朋友和酒。
再为“朋友”定义一个属性:喝酒

那么“喝酒”这个属性的
domain  就是  朋友
rang  就是  酒

但是:
故意把“朋友”的“喝酒”的allvaluesFrom定义为“酸奶”。

这样全局和局部发生冲突,因为“酸奶”并不是一种“酒”,这种定义是不是错误的?


--  作者:Lee
--  发布时间:2/18/2006 1:35:00 PM

--  
我认为从语法上讲没错,因为OWL是基于开放世界假设。
--  作者:fuji246
--  发布时间:2/19/2006 4:58:00 PM

--  
我认为把属性定义为“喝”似乎更合适。

allvaluesFrom somevalueFrom是和属性一起用来和定义一个无名类。如果是jpz6311whu所说的两者发生冲突那么这个类应该没有实例,用Protege-OWL创建“朋友”类再Racer应该可以检测出不一致。

而且我还有一个疑问:

下面的E文出自   [url=http://www.w3.org/TR/rdf-schema/#ch_domainrange]http://www.w3.org/TR/rdf-schema/#ch_domainrange[/url]

The RDF Vocabulary Description language provides a mechanism for describing this information, but does not say whether or how an application should use it. For example, while an RDF vocabulary can assert that an author property is used to indicate resources that are instances of the class Person, it does not say whether or how an application should act in processing that range information. Different applications will use this information in different ways. For example, data checking tools might use this to help discover errors in some data set, an interactive editor might suggest appropriate values, and a reasoning application might use it to infer additional information from instance data.
这里说range的用途根据应用程序的处理需要来定,可以检查错误,提示输入合适的值或由个体数据推理得到附加的信息。好像和Protege-OWL教程里说的不一样,教程里说range不是对Property的取值加以限制,而是用来推理。我的理解可能是Protege-OWL是在推理这个环境下说的。


--  作者:fuji246
--  发布时间:2/19/2006 6:10:00 PM

--  
感谢大家的解答,这句话我已经理解了。

The basic facilities provided by rdfs:domain and rdfs:range do not provide any direct way to indicate property restrictions that are local to a class. Although it is possible to combine use rdfs:domain and rdfs:range with sub-property hierarchies , direct support for such declarations are provided by richer Web Ontology languages such as [OWL].

还是用Lee的例子,做一点该动。

同学Classmate一起去吃饭,有男同学Classmate_Male,也有女同学Classmate_Female。那么Classmate_Male和Classmate_Female是Classmate的子类。再定义一个属性pdrink,并且规定男同学喝酒Wine,女同学喝酸奶Yoghourt。再定义一个类饮料Drink,那么pdrink的Domain为Classmate,Range为Drink,那么我们描述Classmate_Male这个类时,可以有如下两种描述方式:

1.用Domain和Range,结合pdrink的子属性pdrink_alcoholic。其中pdrink_alcoholic的domain为Classmate,range为Alcohol(含酒精的饮料类)。

<rdf:Property rdf:ID="#pdrink_alcoholic">
   <rdfs:subPropertyOf rdf:resource="#pdrink">
   <rdfs:domain rdf:resource="#Classmate"/>
   <rdfs:range rdf:resource="#Wine">
</rdf:Property>

<rdfs:Class rdf:ID="#Classmate_Male">
  <rdfs:subClassOf rdf:resource="#Classmate">
</rdfs:Class>

2.使用Property Restriction中的allValueFrom描述一个匿名类, 其中allValuesFrom的值为Wine。再结合Classmate一起来描述Classmate_Male这个类。

<owl:Class rdf:ID="#Classmate_Male">
  <rdfs:subClassOf rdf:resource="#Classmate"/>
  <rdfs:subClassOf>
    <owl:Restriction>
         <owl:onProperty rdf:resource="#pdrink"/>
         <owl:allValuesFrom rdf:resource="#wine"/>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
108.887ms