我试图掌握语义网的概念。我发现很难理解RDF和OWL之间的确切区别。OWL是RDF的扩展还是这两种完全不同的技术?
当前回答
一图胜千言!下面这张图应该可以加强克里斯托弗·古特里奇的观点 在这个回答中说语义网是一个“分层架构”。
来源:https://www.obitko.com/tutorials/ontologies-semantic-web/semantic-web-architecture.html
其他回答
The Resource Description Framework (RDF) is a powerful formal knowledge representation language and a fundamental standard of the Semantic Web. It has its own vocabulary that defines core concepts and relations (e.g., rdf:type corresponds to the isA relationship), and a data model that enables machine-interpretable statements in the form of subject-predicate-object (resource-property-value) triples, called RDF triples, such as picture-depicts-book. The extension of the RDF vocabulary with concepts required to create controlled vocabularies and basic ontologies is called RDF Schema or RDF Vocabulary Description Language (RDFS). RDFS makes it possible to write statements about classes and resources, and express taxonomical structures, such as via superclass-subclass relationships.
Complex knowledge domains require more capabilities than what is available in RDFS, which led to the introduction of OWL. OWL supports relationships between classes (union, intersection, disjointness, equivalence), property cardinality constraints (minimum, maximum, exact number, e.g., every person has exactly one father), rich typing of properties, characteristics of properties and special properties (transitive, symmetric, functional, inverse functional, e.g., A ex:hasAncestor B and B ex:hasAncestor C implies that A ex:hasAncestor C), specifying that a given property is a unique key for instances of a particular class, and domain and range restrictions for properties.
在WC3文档对象模型中,文档是一个抽象的东西:包含文本、注释、属性和其他嵌套元素的元素。
在语义网中,我们处理的是一组“三元组”。每个三重是:
一个主题,三元组的内容,id,数据库主键,一个URI;而且 谓词,“动词”,“属性”,“数据库列”-另一个URI;而且 对象,原子值或一些URI。
OWL之于语义web就像schema之于W3C文档对象模型。它记录了各种uri的含义,并指定如何以一种可以由机器检查的正式方式使用它们。语义web对于应用于它的OWL可能有效也可能无效,就像文档对于模式可能有效也可能无效一样。
RDF之于语义网就像XML之于DOM——它是一组三元组的序列化。
当然,RDF通常被序列化为XML文档……但重要的是要理解RDF与“RDF的XML序列化”不是一回事。
类似地,OWL可以使用OWL/XML序列化,或者(不好意思)可以表示为RDF,而RDF本身通常序列化为XML。
首先,正如前面所指出的,owl可以在RDF中序列化。
其次,OWL通过提供使用正式的可计算一阶描述逻辑定义三元组组件的设备,为RDF添加了本体功能(RDF本身仅为正式的知识表示提供了极其有限的功能)。这就是所谓的“语义丰富性”。
第三,重要的是要意识到在OWL- full(对于OWL 1)中rdfs:class和OWL:class是等价的,在OWL- dl中,OWL:class是rdfs:class的子类。实际上,这意味着您可以使用OWL本体作为RDF的模式(它不正式地需要模式)。
我希望这有助于进一步澄清。
RDF是一种定义三元“主语”、“谓语”、“值”的方法。 例如,如果我想说,
"我叫皮埃尔"
我会写
<mail:me@where.com> <foaf:name> "Pierre"
参见<foaf:name> ?它是FOAF本体的一部分。本体是描述给定主题的属性和类的正式方式,OWL是定义本体的一种(RDF)方式。
你使用c++, Java等等…定义一个类,一个子类,一个字段,等等…
class Person
{
String email_as_id;
String name;
}
RDF使用OWL来定义这类语句。
另一个问这类问题的地方:http://www.semanticoverflow.com/
简而言之:
RDF定义了如何写东西 OWL定义了要写什么
正如前面的帖子所写的,RDF是一种规范,它告诉您如何定义三元组。
问题是RDF允许你定义任何东西,所以你可以像这样组成一个声明:
| subject | predicate | object |
|---------|-----------|--------|
| Alex | Eats | Apples |
| Apples | Eats | Apples |
| Apples | Apples | Apples |
这些三元组形成有效的RDF文档。
但是,从语义上讲,您知道这些语句是不正确的,RDF不能帮助您验证所编写的内容。
这不是一个有效的本体。
OWL规范准确地定义了您可以用RDF编写什么以获得有效的本体。
本体可以有几个属性。
这就是为什么OWL(版本1)定义了几个版本,如OWL DL, OWL Lite, OWL Full。