Wikidata:Property proposal/constraint clarification

From Wikidata
Jump to navigation Jump to search

constraint clarification

[edit]

Originally proposed at Wikidata:Property proposal/Generic

Descriptionqualifier to provide details on the function or purpose of a property constraint
Data typeMonolingual text
Domainproperty namespace: statements for property constraint
Example 1item for this sense (P5137)property constraint (P2302)allowed-entity-types constraint (Q52004125)constraint clarificationadd to sense subentity (English)
Example 2season (P4908)property constraint (P2302)conflicts-with constraint (Q21502838)constraint clarificationuse as qualifier, not directly on items (English)
Example 3Special:WhatLinksHere/Property:P2916&namespace=120
Planned usemigration of statements from syntax clarification (P2916)

Motivation

[edit]

Split from syntax clarification (P2916), which was originally created as a qualifier "primarily" for format as a regular expression (P1793). As far as I can tell, the uses of syntax clarification (P2916) fall into three distinct categories:

  1. Qualification of format as a regular expression (P1793) (its original purpose)
  2. Qualification of property constraints (the purpose for which the new property is proposed; a separate property was previously rejected here)
  3. Qualification of random statements as a multi-purpose free text field (clearly a misuse)

The use of syntax clarification (P2916) for case (2), rather than a separate property, was suggested here by User:Thryduulf and implemented by User:Jura1, but I don't think that's a wise choice. In particular, the property covering case (1) should have property constraint (P2302)item-requires-statement constraint (Q21503247)property (P2306)format as a regular expression (P1793), which does not generally apply to case (2). Case (2) suggests its own constraints. These constraints will dissuade the misuse of either property for case (3). (The original proposal for syntax clarification (P2916) suggested future uses besides case (1), but it is unclear what those might legitimately be besides case (2).) Swpb (talk) 15:35, 14 February 2019 (UTC)[reply]

Discussion

[edit]
@Jura1: I’m not sure what interface you refer to, but as far as I’m aware WikibaseQualityConstraints only uses syntax clarification (P2916) for its original purpose (if defined on a format constraint, it’s used in the violation message). If a new constraint clarification property is added, I’m sure we can also display it on other constraint violations. --Lucas Werkmeister (WMDE) (talk) 14:36, 12 March 2019 (UTC)[reply]
  • Interesting. I don't think there would be cases where syntax of a format constraint needs to be clarified in two different ways. So we could still use P2916 for all constraints. --- Jura 09:19, 16 March 2019 (UTC)[reply]
Well, they’re different things in my opinion – constraint clarifications aren’t really about the syntax. And this has implications for the error message too: the current format constraint violation message uses the syntax clarification as in The value for … should match 6 hexadecimal digits (regex: [0-9A-Fa-f]{6}) – this doesn’t work out well if the clarification is something like “use blah instead”. --Lucas Werkmeister (WMDE) (talk) 11:29, 18 March 2019 (UTC)[reply]
The value for image (335 years war locations.png) should match “Please use P242 (locator map) instead” (regex: [cannot be transcribed]).
I just found an actual example of this on Three Hundred and Thirty Five Years' War (Q1054482) – see the image on the side. The violation message is confusing because a constraint clarification is not something that the value could match or not match. --Lucas Werkmeister (WMDE) (talk) 11:08, 21 March 2019 (UTC)[reply]
Lucas Werkmeister (WMDE)
Jarekt - mostly interested in properties related to Commons
MisterSynergy
John Samuel
Sannita
Yair rand
Jon Harald Søby
Pasleim
Jura
PKM
ChristianKl
Sjoerddebruin
Fralambert
Manu1400
Was a bee
Malore
Ivanhercaz
Peter F. Patel-Schneider
Pizza1016
Ogoorcs
ZI Jony
Eihel
cdo256
Epìdosis
Dhx1
99of9
Mathieu Kappler
Lectrician1
SM5POR
Infrastruktur
Samoasambia

Notified participants of WikiProject property constraints --Lucas Werkmeister (WMDE) (talk) 14:40, 12 March 2019 (UTC)[reply]