User Tools

RDF

keyword: semantic web

RDF is a general method to decompose any type of knowledge into small pieces, with some rules about the semantics, or meaning, of those pieces. The point is to have a method so simple that it can express any fact, and yet structured enough that computer applications can do useful things with it.
RDF 是一種,透過一些語義的、意義的規則,將知識分解為小片段的方法。要點在於這個方法非常簡單,以至於可以表現任何事實,並且也足夠結構化到讓電腦程式可以處理。

雖然 RDF 的標準中有使用 XML 規範,但 RDF 不一定必須使用 XML 來陳述。例如可以使用 Notation 3

@prefix : <http://www.example.org/> .
:john    a           :Person .
:john    :hasMother  :susan .
:john    :hasFather  :richard .
:richard :hasBrother :luke .

的寫法與用 XML 來陳述意義是一樣的

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:ns="http://www.example.org/#">
  <ns:Person rdf:about="http://www.example.org/#john">
    <ns:hasMother rdf:resource="http://www.example.org/#susan" />
    <ns:hasFather>
      <rdf:Description rdf:about="http://www.example.org/#richard">
        <ns:hasBrother rdf:resource="http://www.example.org/#luke" />
      </rdf:Description>
    </ns:hasFather>
  </ns:Person>
</rdf:RDF>

RDF can be defined in three simple rules:

  1. A fact is expressed as a triple of the form.
    以三元的形式陳述一件事實。
    • Triple may SPO (Subject, Predicate, Object) or SPV (Subject, Property, Value)
  2. Subjects, predicates, and objects are names for entities, whether concrete or abstract, in the real world. Names are either 1) global and refer to the same entity in any RDF document in which they appear, or 2) local, and the entity it refers to cannot be directly refered to outside of the RDF document.
    主詞, 謂詞, 受詞都是實體的名稱。實體在真實世界中,可以是具體的或是抽象的。名稱可以是 1) 在所有出現的RDF文件中進行全域宣告且指涉相同時的實體 2) 只指涉 RDF 文件中的特定實體。
  3. Objects can also be text values, called literal values.
    物件也可以是文字值,稱為 literal value.

References