OWL指南 推荐标准-2
TransWiki - an Open Translation Project(OTP)
摘要_文档状态_目录 第1节 第2节 第3节 第4节 第5节 第6节 第7节 鸣谢_词汇表_术语索引_参考文献 附录
| Table of contents |
2. The Structure of Ontologies
=2. 本体的结构
OWL is a component of the Semantic Web activity. This effort aims to make Web resources more readily accessible to automated processes by adding information about the resources that describe or provide Web content. As the Semantic Web is inherently distributed, OWL must allow for information to be gathered from distributed sources. This is partly done by allowing ontologies to be related, including explicitly importing information from other ontologies.
OWL是语义网活动的一个组成部分。这项工作的目的是通过对增加关于那些描述或提供网络内容的资源的信息,从而使网络资源能够更容易地被那些自动进程访问。由于语义网络固有的分布性,OWL必须允许信息能够从分布的信息源收集起来。其中,允许本体间相互联系,包括明确导入其他本体的信息,能够部分实现这样的功能。
In addition, OWL makes an open world assumption. That is, descriptions of resources are not confined to a single file or scope. While class C1 may be defined originally in ontology O1, it can be extended in other ontologies. The consequences of these additional propositions about C1 are monotonic. New information cannot retract previous information. New information can be contradictory, but facts and entailments can only be added, never deleted.
另外,OWL提出了一个开放世界的假设。也就是说,对资源的描述并不局限于在一个简单的文件或范围内。类C1本来是由本体O1定义出来的,然而,它也可以是由其他的本体扩展出来的。对C1进行这样的假设的结果是单调的。新的信息不能否定之前的信息。新的信息可以是和旧的信息矛盾的,但是事实和推导只能被增加而不能被删减。
The possibility of such contradictions is something the designer of an ontology needs to take into consideration. It is expected that tool support will help detect such cases.
当设计一个本体的时候,设计者必须考虑到这种矛盾的可能性。一种期望是,工具的支持将帮助侦测到这样的情况。
In order to write an ontology that can be interpreted unambiguously and used by software agents we require a syntax and formal semantics for OWL. OWL is a vocabulary extension [RDF Semantics (http://www.w3.org/TR/rdf-mt/)] of RDF. The OWL semantics are defined in OWL Web Ontology Language Semantics and Abstract Syntax.
为了能写出一个能被唯一翻译的而且能被软件(代理)使用的本体,我们要求OWL有一个语法和正规的语义。OWL是RDF的一个词汇扩充[RDF语义(http://www.w3.org/TR/rdf-mt/)]。在OWL网络本体语言语义和简明语法中,有OWL的语义定义。
2.1. Namespaces
2.1. 命名空间
Before we can use a set of terms, we need a precise indication of what specific vocabularies are being used. A standard initial component of an ontology includes a set of XML namespace declarations enclosed in an opening rdf:RDF tag. These provide a means to unambiguously interpret identifiers and make the rest of the ontology presentation much more readable. A typical OWL ontology begins with a namespace declaration (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#XMLNS) similar to the following. Of course, the URIs of the defined ontologies will not usually be w3.org references.
在我们使用一组术语之前,我们需要一个精确地指出哪些具体的词汇表将被用到。一个标准的本体开头部分里包括一组XML命名空间(namespace)声明(被包含在rdf:RDF标签里)。这些命名空间声明提供了一种无歧义地解释标识符的方式,并使得剩余的本体表示具有更强的可读性。一个典型的OWL本体以一个命名空间声明(namespace declaration) (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#XMLNS)开始(就像下面的例子那样)。当然,被定义本体的URIs未必都是w3.org的。
<rdf:RDF
xmlns ="http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#"
xmlns:vin ="http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#"
xml:base ="http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#"
xmlns:food="http://www.w3.org/TR/2004/REC-owl-guide-20040210/food#"
xmlns:owl ="http://www.w3.org/2002/07/owl#"
xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd ="http://www.w3.org/2001/XMLSchema#">
The first two declarations identify the namespace associated with this ontology. The first makes it the default namespace, stating that unprefixed qualified names refer to the current ontology. The second identifies the namespace of the current ontology with the prefix vin:. The third identifies the base URI for this document (see below (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#owl_imports)). The fourth identifies the namespace of the supporting food ontology with the prefix food:.
前两个声明标识了与该本体相关的命名空间。第一个声明指定了缺省命名空间,即表明所有无前缀的限定名(qualified names)都出自当前本体。第二个声明为当前本体指定了前缀 vin:。第三个声明为当前文档(参见下文 (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#owl_imports))指定了基准URI(base URI)。第四个声明指出食物(food)本体将用前缀food:来标识。
The fifth namespace declaration says that in this document, elements prefixed with owl: should be understood as referring to things drawn from the namespace called http://www.w3.org/2002/07/owl#. This is a conventional OWL declaration, used to introduce the OWL vocabulary.
第五个命名空间声明指出,在当前文档中,前缀为owl:的元素应被理解是对出自http://www.w3.org/2002/07/owl#中的事物的引用。这是引入OWL词汇表的惯例用法。
OWL depends on constructs defined by RDF, RDFS, and XML Schema datatypes. In this document, the rdf: prefix refers to things drawn from the namespace called http://www.w3.org/1999/02/22-rdf-syntax-ns#. The next two namespace declarations make similar statements about the RDF Schema (rdfs:) and XML Schema datatype (xsd:) namespaces.
OWL要依赖RDF、RDFS以及XML Schema数据类型中的构词(constructs)。在本文档中,rdf:前缀表明事物出自命名空间 http://www.w3.org/1999/02/22-rdf-syntax-ns#。接下来的两个命名空间声明分别为RDF Schema和XML Schema数据类型指定前缀rdfs:和xsd:。
As an aid to writing lengthy URLs it can often be useful to provide a set of entity definitions in a document type declaration (DOCTYPE) that precedes the ontology definitions. The names defined by the namespace declarations only have significance as parts of XML tags. Attribute values are not namespace sensitive. But in OWL we frequently reference ontology identifiers using attribute values. They can be written down in their fully expanded form, for example "http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#merlot". Alternatively, abbreviations can be defined using an ENTITY definition, for example:
为帮助书写冗长的URLs,在本体的定义之前,在文档类型声明(DOCTYPE)中提供一些实体定义(entity definitions)常常是很有用的。这些被命名空间声明定义的名称仅当作为XML标签的一部分时才具有意义。属性值(attribute values)是不具有命名空间的。但是在OWL里,我们经常要用属性值来引用本体标识符。我们可以写出它们的完整URI形式,比如“http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#merlot”。或者,利用实体定义来简略URI的书写,例如:
<!DOCTYPE rdf:RDF [
<!ENTITY vin "http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#" >
<!ENTITY food "http://www.w3.org/TR/2004/REC-owl-guide-20040210/food#" > ]>
After this pair of ENTITY declarations, we could write the value "&vin;merlot" and it would expand to "http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#merlot".
在声明这些实体后,我们可以将“&vin;merlot”作为“http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#merlot”的简写。
Perhaps more importantly, the rdf:RDF namespace declarations can then be simplified so that changes made to the entity declarations will propagate through the ontology consistently.
更为重要的是,这样rdf:RDf命名空间声明可以被简化,并且只需对实体声明作修改即可在整个本体范围内应用URI的变化。
<rdf:RDF
xmlns ="&vin;"
xmlns:vin ="&vin;"
xml:base ="&vin;"
xmlns:food="&food;"
xmlns:owl ="http://www.w3.org/2002/07/owl#"
xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd ="http://www.w3.org/2001/XMLSchema#">
2.2. Ontology Headers
2.2. 本体头部
Once namespaces are established we normally include a collection of assertions about the ontology grouped under an owl:Ontology tag. These tags support such critical housekeeping tasks as comments, version control and inclusion of other ontologies.
建立了命名空间后,接下来我们通常要在owl:Ontology标签里给出一组关于本体的声明。这些标签支持一些重要的常务工作比如注释、版本控制以及其他本体的嵌入等。
<owl:Ontology rdf:about="">
<rdfs:comment>An example OWL ontology</rdfs:comment>
<owl:priorVersion rdf:resource="http://www.w3.org/TR/2003/PR-owl-guide-20031215/wine"/>
<owl:imports rdf:resource="http://www.w3.org/TR/2004/REC-owl-guide-20040210/food"/>
<rdfs:label>Wine Ontology</rdfs:label>
...
Note that we use '...' to indicate that there is additional text that has been elided for purposes of the example.
注意:我们使用“...”表明这里有一些文本被略去了。
The owl:Ontology element is a place to collect much of the OWL meta-data for the document. It does not guarantee that the document describes an ontology in the traditional sense. In some communities, ontologies are not about individuals but only the classes and properties that define a domain. When using OWL to describe a collection of instance data the owl:Ontology tag may be needed in order to record version information and to import the definitions that the document depends on. Thus, in OWL the term ontology has been broadened to include instance data (see above (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#Owl_Ontology_definition)).
owl:Ontology元素是用来收集关于当前文档的OWL元数据的。它不确保文档描述一个传统意义的本体。在某些圈子里,本体不是关于个体的,而是仅仅关于某个领域的类和属性的。在使用OWL来描述一个实例数据集合时,owl:Ontology标签也许会被需要用来记录版本信息,和导入文档所依赖的一些定义。因此,在OWL里,本体一词被放宽了,已包含实例数据(如上文 (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#Owl_Ontology_definition))。
The rdf:about attribute provides a name or reference for the ontology. Where the value of the attribute is "", the standard case, the name of the ontology is the base URI of the owl:Ontology element. Typically, this is the URI of the document containing the ontology. An exception to this is a context that makes use of xml:base which may set the base URI for an element to something other than the URI of the current document.
rdf:about属性为本体提供一个名称或引用。根据标准,当rdf:about属性的值为""时,本体的名称是owl:Ontology元素的基准URI。典型地,这是一个包含本体的文档的URI。在使用了xml:base的上下文中则是一个特殊情况,这时owl:Ontology元素的基准URI也许会被设为其他URI。
rdfs:comment provides the obvious needed capability to annotate an ontology.
rdfs:comment提供了显然必须的为本体添加注解的能力。
owl:priorVersion is a standard tag intended to provide hooks for version control systems working with ontologies. Ontology versioning is discussed further below. (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#OntologyVersioning)
owl:priorVersion是一个为用于本体的版本控制系统提供相关信息(hook)的标准标签。本体的版本控制将在后面 (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#OntologyVersioning)作进一步讨论。
owl:imports provides an include-style mechanism. owl:imports takes a single argument, identified by the rdf:resource attribute.
owl:imports提供了一种嵌入机制。owl:imports接受一个用rdf:resource属性标识的参数。
Importing another ontology brings the entire set of assertions provided by that ontology into the current ontology. In order to make best use of this imported ontology it would normally be coordinated with a namespace declaration. Notice the distinction between these two mechanisms. The namespace declarations provide a convenient means to reference names defined in other OWL ontologies. Conceptually, owl:imports is provided to indicate your intention to include the assertions of the target ontology. Importing another ontology, O2, will also import all of the ontologies that O2 imports.
导入另一个本体将把那个本体中的全部声明引入到当前本体中。为了充分利用好这一机制,通常要与命名空间声明结合使用。请注意这两种机制的区别。命名空间声明提供的是一种方便对其他本体定义的名称进行引用的方法。概念上,owl:imports用于表明包含目标本体中的声明。在导入另一个本体02时,在02中导入的其他本体也将被导入。
Note that owl:imports may not always succeed. As you would expect when dealing with the Semantic Web, access to resources distributed across the Web may not always be possible. Tools will respond to this situation in an implementation defined manner.
注意:owl:imports并不是总能成功的。正如你所料的,在涉及语义网时,对分布在Web上的资源的访问也许是不可及的。在这种情况下,工具的响应是与具体实现相关的。
Note that in order to use the OWL vocabulary you do not need to import the owl.rdf (http://www.w3.org/2002/07/owl) ontology. In fact, such an import is not recommended.
注意:不必为了使用OWL本体词汇,而导入owl.rdf (http://www.w3.org/2002/07/owl)本体。实际上,这样导入是不推荐的。
One common set of additional tags that could reasonably be included here are some of the standard Dublin Core (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#DublinCore) metadata tags. The subset includes those that take simple types or strings as values. Examples include Title, Creator, Description, Publisher, and Date (see RDF declarations (http://purl.org/dc/elements/1.1/)).
一个理想的可被嵌入的标签集合是部分标准的Dublin Core (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#DublinCore)元数据标签。该子集包含一些值为简单类型或字符串的标签。比如:Title, Creator, Description, Publisher和Date等(参见RDF声明 (http://purl.org/dc/elements/1.1/))。
Properties that are used as annotations should be declared using owl:AnnotationProperty. E.g.
被用作注解的属性(properties)应用owl:AnnotationProperty来声明。例如
<owl:AnnotationProperty rdf:about="&dc;creator" />
OWL provides several other mechanisms to tie the current ontology and imported ontologies together (see ontology mapping (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#OntologyMapping)).
OWL提供了若干其他的机制来将当前本体与被导入本体相关联(参见本题映射 (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#OntologyMapping)部分)。
We also include an rdfs:label to support a natural language label for our ontology.
我们也可以用rdfs:label来对本体进行自然语言标注。
The ontology header definition is closed with the following tag.
本体头部定义在下列标签处结束。
</owl:Ontology>
This prelude is followed by the actual definitions that make up the ontology and is ultimately closed by
在这段开头之后跟随的是构成本体的实际定义,最终由
</rdf:RDF>
终止。
2.3. Data Aggregation and Privacy
2.3. 数据聚合与隐私
OWL's ability to express ontological information about instances appearing in multiple documents supports linking of data from diverse sources in a principled way. The underlying semantics provides support for inferences over this data that may yield unexpected results. In particular, the ability to express equivalences using owl:sameAs can be used to state that seemingly different individuals are actually the same. Owl:InverseFunctionalProperty can also be used to link individuals together. For example, if a property such as "SocialSecurityNumber" is an owl:InverseFunctionalProperty, then two separate individuals could be inferred to be identical based on having the same value of that property. When individuals are determined to be the same by such means, information about them from different sources can be merged. This aggregation can be used to determine facts that are not directly represented in any one source.
OWL在表达出现在多个文档中的实例信息的能力方面,支持连接来自异源的数据。下层语义为这些数据提供推理支持,这可以产生意外的结果。特别地,owl:sameAs的表达等价的能力,可被用来表达表面上不同的个体实际上是相同的。Owl:InverseFunctionalProperty也可被用来连接个体。例如,如果一个属性,比如“SocialSecurityNumber”,是一个owl:InverseFunctionalProperty,那么两个分开的个体如果具有相同的SocialSecurityNumber属性,则可被推理出是相同的个体。当个体被这样确定为相同时,来自异源的关于这些个体的信息可以被合并。这种聚合可被用来得出不可直接从单源获得的事实。
The ability of the Semantic Web to link information from multiple sources is a desirable and powerful feature that can be used in many applications (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#IntegratingApplications). However, the capability to merge data from multiple sources, combined with the inferential power of OWL, does have potential for abuse. Users of OWL should be alert to the potential privacy implications. Detailed security solutions were considered out of scope for the Working Group. A number of organizations are addressing these issues with a variety of security and preference solutions. See for example SAML (http://www.oasis-open.org/committees/security/charter.php) and P3P (http://www.w3.org/P3P/).
语义网的连接来自多源的信息的能力是一个理想的、强大的特性,它可被用在许多应用 (http://www.w3.org/TR/2004/REC-owl-guide-20040210/#IntegratingApplications)中。但是合并来自多源数据的能力,加上OWL的推理能力,确实存在被误用的可能。OWL用户应对潜在的隐私问题予以警惕。具体的安全方案超出了工作组的工作范畴。一些组织正在用各种不同的安全和偏好方案来处理这些问题,比如SAML (http://www.oasis-open.org/committees/security/charter.php)和P3P (http://www.w3.org/P3P/)。


