Jump to content

Wikidata: Enable the class and relation parameters on more constraint types (Community Wishlist/W4/ja)

Long-term opportunity
From Meta, a Wikimedia project coordination wiki
This page is a translated version of the page Community Wishlist/W4 and the translation is 39% complete.

View all wishes.

Description

Problem: Some extremely useful constraints cannot currently be created. Where a workaround is feasible, it results in large, difficult-to-maintain, and often incomplete constraints (examples below).

Proposed solution: Add support for the parameters クラス (P2308) and 関係性 (P2309) to the none-of, item-requires-statement, and conflicts-with constraint types, to specify classes that property values may or may not belong to.

These parameters are already supported by subject-type and value-type constraints.

Or alternately, create three new constraint types with this functionality.

More details: These three constraint types support allowing or disallowing specific property values using プロパティ制約の項目 (P2305), but they do not support allowing or disallowing classes of values.

This leads to 1) the creation of large, difficult-to-maintain, and often incomplete constraints (examples 1-3 below) that attempt to list every applicable property value, and 2) the absence of useful constraints when the values are just too numerous to list (example 4).

The effect of the solution will be to natively enable the three forms of constraint in green in the lower right of this table:

これらのうちの一つのアイテムで以下を使用 ...a member or subclass of these classes, use:
文の値が以下なら 以下であるべき one-of value-type
以下であるべきではない none-of none-of w/class+relation
アイテムの他の文の値が以下なら 以下であるべき item-requires-statement item-requires-statement w/class+relation
以下であるべきではない conflicts-with conflicts-with w/class+relation

  1. This none-of constraint has 33 values of "item of property constraint", which are meant to include all recurring events, but are certainly not exhaustive. Instead, these could all be replaced with クラス (P2308) = 定期行事 (Q15275719), 関係性 (P2309) = 分類または上位クラス (Q30208840), which would be exhaustive. This query gives more constraints that may be candidates for this sort of simplification.
  2. This item-requires-statement constraint has 39 values of "item of property constraint", which are meant to include all filmmaking occupations, but are likely not exhaustive. Instead, these entries could be replaced with クラス (P2308) = 映画製作の役職 (Q4220920), 関係性 (P2309) = 分類 (Q21503252), which would be exhaustive. This query gives more such constraints.
  3. This conflicts-with constraint has 27 values of "item of property constraint", which are meant to include all types of crime, but are likely not exhaustive. Instead, these could all be replaced with クラス (P2308) = 犯罪 (Q83267), 関係性 (P2309) = 上位クラス (Q21514624), which would be exhaustive. This query gives more such constraints.
  4. (new constraint): The value of 分類 (P31) should not be a タクソン (Q16521). (If the item is an 個体 (Q110224119), it should use 以下のタクソンの個体 (P10241); if the item is a taxon, it should use 上位タクソン (P171).) As of writing, 18,080 items violated this rule: (query). Obviously, we can't list all taxons in a constraint. Under the proposal, this rule could be expressed with a none-of constraint on 分類 (P31), with クラス (P2308) = タクソン (Q16521) and 関係性 (P2309) = 分類 (Q21503252).
Assigned focus area

Unassigned

Type of wish
Feature request
Tags
Affected users

ウィキデータ利用者と編集者

Phabricator tasks
Other details
  • Created: 18:32, 15 July 2024
  • Last updated: 15:42, 3 October 2025
  • Author: Swpb (talk)
Voting

This wish currently has 2 supporters. Voting for this wish is open until it is completed.

Supporters of this wish
Support Pppery (talk) 16:52, 10 October 2025
Support Jmabel (talk) 07:02, 5 December 2025