Wikidata talk:WikiProject property constraints

Latest comment: 6 months ago by Lucas Werkmeister in topic Proposal: remove redundant ^ and $ from format constraints

Interpreting replacement property (P6824) and replacement value (P9729) in the same constraint

edit

1. When a constraint has both replacement property (P6824) and replacement value (P9729), should those be interpreted as applying to the same replacement statement, or two separate statements?

2. What is the right way to make the correct interpretation clear? Two separate constraints whenever two replacement statements are intended? A constraint clarification (P6607) on every constraint that uses both replacement property (P6824) and replacement value (P9729)?

3. Have the answers to 1 and 2 been established by consensus, and written down somewhere?

Examples:

This query should show all constraints that have both replacement property (P6824) and replacement value (P9729). Swpb (talk) 15:21, 1 April 2024 (UTC)Reply

A sense constraint for the parent lexeme

edit

  Notified participants of WikiProject property constraints

The newly created Duden sense ID (P12641) has a subject type constraint. But this is a property for lexeme senses and the constraint is meant to be applied to the associated lexeme. What can be done here?– Shisma (talk) 08:08, 19 April 2024 (UTC)Reply

@Shisma First of all I think this should preferrably be disccussed on [Property̜̙talkːP12641 the talk page corresponding to that property. Unfortunately,I seem to have forgot how to link to such pages,but I hope you can find it anyway.--̃-̃-̃-̃ SM5POR (talk) 15:10, 19 April 2024 (UTC)Reply

Proposal: remove redundant ^ and $ from format constraints

edit

  Notified participants of WikiProject property constraints

A query by dcausse (source) shows that there are some format constraints that are shared between many properties (e.g. [1-9]\d* is currently used 1279 times), and some of these common format constraints use ^ at the start and $ at the end. As far as I’m aware, using these assertions (aka “anchors”) in the format is unnecessary: the format is expected to match the whole value anyway (e.g. WikibaseQualityConstraints wraps the regex in ^$). To reduce the number of different formats we have, and keep the regexes easier to understand, I’d like to mass-change those formats to remove the ^$ where not needed (e.g. turn ^[1-9]\d*$, currently used 162 times, into [1-9]\d*). Does that sound okay to y’all? Lucas Werkmeister (talk) 17:26, 14 June 2024 (UTC)Reply

I put together some code for this and made a first test batch, does that look alright? (If nobody objects, I’ll probably start updating regexes tomorrow or so.) Lucas Werkmeister (talk) 16:08, 16 June 2024 (UTC)Reply
Looks good. Can you mail me a copy of your shell history file? ^.^ Infrastruktur (talk) 18:58, 16 June 2024 (UTC)Reply
…no? Lucas Werkmeister (talk) 20:48, 16 June 2024 (UTC)Reply
(I’m not stupid enough to have put my password into the shell history anyway, but even so I’m very much not amused by an administrator(!) asking me to please compromise my account) Lucas Werkmeister (talk) 21:16, 16 June 2024 (UTC)Reply
I wasn't implying, nor did I think you were unaware of the implications of handling user credentials in this manner. Nor would it necessarily matter that much for a personal script run on a personal computer, but it wouldn't be good practice if it was written for other users - hence my jokingly remark. Infrastruktur (talk) 22:48, 16 June 2024 (UTC)Reply
First real batch is now running: toolforge:editgroups/b/CB/aa10a6856bed Lucas Werkmeister (talk) 18:25, 17 June 2024 (UTC)Reply
And already completed. Lucas Werkmeister (talk) 18:27, 17 June 2024 (UTC)Reply
Second real batch (probably the largest one) is now running: toolforge:editgroups/b/CB/29f961a13362 Lucas Werkmeister (talk) 18:53, 18 June 2024 (UTC)Reply
And done. Lucas Werkmeister (talk) 18:59, 18 June 2024 (UTC)Reply
Return to the project page "WikiProject property constraints".