Help:プロパティ制約/固有値

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Help:Property constraints portal/Unique value and the translation is 81% complete.

distinct-values constraint (Q21502410)は、このプロパティに対する値がウィキデータ全体にわたって一意であり、いかなる他のエンティティもこのプロパティに対する文において同じ値を持つべきではないと規定します。

ISBN-13 (P212)Freebase ID (P646)のようにエンティティを一意に識別すべきなので、ほとんどすべての(外部)識別子プロパティはこのような制約を持ちます。他の例としてflag (P163)anthem (P85)があります。カテゴリは典型的には一意なコモンズのサイトリンクを持つので、Commons category (P373)も一意であるべきです。

この制約を持つプロパティは、通常single-value constraint (Q19474404)も持ちます。

constraint scope (P4680)が指定されていない場合、この制約は文の主値においてのみチェックされます。

separator (P4155)として修飾子を定義することができます。これにより分離修飾子が異なっている限りは、同じ値を複数のエンティティで使うことができるようになります。

可能なアクション

この制約の違反に対処する方法はいくつかあります。

  • 競合している項目は重複であり、統合すべきである可能性があります。
  • プロパティの値が競合している項目の一方で間違っており(例えば、誤字やうっかり数字を置き換えてしまった場合など)、修正すべきである可能性があります。
  • その制約に対してseparator (P4155)を(場合によっては複数)定義して、特定の異なる修飾子を持つ限りは複数の項目が値を共有することを容認できると宣言すべきである可能性があります。
  • 競合している項目には稀ではありますが、制約に対する正当な例外である可能性があります。その場合には何もするべきではありません。

パラメータ

この制約には1つのオプションパラメータがあります。

separator (P4155):分離子(セパレーター)を含めます。ひとつまたは複数のプロパティを含めることができます。指定されている場合には、ここで指定したプロパティに対する異なる修飾子を持つ限りは、同じ値を複数の文が持っていてもこの制約の違反とはなりません。

property constraint
Normal rank distinct-values constraint
0 references
add reference


add value

テンプレート

プロパティに制約が設定されると、以下のテンプレートが自動でプロパティの議論ページに表示されます。このテンプレートは Template:Property documentation から呼び出された Template:Constraint を用いて Module:Constraints が作成します。翻訳の定義はModule:i18n/constraints をご参照ください。

Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P236#Unique value, SPARQL (every item), SPARQL (by value)

例外

Cases where uniqueness should or could be evaluated differently and ways to handle such exceptions:

  • プロパティ制約についての例外を挙げる: available [1]
  • 識別子が他の項目と共有されていることを明示する: not available [2]
  • 識別子が再割り当てされたことを明示する: not available $separator
  • distinct best value constraint: not available [3]
  • distinct case insensitive: not available, handling attempted by normalizing values [4]
  • distinct value including uses in references: available [5]
  • define uniqueness per namespace: not available [6]
  • define uniqueness per entity type (e.g. lexeme and item): not available

一覧

固有値制約が設定されているプロパティの一覧。

注釈