OWLウェブ・オントロジー言語
セマンティクスおよび抽象構文
付録B. 例(参考情報)

編集者:
Peter F. Patel-Schneider, Bell Labs Research, Lucent Technologies
Ian Horrocks, Department of Computer Science, University of Manchester

このドキュメントに対する正誤表を参照してください。いくつかの規範的な修正が含まれているかもしれません。

翻訳版も参照してください。


目次


付録B. 例(参考情報)

この付録では、ドキュメントの残りで開発された概念の例を提供します。

B.1 抽象構文からRDFグラフへのマッピングの例

4項の変換規則は、

Ontology(ex:ontology
  DatatypeProperty(ex:name)
  ObjectProperty(ex:author)
  Class(ex:Book)
  Class(ex:Person)

  Individual(type(ex:Book) 
        value(ex:author Individual(type(ex:Person) value(ex:name "Fred"^^xsd:string)))))

のオントロジーを、

  ex:ontology rdf:type owl:Ontology .
  ex:name rdf:type owl:DatatypeProperty .
  ex:author rdf:type owl:ObjectProperty .
  ex:Book rdf:type owl:Class .
  ex:Person rdf:type owl:Class .

  _:x rdf:type ex:Book .
  _:x ex:author _:x1 .
  _:x1 rdf:type ex:Person .  _:x1 ex:name "Fred"^^xsd:string .

に変換することができ、

Ontology(ex:ontology2
  Class(ex:Person)
  Class(ex:Student)
  ObjectProperty(ex:enrolledIn)
  Class(ex:Student complete ex:Person
                   restriction(ex:enrolledIn allValuesFrom(ex:School) minCardinality(1))))

は、以下のように変換することができます。

  ex:ontology2 rdf:type owl:Ontology .
  ex:enrolledIn rdf:type owl:ObjectProperty .
  ex:Person rdf:type owl:Class .
  ex:School rdf:type owl:Class .

  ex:Student rdf:type owl:Class .
  ex:Student owl:equivalentClass _:x .

  _:x owl:intersectionOf _:l1 .
  _:l1 rdf:first  ex:Person .
  _:l1 rdf:rest _:l2 .
  _:l2 rdf:first  _:lr .
  _:l2 rdf:rest rdf:nil .

  _:lr owl:intersectionOf _:lr1 .
  _:lr1 rdf:first _:r1 .
  _:lr1 rdf:rest _:lr2 .
  _:lr2 rdf:first _:r2 .
  _:lr2 rdf:rest rdf:nil .

  _:r1 rdf:type owl:Restriction .
  _:r1 owl:onProperty ex:enrolledIn .
  _:r1 owl:allValuesFrom ex:School .

  _:r2 rdf:type owl:Restriction .
  _:r2 owl:onProperty ex:enrolledIn .
  _:r2 owl:minCardinality "1"^^xsd:nonNegativeInteger .

B.2 OWL DLおよびOWL Fullにおける含意の例

OWL DL は、語彙が適切な議論領域に属していることを示すことができる限り、期待するような含意をサポートします。例えば、

John friend Susan .

は、以下をOWL DL含意しません。

John rdf:type owl:Thing .
Susan rdf:type owl:Thing .
friend rdf:type owl:ObjectProperty .

上記の3つのトリプルは、以下の制限を結論づける前に加えられなければならないでしょう。

John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:minCardinality "1"^^xsd:nonNegativeInteger .

しかし、一旦この付加情報が加えられれば、記述がループを含んでいるものを除き、すべての自然な含意が続きます。例えば、

John rdf:type owl:Thing .
friend rdf:type owl:ObjectProperty .
John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:maxCardinality "0"^^xsd:nonNegativeInteger .

は、そのようなループを記述するための内包原理(comprehension principle)がないため、以下を含意しません。

John rdf:type _:y .
_:y owl:onProperty friend .
_:y owl:allValuesFrom _:y .

これは正に、自然な含意を保ちながら、OWL DLにおいて逆説が形成されるのを防ぐような内包原理が欠けていることを示すものです。

OWL DLでは、以下の形式のすべてのトリプルから成る、特定のローカライズの断言の集合を付け加えることにより、任意の分離された構文(separated-syntax)KBの欠落したローカリゼーションを修復することができます。

<individual> rdf:type owl:Thing .
<class> rdf:type owl:Class .
<oproperty> rdf:type owl:ObjectProperty .
<dtproperty> rdf:type owl:DatatypeProperty .

OWL DL KBにそのような断言をすべて加えた結果をKBのローカリぜーションと呼びます。

OWL Fullは、予期する含意をサポートし、語彙に対してタイプの情報を提供する必要はありません。例えば、

John friend Susan .

は、以下をOWL Full含意します。

John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:minCardinality "1"^^xsd:nonNegativeInteger .