0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【owlready2】(12) 構成要素(constructs)、制約(restrictions)、そしてクラスのプロパティ

0
Posted at

4. 構成要素(constructs)、制約(restrictions)、そしてクラスのプロパティ

3章ではクラスやプロパティの生成方法を示した。例えば、

with onto:
  class A(Thing): pass
  class p(A >> B): pass

といったことであるが、どの例も内容についてはpassとして定義していない。定義するためには、中身を記述する方法をしめすひつようがある。つまりエンティティの構成要素の書き方を本章で示す。

ウェブオントロジー言語OWLにおいてconstructは構成要素、もしくは論理的な構成要素を意味し、constructorは論理的な構成子、記述子のことである。

construct(s)を構成要素ととらえれば、

クラス(Class):概念やカテゴリを表す。例:Person, Animalなど
個体(Individual):具体的な実体。例:Taro, Dog123など
プロパティ(Property):
  ObjectProperty:個体間の関係(例:hasParent)
  DatatypeProperty:個体とデータ値の関係(例:hasAge)
制約(Restrictions):プロパティの使用条件を定義(例:あるクラスのメンバーは必ず1つの親を持つ)
論理演算子(Logical Constructors):
  owl:intersectionOf(共通部分)
  owl:unionOf(和集合)
  owl:complementOf(補集合)
  owl:equivalentClass(同値クラス)
  owl:disjointWith(互いに排他的なクラス)

のこととなる。この時点で、既にオブジェクト指向のconstructorとは違う。インスタンス生成子ではないのだ。

特に、OWLにおいてconstructorというと、それは記述論理(Description Logic)に基づく概念の構成方法を指す。これは、クラスやプロパティを``論理的''に組み合わせたり制約を加えたりするための論理的な構成子(logical constructors)なのだ。

logical_constructor.png
図 論理的な構成子(logical constructor)

restrictionという語も注意がいるかもしれない。制約というが、論理プログラミングと関連する分野として制約充足ということばがある。これはconstraint satisfactionである。また一般にも制約はconstraintであろう。記述論理ではrestrictionといい、OWLでもrestrictionという。owl:restrictionという語彙とも関連するのだが、ここでの制約restrictionとはプロパティ制約のことで、存在制約(存在量化)、全称制約(全称量化)、値制約、基数制約のことである。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?