以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  W3C规范《RDF Semantics》读书笔记  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=9122)


--  作者:orangebench
--  发布时间:8/3/2004 11:01:00 PM

--  W3C规范《RDF Semantics》读书笔记
开始重温RDF语义这个规范,这个规范晦涩难懂, 但总是要啃的。

我会边看,边作些笔记,把自己的理解写下来,有兴趣的朋友可以一起来读。争取把这个
最最难懂的规范搞定。

http://www.w3.org/TR/rdf-mt/

大家对这篇文档有什么疑问,也可以在这个帖子中提出, 这里的讨论可以作为将来翻译
RDF Semantics的基础。

没有读懂RDF Semantics, 就不敢称真正理解RDF!


--  作者:orangebench
--  发布时间:8/3/2004 11:04:00 PM

--  
0.3 Graph Definitions
An [URL=http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-rdf-graph]RDF graph[/URL], or simply a graph, is a set of RDF triples.

A subgraph of an RDF graph is a subset of the triples in the graph. A triple is identified with the singleton set containing it, so that each triple in a graph is considered to be a subgraph. A proper subgraph is a proper subset of the triples in the graph.

A ground RDF graph is one with no blank nodes.

A name is a URI reference or a literal. These are the expressions that need to be assigned a meaning by an [URL=http://www.w3.org/TR/rdf-mt/#glossInterpretation#glossInterpretation]interpretation[/URL]. Note that a typed literal comprises two [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s: itself and its internal type URI reference.

A set of [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s is referred to as a vocabulary. The vocabulary of a graph is the set of names which occur as the subject, predicate or object of any triple in the graph. Note that URI references which occur only inside typed literals are not required to be in the vocabulary of the graph.

[@图的基本定义: 一个三元组的集合; 名字(name)的定义: URIref和文字; 词汇集的定义: name的集合]

Suppose that M is a mapping from a set of blank nodes to some set of literals, blank nodes and URI references; then any graph obtained from a graph G by replacing some or all of the blank nodes N in G by M(N) is an instance of G. Note that any graph is an instance of itself, an instance of an instance of G is an instance of G, and if H is an instance of G then every triple in H is an instance of some triple in G.

[@图的实例: 把其中的空节点替换为name或空节点 ]

An instance with respect to a vocabulary V is an [URL=http://www.w3.org/TR/rdf-mt/#definst#definst]instance[/URL] in which all the [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s in the instance that were substituted for blank nodes in the original are [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s from V.

[@关于词汇集V的图实例: 用以替换的name来自V ]

A proper instance of a graph is an instance in which a blank node has been replaced by a name, or two blank nodes in the graph have been mapped into the same node in the instance.

[@图的真实例(proper instance): 至少有一个空节点别替换为名字,或两个空节点合并为一个]

Any instance of a graph in which a blank node is mapped to a new blank node not in the original graph is an instance of the original and also has it as an instance, and this process can be iterated so that any 1:1 mapping between blank nodes defines an instance of a graph which has the original graph as an instance. Two such graphs, each an instance of the other but neither a proper instance, which differ only in the identity of their blank nodes, are considered to be [URL=http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-graph-equality]equivalent[/URL]. We will treat such equivalent graphs as identical; this allows us to ignore some issues which arise from 're-naming' nodeIDs, and is in conformance with the [URL=http://www.w3.org/TR/rdf-mt/#nodeIDnote#nodeIDnote]convention[/URL] that blank nodes have no label. Equivalent graphs are mutual instances with an invertible instance mapping.

[@对空节点的1-1映射,如重命名nodeID, 仍然是等价的图]

An RDF graph is lean if it has no instance which is a proper subgraph of the graph. Non-lean graphs have internal redundancy and express the same content as their lean subgraphs. For example, the graph

<ex:a> <ex:p> _:x .
_:y <ex:p> _:x .

is not [URL=http://www.w3.org/TR/rdf-mt/#deflean#deflean]lean[/URL], but

[@ 因为<ex:a> <ex:p> _:x 是其真子图, 也是它的实例(把_:y 替换为<ex:a>) ]

<ex:a> <ex:p> _:x .
_:x <ex:p> _:x .

is [URL=http://www.w3.org/TR/rdf-mt/#deflean#deflean]lean[/URL].

[@图是紧致的(lean), 如果没有真子图(proper subgraph)也是它的实例(instance), 简单的判断方法: 枚举图的实例, 看是否同时也是图的真子图]

A merge of a set of RDF graphs is defined as follows. If the graphs in the set have no blank nodes in common, then the union of the graphs is a merge; if they do share blank nodes, then it is the union of a set of graphs that is obtained by replacing the graphs in the set by equivalent graphs that share no blank nodes. This is often described by saying that the blank nodes have been 'standardized apart'. It is easy to see that any two merges are equivalent, so we will refer to the merge, following the convention on equivalent graphs. Using the convention on equivalent graphs and identity, any graph in the original set is considered to be a subgraph of the merge.

[@图的合并: 1)如果没有共同的空节点(没有相同的空节点标识符),是两个图对应的三元组集合的并集;2)如果有相同的空节点,通过1-1映射重新命名空节点,使得他们没有共同的空节点,然后取并集 ]

[@疑问: 在图语法中,并没有出现空节点标识符,因为无法判断什么是“blank nodes in common”?]

One does not, in general, obtain the merge of a set of graphs by concatenating their corresponding [URL=http://www.w3.org/TR/rdf-testcases/#ntriples]N-Triples[/URL] documents and constructing the graph described by the merged document. If some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' identified. To merge [URL=http://www.w3.org/TR/rdf-testcases/#ntriples]N-Triples[/URL] documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. Similar cautions apply to merging graphs described by RDF/XML documents which contain nodeIDs, see [URL=http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/]RDF/XML Syntax Specification (Revised)[/URL] [[URL=http://www.w3.org/TR/rdf-mt/#ref-rdf-syntax#ref-rdf-syntax]RDF-SYNTAX[/URL]].

[@对N-Triple的合并, 就要注意上面说的空节点标识符的问题, 因为空节点标识符都是局部的,只在其所在的图中有意义,合并的时候,如果不巧两个图有相同的空节点标识符,重新给一个就行了。]


--  作者:smileidiot
--  发布时间:8/3/2004 11:28:00 PM

--  
Note that a typed literal comprises two names: itself and its internal type URI reference.
能否举例说明一个typed literal的itself和internal type URIref分别是什么吗?谢了先!
--  作者:orangebench
--  发布时间:8/3/2004 11:35:00 PM

--  
如类型文字: "25"^^xsd:decimal ,类型文字本身是一个名字(name),
xsd:decimal  即它的数据类型(internal type URI reference),也是一个URIref,所以也是一个name。但这个URIref不一定要属于这个图的词汇集中。

“Note that URI references which occur only inside typed literals are not required to be in the vocabulary of the graph.”


以下是引用smileidiot在2004-8-3 23:28:09的发言:
Note that a typed literal comprises two names: itself and its internal type URI reference.
能否举例说明一个typed literal的itself和internal type URIref分别是什么吗?谢了先!


--  作者:smileidiot
--  发布时间:8/3/2004 11:35:00 PM

--  
如: 5^^xsd:integer
其中 xsd:integer 就是那个interal uri ,所以也是个name,但未包括在词汇里;
整个 5^^xsd:integer 则是itself,这是一个typed literal,所以也是个name,且包括在词汇里
--  作者:smileidiot
--  发布时间:8/4/2004 9:31:00 PM

--  
<ex:a> <ex:p> _:x .
_:y <ex:p> _:x .

is not lean, but

[@ 因为<ex:a> <ex:p> _:x 是其真子图, 也是它的实例(把_:y 替换为<ex:a>) ]

<ex:a> <ex:p> _:x .
_:x <ex:p> _:x .

is lean.

为什么把 _:x 替换为<ex:a> 后 <ex:a> <ex:p> <ex:a> 不是其真子图, 也是它的实例呢?
不懂???


--  作者:smileidiot
--  发布时间:8/4/2004 9:37:00 PM

--  
Non-lean graphs have internal redundancy and express the same content as their lean subgraphs. For example, the graph

<ex:a> <ex:p> _:x .
_:y <ex:p> _:x .

is not lean

那么,请问:这个非紧致图的冗余是<ex:a> <ex:p> _:x,还是_:y <ex:p> _:x? 直觉上应该是后者(因为其紧致子图是<ex:a> <ex:p> _:x),不过偶个人总觉得这2者都不算是冗余啊!或许匿名结点本身就意义不大?


--  作者:smileidiot
--  发布时间:8/4/2004 9:55:00 PM

--  
[@疑问: 在图语法中,并没有出现空节点标识符,因为无法判断什么是“blank nodes in common”?]

楼主是想说“因此无法判断什么是“blank nodes in common”吧?

我查了0.2 Graph Syntax,其中说到:
This notation uses a node identifier (nodeID) convention to indicate blank nodes in the triples of a graph. While node identifiers such as '_:xxx' serve to identify blank nodes in the surface syntax, these expressions are not considered to be the label of the graph node they identify; they are not names, and do not occur in the actual graph.
所以,偶以为:空结点是有nodeID的,由此应该可以知道“blank nodes in common”吧,不知对否?


--  作者:orangebench
--  发布时间:8/4/2004 10:04:00 PM

--  
真子图必须是图对应的三元组集合的一个真子集, 所以

<ex:a> <ex:p> _:x .
_:x <ex:p> _:x .

真子图有两个(除了空图以外),
<ex:a> <ex:p> _:x .

_:x <ex:p> _:x .

把把 _:x 替换为<ex:a> 后, 三元组
<ex:a> <ex:p> <ex:a>
当然不是其真子图了.

以下是引用smileidiot在2004-8-4 21:31:19的发言:

<ex:a> <ex:p> _:x .
_:x <ex:p> _:x .

is lean.

为什么把 _:x 替换为<ex:a> 后 <ex:a> <ex:p> <ex:a> 不是其真子图, 也是它的实例呢?
不懂???



--  作者:orangebench
--  发布时间:8/4/2004 10:11:00 PM

--  
_:y <ex:p> _:x
是冗余三元组, 以为 空节点可以解释为存在(一个节点), 所以这个三元组的意思就是
存在一个节点, 有<ex:p>属性, 值为 _:x; 这相对于<ex:a> <ex:p> _:x 是冗余的.


以下是引用smileidiot在2004-8-4 21:37:37的发言:
Non-lean graphs have internal redundancy and express the same content as their lean subgraphs. For example, the graph

<ex:a> <ex:p> _:x .
_:y <ex:p> _:x .

is not lean

那么,请问:这个非紧致图的冗余是<ex:a> <ex:p> _:x,还是_:y <ex:p> _:x? 直觉上应该是后者(因为其紧致子图是<ex:a> <ex:p> _:x),不过偶个人总觉得这2者都不算是冗余啊!或许匿名结点本身就意义不大?




--  作者:orangebench
--  发布时间:8/4/2004 10:17:00 PM

--  
也只能这么理解了, 即空节点ID相同就是所谓的"blank nodes in common", "share blank nodes"
以下是引用smileidiot在2004-8-4 21:55:00的发言:
[@疑问: 在图语法中,并没有出现空节点标识符,因为无法判断什么是“blank nodes in common”?]

楼主是想说“因此无法判断什么是“blank nodes in common”吧?

我查了0.2 Graph Syntax,其中说到:
This notation uses a node identifier (nodeID) convention to indicate blank nodes in the triples of a graph. While node identifiers such as '_:xxx' serve to identify blank nodes in the surface syntax, these expressions are not considered to be the label of the graph node they identify; they are not names, and do not occur in the actual graph.
所以,偶以为:空结点是有nodeID的,由此应该可以知道“blank nodes in common”吧,不知对否?



--  作者:smileidiot
--  发布时间:8/4/2004 10:27:00 PM

--  
懂了!!!
感谢楼主耐心解释啊~~~~~~
感激ing
--  作者:orangebench
--  发布时间:8/4/2004 10:50:00 PM

--  
1. Interpretations
1.1 Technical note (Informative)
RDF does not impose any logical restrictions on the domains and ranges of properties; in particular, a property may be applied to itself. When [URL=http://www.w3.org/TR/rdf-mt/#glossClass#glossClass]classes[/URL] are introduced in RDFS, they may contain themselves. Such 'membership loops' might seem to violate the axiom of foundation, one of the axioms of standard (Zermelo-Fraenkel) set theory, which forbids infinitely descending chains of membership. However, the semantic model given here distinguishes properties and classes considered as objects from their extensions - the sets of object-value pairs which satisfy the property, or things that are 'in' the class - thereby allowing the extension of a property or class to contain the property or class itself without violating the axiom of foundation. In particular, this use of a class extension mapping allows classes to contain themselves. For example, it is quite OK for (the extension of) a 'universal' class to contain the class itself as a member, a convention that is often adopted at the top of a classification hierarchy. (If an extension contained itself then the axiom would be violated, but that case never arises.) The technique is described more fully in [[URL=http://www.w3.org/TR/rdf-mt/#ref-HayMen#ref-HayMen]Hayes&Menzel[/URL]].

[@外延的概念:RDF的属性可以应用于本身, 如(rdf:type rdf:type rdf:Property ) 即说明“rdf:type”是一个属性, 类也可以同时也是实例, 甚至作为其本身的实例, 这种成员循环(member loop)用经典的模型论语义是无法解释的, 所以引入了”外延”(extension)来解决这个问题. 每个类和属性都关联了一个外延. 但关于'membership loops' 导致的(Zermelo-Fraenkel) 集合论的悖论,不了解… ]

In this respect, RDFS differs from many conventional ontology frameworks such as UML which assume a more structured hierarchy of individuals, sets of individuals, etc., or which draw a sharp distinction between data and meta-data. However, while RDFS does not assume the existence of such structure, it does not prohibit it. RDF allows membership loops, but it does not mandate their use for all parts of a user vocabulary. If this aspect of RDFS is found worrying, then it is possible to restrict oneself to a subset of RDF graphs which do not contain any such 'loops' of class membership or property application while retaining much of the expressive power of RDFS for many practical purposes, and semantic extensions may impose syntactic conditions which forbid such looped constructions.

[@ “member loop”使得RDF和大多数本体框架不兼容, 所以, 也许有时,需要禁止使用member loop]

The use of the explicit extension mapping also makes it possible for two properties to have exactly the same values, or two classes to contain the same instances, and still be distinct entities. This means that RDFS classes can be considered to be rather more than simple sets; they can be thought of as 'classifications' or 'concepts' which have a robust notion of identity which goes beyond a simple [URL=http://www.w3.org/TR/rdf-mt/#glossExtensional#glossExtensional]extensional[/URL] correspondence. This property of the [URL=http://www.w3.org/TR/rdf-mt/#glossModeltheory#glossModeltheory]model theory[/URL] has significant consequences in more expressive languages built on top of RDF, such as OWL [[URL=http://www.w3.org/TR/rdf-mt/#ref-owl#ref-owl]OWL[/URL]], which are capable of expressing identity between properties and classes directly. This '[URL=http://www.w3.org/TR/rdf-mt/#glossIntensional#glossIntensional]intensional[/URL]' nature of classes and properties is sometimes claimed to be a useful property of a descriptive language, but a full discussion of this issue is beyond the scope of this document.

[@内涵(intension)的概念: 外延的引入导致了一个问题: 两个不同的类的外延可能相同, 为了区分这两个类, 就引入了内涵(intension)的概念, 可以看成是类或属性的内在标识]

Notice that the question of whether or not a class contains itself as a member is quite different from the question of whether or not it is a subclass of itself. All classes are subclasses of themselves.

[@ 类不一定是它本身的实例, 但都是它本身的子类]

Readers who are familiar with conventional logical semantics may find it useful to think of RDF as a version of existential binary relational logic in which relations are first-class entities in the universe of quantification. Such a logic can be obtained by encoding the relational atom R(a,b) into a conventional logical syntax, using a notional three-place relation Triple(a,R,b); the basic semantics described here can be reconstructed from this intuition by defining the extension of y as the set {<x,z> : Triple(x,y,z)} and noting that this would be precisely the denotation of R in the conventional Tarskian model theory of the original form R(a,b) of the relational atom. This construction can also be traced in the semantics of the Lbase axiomatic description [[URL=http://www.w3.org/TR/rdf-mt/#ref-Lbase#ref-Lbase]LBASE[/URL]].

[@这段没看懂, 不知道怎么可以转换到 经典的Tarski模型论语义]


--  作者:Jamsauce
--  发布时间:8/17/2004 9:17:00 PM

--  
收获不小

楼主辛苦了,继续......

谢谢!


--  作者:orangebench
--  发布时间:8/23/2004 3:33:00 PM

--  
谢谢楼上鼓励,那我继续
--  作者:orangebench
--  发布时间:8/23/2004 3:34:00 PM

--  
1.2 URI references, Resources and Literals.
This document does not take any position on the way that URI references may be composed from other expressions, e.g. from relative URIs or QNames; the semantics simply assumes that such lexical issues have been resolved in some way that is globally coherent, so that a single URI reference can be taken to have the same meaning wherever it occurs. Similarly, the semantics has no special provision for tracking temporal changes. It assumes, implicitly, that URI references have the same meaning whenever they occur. To provide an adequate semantics which would be sensitive to temporal changes is a research problem which is beyond the scope of this document.

[@对URIref的解释: 忽略内部结构以及时态问题]

The semantics does not assume any particular relationship between the denotation of a URI reference and a document or Web resource which can be retrieved by using that URI reference in an HTTP transfer protocol, or any entity which is considered to be the source of such documents. Such a requirement could be added as a semantic extension, but the formal semantics described here makes no assumptions about any connection between the denotations of URI references and the uses of those URI references in other protocols.

[@在解释URIref时, 只把URIref作为一个标识符, 而不会关心通过它能获取的资源]

The semantics treats all RDF [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s as expressions which denote. The things denoted are called 'resources', following [[URL=http://www.w3.org/TR/rdf-mt/#ref-2369#ref-2369]RFC 2396[/URL]], but no assumptions are made here about the nature of [URL=http://www.w3.org/TR/rdf-mt/#glossResource#glossResource]resources[/URL]; 'resource' is treated here as synonymous with 'entity', i.e. as a generic term for anything in the universe of discourse.

[@RDF中的名字,即URIref和文字, 表示了一个资源]

The different syntactic forms of [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s are treated in particular ways. URI references are treated simply as logical constants. Plain literals are considered to denote themselves, so have a fixed meaning. The denotation of a typed literal is the value mapped from its enclosed character string by the datatype associated with its enclosed type. RDF assigns a particular meaning to literals typed with rdf:XMLLiteral, [URL=http://www.w3.org/TR/rdf-mt/#defXMLdatatype#defXMLdatatype]described [/URL]in [URL=http://www.w3.org/TR/rdf-mt/#InterpVocab#InterpVocab]section 3[/URL].

[@对name的指派, 会在1.3节讲述]


--  作者:orangebench
--  发布时间:8/23/2004 3:35:00 PM

--  
1.3 Interpretations
The basic intuition of model-theoretic semantics is that asserting a sentence makes a claim about the [URL=http://www.w3.org/TR/rdf-mt/#glossWorld#glossWorld]world[/URL]: it is another way of saying that the world is, in fact, so arranged as to be an [URL=http://www.w3.org/TR/rdf-mt/#glossInterpretation#glossInterpretation]interpretation[/URL] which makes the sentence true. In other words, an assertion amounts to stating a constraint on the possible ways the world might be. Notice that there is no presumption here that any assertion contains enough information to specify a single unique interpretation. It is usually impossible to assert enough in any language to completely constrain the interpretations to a single possible world, so there is no such thing as 'the' unique interpretation of an RDF graph. In general, the larger an RDF graph is - the more it says about the world - then the smaller the set of interpretations that an [URL=http://www.w3.org/TR/rdf-mt/#glossAssertion#glossAssertion]assertion[/URL] of the graph allows to be true - the fewer the ways the world could be, while making the asserted graph true of it.

[@解释: 一个满足某些约束的世界,这些约束就是用户写下的断言(即一个RDF图)的含义, 所以一个图的解释有多个, 图中说的东西越多, (断言为真的)解释的个数就越少]

The following definition of an interpretation is couched in mathematical language, but what it amounts to intuitively is that an interpretation provides just enough information about a possible way the world might be - a 'possible world' - in order to fix the truth-value (true or false) of any ground RDF triple. It does this by specifying for each URI reference, what it is supposed to be a name of; and also, if it is used to indicate a property, what values that property has for each thing in the [URL=http://www.w3.org/TR/rdf-mt/#glossUniverse#glossUniverse]universe[/URL]; and if it is used to indicate a [URL=http://www.w3.org/TR/rdf-mt/#defDatatype#defDatatype]datatype[/URL], that the [URL=http://www.w3.org/TR/rdf-mt/#defDatatype#defDatatype]datatype[/URL] defines a mapping between lexical forms and datatype values. This is just enough information to fix the truth-value of any [URL=http://www.w3.org/TR/rdf-mt/#defgd#defgd]ground[/URL] triple, and hence any ground RDF graph. (Non-ground graphs are considered in the following section.) Note that if any of this information were omitted, it would be possible for some [URL=http://www.w3.org/TR/rdf-mt/#glossWellformed#glossWellformed]well-formed[/URL] triple to be left without a determinate value; and also that any other information - such as the exact nature of the things in the [URL=http://www.w3.org/TR/rdf-mt/#glossUniverse#glossUniverse]universe[/URL] - would, regardless of its intrinsic interest, be irrelevant to the actual truth-values of any triple.

[@对ground triple的解释:需要给三元组赋真值:包含了对URIref,property,datatype的解释]

All interpretations will be relative to a set of [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s, called the vocabulary of the interpretation; so that one should speak, strictly, of an interpretation of an RDF vocabulary, rather than of RDF itself. Some interpretations may assign special meanings to the symbols in a particular vocabulary. Interpretations which share the special meaning of a particular vocabulary will be named for that vocabulary, e.g. '[URL=http://www.w3.org/TR/rdf-mt/#rdfinterpdef#rdfinterpdef]rdf-interpretation[/URL]s', '[URL=http://www.w3.org/TR/rdf-mt/#rdfsinterpdef#rdfsinterpdef]rdfs-interpretation[/URL]s', etc. An interpretation with no particular extra conditions on a vocabulary (including the RDF vocabulary itself) will be called a simple interpretation, or simply an interpretation.

[@@解释一个name的集合,即解释的词汇表。 针对某个词汇表的特定解释以这个词汇表的名称命名,如rdf-解释,rdfs-解释。一个没有对任意词汇集作出指定含义的解释称为简单解释]

RDF uses several forms of literal. The chief semantic characteristic of literals is that their meaning is largely determined by the form of the string they contain. Plain literals, without an embedded type URI reference, are always interpreted as referring to themselves: either a character string or a pair consisting of a character string and a [URL=http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-Literal]language tag[/URL]; in either case, the character string is referred to as the "literal character string". In the case of typed literals, however, the full specification of the meaning depends on being able to access [URL=http://www.w3.org/TR/rdf-mt/#defDatatype#defDatatype]datatype[/URL] information which is external to RDF itself. A full discussion of the meaning of typed literals is described in [URL=http://www.w3.org/TR/rdf-mt/#dtype_interp#dtype_interp]section 5[/URL] , where a special notion of datatype interpretation is introduced. Each interpretation defines a mapping IL from typed literals to their interpretations. Stronger conditions on IL will be defined as the notion of 'interpretation' is extended in later sections.

[@对文字的解释:平凡文字解释为本身,类型文字的解释依赖于数据类型信息]

Throughout this document, precise semantic conditions will be set out in tables which state semantic conditions, tables containing true assertions and [URL=http://www.w3.org/TR/rdf-mt/#glossValid#glossValid]valid[/URL] inference rules, and tables listing syntax, which are distinguished by background color. These tables, taken together, amount to a formal summary of the entire semantics. Note that the semantics of RDF does not depend on that of RDFS. The full semantics of RDF is defined in sections [URL=http://www.w3.org/TR/rdf-mt/#sinterp#sinterp]1[/URL] and [URL=http://www.w3.org/TR/rdf-mt/#InterpVocab#InterpVocab]3[/URL] ; the full semantics of RDFS in sections [URL=http://www.w3.org/TR/rdf-mt/#sinterp#sinterp]1[/URL], [URL=http://www.w3.org/TR/rdf-mt/#InterpVocab#InterpVocab]3[/URL] and [URL=http://www.w3.org/TR/rdf-mt/#rdfs_interp#rdfs_interp]4[/URL].

Definition of a simple interpretation.

A simple interpretation I of a vocabulary V is defined by:

1. A non-empty set IR of resources, called the domain or universe of I.

2. A set IP, called the set of properties of I.

3. A mapping IEXT from IP into the powerset of IR x IR i.e. the set of sets of pairs <x,y> with x and y in IR .

4. A mapping IS from URI references in V into (IR union IP)

5. A mapping IL from typed literals in V into IR.

6. A distinguished subset LV of IR, called the set of literal values, which contains all the plain literals in V

IEXT(x), called the [URL=http://www.w3.org/TR/rdf-mt/#defexten#defexten]extension[/URL] of x, is a set of pairs which identify the arguments for which the property is true, that is, a binary relational extension. This trick of distinguishing a relation as an object from its relational extension allows a property to occur in its own extension, as [URL=http://www.w3.org/TR/rdf-mt/#technote#technote]noted earlier[/URL].

IR:资源的非空集合,称为解释I的论域;
IP:属性的集合;
LV: 文字值的集合,IR的子集,包含了V中所有的平凡文字;
IEXT,将属性映射为<资源 资源>的集合;
IS,将V中URI映射为资源或属性;
IL,将V中类型文字映射为资源;

由上可知:对于谓词p,先通过IS映射为属性IS(p),再由IEXT得到其外延IEXT(IS(p)) 即资源-资源对的集合。这显然不同于经典逻辑学――直接将二元谓词映射为论域上的二元关系,RDF语义将其先映射为论域上的元素再由此映射为论域上的二元关系。但借此技巧,将作为资源的属性与属性的外延严格划分,则 IS(p) 允许出现在IEXT(IS(p)) 中而不会导致悖论。另外, RDF图中一般都隐含有IP是 IR的子集,但简单解释中并未显式要求。

The assumption that LV is a subset of IR amounts to saying that literal values are thought of as real entities that 'exist'. This amounts to saying that literal values are resources. However, this does not imply that literals should be identified with URI references. Note that LV may contain other items in addition to plain literals. There is a technical reason why the range of IL is IR rather than restricted to LV. When interpretations take account of [URL=http://www.w3.org/TR/rdf-mt/#defDatatype#defDatatype]datatype[/URL] information, it is syntactically possible for a typed literal to be internally inconsistent, and such ill-typed literals are required to denote a non-literal value, as [URL=http://www.w3.org/TR/rdf-mt/#illformedliteral#illformedliteral]explained[/URL] in [URL=http://www.w3.org/TR/rdf-mt/#dtype_interp#dtype_interp]section 5[/URL].

LV是IR的子集意味着文字值也看成是资源,尽管没有URIref标识。此外,类型文字可能是语法不合法的,因此映射IL的值域是IR,而不是LV。


--  作者:orangebench
--  发布时间:9/7/2004 10:09:00 PM

--  
1.4 Denotations of Ground Graphs
The denotation of a ground RDF graph in I is given recursively by the following rules, which extend the interpretation mapping I from [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s to ground graphs. These rules (and extensions of them given later) work by defining the denotation of any piece of RDF syntax E in terms of the denotations of the immediate syntactic constituents of E, hence allowing the denotation of any piece of RDF to be determined by a kind of syntactic recursion.

图的指派:上面定义了一个图的解释,但没有给出图的真值判断方法。指派定义方法是从基本的语法元素开始,然后利用的语法的递归,定义一个图的指派。

In this table, and throughout this document, the equality sign = indicates identity and angle brackets <x,y> are used to indicate an ordered pair of x and y. RDF graph syntax is indicated using the notational conventions of the [URL=http://www.w3.org/TR/rdf-testcases/#ntriples]N-Triples[/URL] syntax described in the RDF test cases document [[URL=http://www.w3.org/TR/rdf-mt/#ref-rdf-tests#ref-rdf-tests]RDF-TESTS[/URL]]: literal strings are encloded within double quote marks, language tags indicated by the use of the @ sign, and triples terminate with a 'code dot' . .

Semantic conditions for ground graphs.

if E is a plain literal "aaa" in V then I(E) = aaa

if E is a plain literal "aaa"@ttt in V then I(E) = <aaa, ttt>

if E is a typed literal in V then I(E) = IL(E)

if E is a URI reference in V then I(E) = IS(E)

if E is a ground triple s p o. then I(E) = true if

s, p and o are in V, I(p) is in IP and <I(s),I(o)> is in IEXT(I(p))

otherwise I(E)= false.

if E is a ground RDF graph then I(E) = false if I(E') = false for some triple E' in E, otherwise I(E) =true.

If the vocabulary of an RDF graph contains names that are not in the vocabulary of an interpretation I - that is, if I simply does not give a semantic value to some [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL] that is used in the graph - then these truth-conditions will always yield the value false for some triple in the graph, and hence for the graph itself. Turned around, this means that any assertion of a graph implicitly asserts that all the [URL=http://www.w3.org/TR/rdf-mt/#defname#defname]name[/URL]s in the graph actually refer to something in the world. The final condition implies that an empty graph (an empty set of triples) is trivially true.

除了对词汇中的名字解释,还需递归定义RDF图上每一句法E在I中的值:

1.        如果E 是一个平凡文字,那么 I(E)=E;

2.        如果E 是一个类型文字,那么I(E)= IL(E);

3.        如果E 是URI,那么I(E)=IS(E);

4.      如果E是不带空节点的三元组<s, p, o>,则 I(E)=真 当且仅当s, p 和o 属于V, I(p)属于IP, 且 <I(s), I(o)>属于IEXT(I(p));

5.        如果E是RDF图,则 I(E)=假 当且仅当 图E中存在某个三元组E’ 使得 I(E’)=假,否则 I(E)=真

上述也称为简单解释的语义条件。如果词汇中存在某个名字,I却没有给予解释,则该图赋值为假。此外,显然空图是真的。

Note that the denotation of plain literals is always in LV; and that those of the subject and object of any true triple must be in IR; so any URI reference which occurs in a graph both as a predicate and as a subject or object must denote something in the intersection of IR and IP in any interpretation which satisfies the graph.

平凡文字的指派都是属于LV的,赋值为真的三元组的主体和客体的指派都属于IR。如果对一个真值为假的三元组,就没有这个约束了。

As an illustrative example, the following is a small interpretation for the artificial vocabulary {ex:a, ex:b, ex:c, "whatever", "whatever"^^ex:b}. Integers are used to indicate the non-literal 'things' in the universe. This is not meant to imply that interpretations should be interpreted as being about arithmetic, but more to emphasize that the exact nature of the things in the universe is irrelevant. LV can be any set satisfying the semantic conditions. (In this and subsequent examples the greater-than and less-than symbols are used in several ways: following mathematical usage to indicate abstract pairs and n-tuples; following N-Triples syntax to enclose URI references, and also as arrowheads when indicating mappings.)

IR = LV union{1, 2}

IP={1}

IEXT: 1=>{<1,2>,<2,1>}

IS: ex:a=>1, ex:b=>1, ex:c=>2

IL: "whatever"^^ex:b =>2

按此在新窗口浏览图片
Figure 1: An example of an interpretation. Note, this is not a picture of an RDF graph.
The figure does not show the infinite number of members of LV.

This interpretation makes these triples true:

  <ex:a> <ex:b> <ex:c> .

  <ex:c> <ex:a> <ex:a> .

  <ex:c> <ex:b> <ex:a> .

  <ex:a> <ex:b> "whatever"^^<ex:b> .

For example, I(<ex:a> <ex:b> <ex:c> .) = true if <I(ex:a),I(ex:c)> is in IEXT(I(<ex:b>)), i.e. if <1,2> is in IEXT(1), which is {<1,2>,<2,1>} and so does contain <1,2> and so I(<ex:a <ex:b> ex:c>) is true.

The truth of the fourth triple is a consequence of the rather idiosyncratic interpretation chosen here for typed literals.

这些三元组在这个(简单)解释下都是真的,但在别的(简单)解释下,就可能为假了。如果在任意解释下都为真,那它就是全真式,后面的RDF解释,RDFS解释会提到。

In this interpretation IP is a subset of IR; this will be typical of RDF semantic interpretations, but is not required.

一般来说IP是IR的子集,因为属性也可以当成资源,作为三元组的主体或客体,都这并不是必须的。因为可能在我的图中,并不是所有的属性都做为了主体或客体。

It makes these triples false:

  <ex:a> <ex:c> <ex:b> .

  <ex:a> <ex:b> <ex:b> .

  <ex:c> <ex:a> <ex:c> .

  <ex:a> <ex:b> "whatever" .

For example, I(<ex:a> <ex:c> <ex:b> .) = true if <I(ex:a), I(<ex:b>)>, i.e.<1,1>, is in IEXT(I(ex:c)); but I(ex:c)=2 which is not in IP, so IEXT is not defined on 2, so the condition fails and I(<ex:a> <ex:c> <ex:b> .) = false.

It also makes all triples containing a plain literal false, since the property extension does not have any pairs containing a plain literal.

在这个解释下,如果三元组中有简单文字,则为假,因为属性的解释函数(IEXT)中没有包含任意的简单文字。

To emphasize; this is only one possible interpretation of this vocabulary; there are (infinitely) many others. For example, if this interpretation were modified by attaching the property extension to 2 instead of 1, none of the above triples would be true.

一个图的解释有无穷多个。

This example illustrates that any interpretation which maps any URI reference which occurs in the predicate position of a triple in a graph to something not in IP will make the graph false.

如果解释没有把谓词URI映射为到IP,则包含此谓词的三元组肯定为假。


--  作者:orangebench
--  发布时间:9/7/2004 10:54:00 PM

--  
1.5. Blank Nodes as Existential Variables

It simply extends the rules for defining denotations under an interpretation, so that the same interpretation that provides a truth-value for ground graphs also assigns truth-values to graphs with blank nodes, even though it provides no denotation for the blank nodes themselves.

这句话不理解。难道说:对一个包含空节点的图,对图中的空节点不做指派,只要对其中的gound部分解释为真,则对这个图的解释也为真???


--  作者:orangebench
--  发布时间:9/8/2004 12:50:00 AM

--  
1.5. Blank Nodes as Existential Variables
Blank nodes are treated as simply indicating the existence of a thing, without using, or saying anything about, the name of that thing. (This is not the same as assuming that the blank node indicates an 'unknown' URI reference; for example, it does not assume that there is any URI reference which refers to the thing. The discussion of [URL=http://www.w3.org/TR/rdf-mt/#glossSkolemization#glossSkolemization]Skolemization[/URL] in [URL=http://www.w3.org/TR/rdf-mt/#prf#prf]appendix A[/URL] is relevant to this point.)

空节点只是表示某个事物的存在,而不是一个未知的URIref,事实上,可能没有任何的URIref指代这个事物。

An interpretation can specify the truth-value of a graph containing blank nodes. This will require some definitions, as the theory so far provides no meaning for blank nodes. Suppose I is an interpretation and A is a mapping from some set of blank nodes to the universe IR of I, and define I+A to be an extended interpretation which is like I except that it uses A to give the interpretation of blank nodes. Define blank(E) to be the set of blank nodes in E. Then the above rules can be extended to include the two new cases that are introduced when blank nodes occur in the graph:

对空节点的解释:给定一个解释I,首先要给出一个映射A,把空节点映射到I中IR中的元素,定义I+A为图的扩展解释。这样,对空节点的指派就是这个节点的映射到的资源,一个包含空节点的图为真,当且仅当存在一个映射A’,使得图中的空节点替换成A’映射到的资源后得到的图为真。

Semantic conditions for blank nodes.

If E is a blank node  and A(E) is defined then [I+A](E) = A(E)

If E is an RDF graph then I(E) = true if [I+A'](E) = true for some mapping A' from blank(E) to IR, otherwise I(E)= false.

Notice that this does not change the definition of an interpretation; it still consists of the same values IR, IP, IEXT, IS, LV and IL. It simply extends the rules for defining denotations under an interpretation, so that the same interpretation that provides a truth-value for ground graphs also assigns truth-values to graphs with blank nodes, even though it provides no denotation for the blank nodes themselves. Notice also that the blank nodes themselves are perfectly well-defined entities; they differ from other nodes only in not being assigned a denotation by an interpretation, reflecting the intuition that they have no 'global' meaning (i.e. outside the graph in which they occur).

对空节点的解释: 并没有改变简单解释的定义,而只是扩展了指派的定义。空节点和其他节点的区别就在于它没有指派,这和直觉上说的它没有全局含义是一致的。

For example, the graph defined by the following triples is false in the interpretation shown in figure 1:

  _:xxx <ex:a> <ex:b> .

  <ex:c> <ex:b> _:xxx .

since if A' maps the blank node to 1 then the first triple is false in I+A', and if it maps it to 2 then the second triple is false.

Note that each of these triples, if thought of as a single graph, would be true in I, but the whole graph is not; and that if a different nodeID were used in the two triples, indicating that the RDF graph had two blank nodes instead of one, then A' could map one node to 2 and the other to 1, and the resulting graph would be true under the interpretation I.

这两个三元组如果在一个图中,则在例1的解释中是假的,但如果把每个三元组看成独立的图 ,则分别在例1的解释中是真的。这一方面说明:空节点不会改变解释的定义(例1的解释也能应用于这两个三元组),另一方面说明:图合并时要注意空节点的含义。

This effectively treats all blank nodes as having the same meaning as existentially quantified variables in the RDF graph in which they occur, and which have the scope of the entire graph. In terms of the N-Triples syntax, this amounts to the convention that would place the quantifiers just outside, or at the outer edge of, the N-Triples document corresponding to the graph. This in turn means that there is a subtle but important distinction in meaning between the operation of forming the union of two graphs and that of forming the [URL=http://www.w3.org/TR/rdf-mt/#defmerge#defmerge]merge[/URL]. The simple union of two graphs corresponds to the conjunction ( 'and' ) of all the triples in the graphs, maintaining the identity of any blank nodes which occur in both graphs. This is appropriate when the information in the graphs comes from a single source, or where one is derived from the other by means of some [URL=http://www.w3.org/TR/rdf-mt/#glossValid#glossValid]valid[/URL] inference process, as for example when applying an inference rule to add a triple to a graph. Merging two graphs treats the blank nodes in each graph as being existentially quantified in that graph, so that no blank node from one graph is allowed to stray into the scope of the other graph's surrounding quantifier. This is appropriate when the graphs come from different sources and there is no justification for assuming that a blank node in one refers to the same entity as any blank node in the other.

空节点的作用域即它所在的图。要注意图的并(union)和合并(merge)的区别:union是指图对应的三元组集合的并集(maintaining the identity of any blank nodes which occur in both graphs? 空节点ID保持不变);而merge时要保证,空节点的作用域还是它原来所在的图,因此如果不同图的空节点ID相同,合并的时候,要修改其中一个的ID,使他们不同。

Union适用的情况是:要合并的图本来就是来自同一个数据源的,或一个图是另一个图的推理得到的;mege适用的情况是:要合并的图本来就是来自多个数据源,没有理由假设一个图中的空节点会和另一个图的空节点指代的实体相同。


--  作者:orangebench
--  发布时间:9/8/2004 5:48:00 PM

--  
今天和人讨论了一下:
那个"ground grahp"其实是“graphs with blank nodes”的实例,这样就能说通了。
本来一个图的实例就蕴含这个图的。
以下是引用orangebench在2004-9-7 22:54:39的发言:
1.5. Blank Nodes as Existential Variables

It simply extends the rules for defining denotations under an interpretation, so that the same interpretation that provides a truth-value for ground graphs also assigns truth-values to graphs with blank nodes, even though it provides no denotation for the blank nodes themselves.

这句话不理解。难道说:对一个包含空节点的图,对图中的空节点不做指派,只要对其中的gound部分解释为真,则对这个图的解释也为真???



--  作者:buildarmy0200
--  发布时间:1/7/2006 8:25:00 PM

--  
顶一下 先
--  作者:endearyou
--  发布时间:1/7/2006 11:11:00 PM

--  
个人一点想法:
假设M是空白顶点集合到类型文字、空白顶点或URIs 其中部分的映射,通过替换G中一些或全部空白顶点N 获得的任何RDF图 G`称为G 的实例。
考虑RDF图 和双射M:BN1-->BN2 ,其中BN1 和BN2 分别是G中的空白顶点,通过把其它空白顶点标识符替换 G中的空白顶点标识符,则有 G`(T)=M(G)为 的一个实例,且G` 是 G的一个实例(通过定义M 的逆),两个这样的RDF图称为等价图。等价RDF图可作为同一RDF图对待,与空白顶点作为“匿名资源”定义一致,仅仅以临时方式分配标识符。

--  作者:yky
--  发布时间:3/19/2006 9:58:00 AM

--  
在RDF Semantic中有这样一条推理规则:
uuu rdfs:domain vvv .
vvv rdfs:subClassOf zzz
则可以得出uuu rdfs:domain zzz .


还有一条
uuu rdfs:range vvv .
vvv rdfs:subClassOf zzz .
推出:
uuu rdfs:range zzz .
对这两条不理解,请指教,谢谢!


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