以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  提几个关于rdf的问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=40355)


--  作者:Ambrosia
--  发布时间:11/21/2006 8:11:00 PM

--  提几个关于rdf的问题
最近看了rdf primer(english version)有几个疑点,写出来和大家讨论:)

1.明确的说明rdf:property是一个class“all properties in rdf are described as instances of class rdf:Property.”这里的class是指rdf:class吗。如果是,rdf:property和rdf:class有什么区别吗?

2.是不是由rdfs:domain连接的一定是一个rdf:class?

3.是不是由rdfs:range连接的一定是一个rdf:class或者是一个typed literal?

4.rdf schema defines all classes as subclasses of class rdfs:Resource。所以只要出现rdfs:Resource,或者谁是rdfs:Resource的子类,那么就是rdf:class?


--  作者:hgx
--  发布时间:11/22/2006 4:11:00 PM

--  
是的,看看RDF semantics,这些问题都有。
--  作者:superc_7
--  发布时间:11/22/2006 10:41:00 PM

--  
1.明确的说明rdf:property是一个class“all properties in rdf are described as instances of class rdf:Property.”这里的class是指rdf:class吗。如果是,rdf:property和rdf:class有什么区别吗?
意思是rdf中所有的property共同组成了一个类,这个类就是rdf:property;rdf:property和rdf:class是不同的类

2.是不是由rdfs:domain连接的一定是一个rdf:class?
是,准确地说是两个类,其中一个类是属性,如x:hasTitle rdfs:domain x:Document,x:hasTitle就是一个属性,x:Document是一个类

3.是不是由rdfs:range连接的一定是一个rdf:class或者是一个typed literal?
差不多吧,但也可以是一个Blank Node,上面也是

4.rdf schema defines all classes as subclasses of class rdfs:Resource。所以只要出现rdfs:Resource,或者谁是rdfs:Resource的子类,那么就是rdf:class?
不是,rdf:class的所有实例(就是所有rdf的类)都是rdfs:resource的实例,但反过来并不是每个rdfs:resource的实例都是rdf:class的实例,可以是一个单独的资源

感觉rdf/rdfs主要有两个类rdf:class和rdfs:resource,两个属性rdf:type和rdfs:subClassOf,然后是一堆类和属性通过这两个属性联系到一块,挺缠人的……


--  作者:Ambrosia
--  发布时间:11/23/2006 1:19:00 PM

--  
谢谢superc_7!^_^

请问“rdf:class的所有实例(就是所有rdf的类)都是rdfs:resource的实例,但反过来并不是每个rdfs:resource的实例都是rdf:class的实例,可以是一个单独的资源”这句话有没有什么出处?谢谢!

个人觉得rdf以最简单的形式,可以描述复杂的资源和关系,是一个比较成功的规范,呵呵。这个只是看了rdf primer之后的小问题,先提出来明确一下。下一步还会看一下rdf的其他规范,看能不能找到更明确的解释。


--  作者:superc_7
--  发布时间:11/23/2006 3:07:00 PM

--  
那句话就是我自己的理解吧,所有rdf/rdfs能描述的东西都叫resource,因而可以说是最“大”的类了,class类只是resource类的一个子类
rdf/rdfs深究起来其实很绕人,感觉没有DL那么清晰……+U+U

--  作者:boywaiter
--  发布时间:1/31/2007 11:56:00 AM

--  
首先,应该澄清一点:并不存在rdf:Class(实在要说的话,只能说RDF中的class),Ambrosia想说的是rdfs:Class吧。
其次,rdfs:Resource、rdfs:Class、rdf:Property所表达的只是抽象的概念,相当于把我们平时使用的资源、类、属性这三个概念分别用rdfs:Resource、rdfs:Class、rdf:Property来表示。

1.明确的说明rdf:property是一个class“all properties in rdf are described as instances of class rdf:Property.”这里的class是指rdf:class吗。如果是,rdf:property和rdf:class有什么区别吗?
这里的class可以理解为rdfs:Class。rdf:Property是rdfs:Class的一个实例,因为rdf:Property是一个类。
rdf:Property和rdfs:Class当然不同,前者的实例是所有的属性,后者的实例是所有的类。

2.是不是由rdfs:domain连接的一定是一个rdf:class?

rdfs:domain本身是rdf:Property的一个实例,也就是说rdfs:domain是一个属性。
从它的定义
<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#domain">
  <rdfs:isDefinedBy rdf:resource="http://www.w3.org/2000/01/rdf-schema#"/>
  <rdfs:label>domain</rdfs:label>
  <rdfs:comment>A domain of the subject property.</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
  <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
</rdf:Property>
可以看出:rdfs:domain连接的是一个属性和一个类。
3.是不是由rdfs:range连接的一定是一个rdf:class或者是一个typed literal?
<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#range">
  <rdfs:isDefinedBy rdf:resource="http://www.w3.org/2000/01/rdf-schema#"/>
  <rdfs:label>range</rdfs:label>
  <rdfs:comment>A range of the subject property.</rdfs:comment>
  <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
  <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
</rdf:Property>
由定义可见:rdfs:range的domain是一个属性,rdfs:range的range是一个类,Literal是一个类,所以可以。

4.rdf schema defines all classes as subclasses of class rdfs:Resource。所以只要出现rdfs:Resource,或者说是rdfs:Resource的子类,那么就是rdf:class?
这句话这样理解:因为RDF所描述的所有事物都是resource,即所有事物都是rdfs:Resource的实例,而对于任意类,它的每个实例都属于rdfs:Resource,所以可证任意类都是rdfs:Resource的子类。类似于集合包含关系的证明。


--  作者:Ambrosia
--  发布时间:1/31/2007 10:02:00 PM

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