我试图掌握语义网的概念。我发现很难理解RDF和OWL之间的确切区别。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时,您必须区分两件事:
You can refer to RDF as a concept: A way of describing things/logic/anything using collections of triples. Example: "Anna has apples." "Apples are healthy." Above you have two triples that describe two resources "Anna" and "apples". The concept of RDF (Resource Description Framework) is that you can describe resources (anything) with sets of only 3 words (terms). At this level you don't care about how you are storing information, whether you have a string of 3 words, or a painting on a wall, or a table with 3 columns etc. At this conceptual level the only thing that is important is that you can represent anything that you want using triple statements. You can refer to RDF as a vocabulary A vocabulary is just a collection of term definitions stored in a file or somewhere. These defined terms have the purpose of being generally reused in other descriptions so people can describe data (resources) more easily and in a standard manner. On the web you can find some standard vocabularies like: RDF (https://www.w3.org/1999/02/22-rdf-syntax-ns) RDFS (https://www.w3.org/2000/01/rdf-schema#) OWL (https://www.w3.org/2002/07/owl) The RDF vocubalary defines terms that help you to describe (at the most basic level as possible) individuals/instances of classes. Example: rdf:type, rdf:Property. With rdf:type you can describe that some resource is an instance of a class: <http://foo.com/anna> rdf:type <http://foo.com/teacher> So the RDF vocabulary has terms that are targeting basic descriptions of class instances and some other descriptions (like the triple statement definition, or the predicate definition... in general things that are realted to the RDF concept). The RDFS vocabulary has term definitions that help you describe classes and relationships between them. RDFS vocabulary doesn't care about instances of classes (individuals) like the RDF vocabulary. Example: the rdfs:subClassOf property which you can use to describe that a class A is subclass of class B. The RDF and the RDFS vocabularies are dependent to one another. RDF defines it's terms using RDFS, and RDFS uses RDF for defining it's own terms. The RDF/RDFS vocabularies provide terms that can be used to create very basic descriptions of resources. If you want to have more complex and accurate descriptions you have to use the OWL vocabulary.
OWL词汇表附带了一组针对更详细描述的新术语。这些术语是使用RDF/RDFS词汇表中的术语定义的。
owl:ObjectProperty a rdfs:Class ;
rdfs:label "ObjectProperty" ;
rdfs:comment "The class of object properties." ;
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
rdfs:subClassOf rdf:Property .
owl:DatatypeProperty a rdfs:Class ;
rdfs:label "DatatypeProperty" ;
rdfs:comment "The class of data properties." ;
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
rdfs:subClassOf rdf:Property .
owl:TransitiveProperty a rdfs:Class ;
rdfs:label "TransitiveProperty" ;
rdfs:comment "The class of transitive properties." ;
rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
rdfs:subClassOf owl:ObjectProperty .
正如您在上面所看到的,OWL词汇表通过创建新的属性类型来扩展rdf:Property的概念,这些类型不那么抽象,可以提供更准确的资源描述。
结论:
RDF is a concept or a way of describing resources using sets of triples. RDF triples can be stored in different formats (XML/RDF, Turtle etc.) The concept of RDF is the base model of all semantic web technologies and structures (like vocabularies). RDF is also a vocabulary that along with the RDFS vocabulary provides a set of terms that can be used for creating general/abstract descriptions of resources. OWL is a vocabulary built with RDF and RDFS vocabularies that provide new terms for creating more detailed descriptions of resources. All semantic web vocabularies (RDF, RDFS, OWL etc) are built by respecting the RDF concept. And of course the OWL vocabulary has behind the scenes all kind of complex logic and concepts which define the Web Ontology Language. The OWL vocabulary is just a way of using all that logic in practice.
简而言之:
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。
一图胜千言!下面这张图应该可以加强克里斯托弗·古特里奇的观点 在这个回答中说语义网是一个“分层架构”。
来源:https://www.obitko.com/tutorials/ontologies-semantic-web/semantic-web-architecture.html
我试图掌握语义网的概念。我发现这很难 来理解RDF和OWL之间的确切区别。是 OWL是RDF的扩展或者这两者是完全不同的 技术吗?
简而言之,是的,您可以说OWL是RDF的扩展。
In more detail, with RDF you can describe a directed graph by defining subject-predicate-object triples. The subject and the object are the nodes, the predicate is the edge, or by other words, the predicate describes the relation between the subject and the object. For example :Tolkien :wrote :LordOfTheRings or :LordOfTheRings :author :Tolkien, etc... Linked data systems use these triples to describe knowledge graphs, and they provide ways to store them, query them. Now these are huge systems, but you can use RDF by smaller projects. Every application has a domain specific language (or by DDD terms ubiquitous language). You can describe that language in your ontology/vocabulary, so you can describe the domain model of your application with a graph, which you can visualize show it to business ppl, talk about business decisions based on the model, and build the application on top of that. You can bind the vocab of your application to the data it returns and to a vocabulary known by the search engines, like microdata (for example you can use HTML with RDFA to do this), and so search engines can find your applications easily, because the knowledge about what it does will be machine processable. This is how semantic web works. (At least this is how I imagine it.)
Now to describe object oriented applications you need types, classes, properties, instances, etc... With RDF you can describe only objects. RDFS (RDF schema) helps you to describe classes, inheritance (based on objects ofc.), but it is too broad. To define constraints (for example one kid per chinese family) you need another vocab. OWL (web ontology language) does this job. OWL is an ontology which you can use to describe web applications. It integrates the XSD simpleTypes. So RDF -> RDFS -> OWL -> MyWebApp is the order to describe your web application in a more and more specific way.
首先,正如前面所指出的,owl可以在RDF中序列化。
其次,OWL通过提供使用正式的可计算一阶描述逻辑定义三元组组件的设备,为RDF添加了本体功能(RDF本身仅为正式的知识表示提供了极其有限的功能)。这就是所谓的“语义丰富性”。
第三,重要的是要意识到在OWL- full(对于OWL 1)中rdfs:class和OWL:class是等价的,在OWL- dl中,OWL:class是rdfs:class的子类。实际上,这意味着您可以使用OWL本体作为RDF的模式(它不正式地需要模式)。
我希望这有助于进一步澄清。