Wikidata:Property proposal/syntax clarification
Jump to navigation
Jump to search
syntax clarification[edit]
Description | Qualifier to provide extra details on the syntax of a statement value, in particular for format as a regular expression (P1793). |
---|---|
Represents | syntax (Q37437) |
Data type | Monolingual text |
Domain | Properties with "format as regular expression" property, P1793. |
Allowed values | Any descriptive text |
Example | Yandex Music artist ID (P1553) : format as a regular expression (P1793) → "[1-9]\d{0,6}"
|
- Motivation
Proposed as a result of the deletion discussion of generic property "comment", comment (DEPRECATED) (P2315), this qualifier would be used to replace "comment" for the 240 or so occurrences where it is used as qualifier on format as a regular expression (P1793). It might eventually be expanded to include other cases where some cryptic syntax requires an explanation. LaddΩ chat ;) 21:50, 2 June 2016 (UTC)
- Discussion
- Support seems very useful. Thryduulf (talk: local | en.wp | en.wikt) 10:41, 3 June 2016 (UTC)
- Support it's clear and useful. GAllegre (talk) 13:40, 6 June 2016 (UTC)
- Domain should be any properties with "format as regular expression" property. --Izno (talk) 12:07, 3 June 2016 (UTC)
- Indeed. Corrected. -- LaddΩ chat ;) 15:37, 3 June 2016 (UTC)
- I think this should probably already be "regex clarification" rather than "syntax clarification". The latter has some potential misuse that I'd like to avoid beforehand. --Izno (talk) 13:42, 6 June 2016 (UTC)
- @Izno: IMHO, using this qualifier to clarify the syntax of any other cryptic statement would not be a misuse; I would prefer to allow its use beyond regexes, since it is still pretty specific. -- LaddΩ chat ;) 13:24, 12 June 2016 (UTC)
- @Laddo: But you just agreed to restrict the domain to properties with the "regex" property. :D --Izno (talk) 15:46, 12 June 2016 (UTC)
- @Izno: IMHO, using this qualifier to clarify the syntax of any other cryptic statement would not be a misuse; I would prefer to allow its use beyond regexes, since it is still pretty specific. -- LaddΩ chat ;) 13:24, 12 June 2016 (UTC)
- I think this should probably already be "regex clarification" rather than "syntax clarification". The latter has some potential misuse that I'd like to avoid beforehand. --Izno (talk) 13:42, 6 June 2016 (UTC)
- Indeed. Corrected. -- LaddΩ chat ;) 15:37, 3 June 2016 (UTC)
- Pleading guilty. Either both name and domain restricted to regex, or neither. Let me sleep on it. -- LaddΩ chat ;) 16:47, 12 June 2016 (UTC)
- Oppose This is unstructured data and, more significantly, will fall out of sync with the actual regex (from which it should be computed - see, for example, http://rick.measham.id.au/paste/explain.pl ). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:16, 6 June 2016 (UTC)
- Interesting. I added this address as a "formatter URL" on format as a regular expression (P1793). It's not bad for [1-9]\d{0,6} but it gets unreadable for (ev\d{7}/\d{4})|((tt|nm|ch|co|ev)\d{7}). LaddΩ chat ;) 21:56, 6 June 2016 (UTC)
- That looks like the IMDB URL? --Izno (talk) 02:13, 7 June 2016 (UTC)
- Interesting. I added this address as a "formatter URL" on format as a regular expression (P1793). It's not bad for [1-9]\d{0,6} but it gets unreadable for (ev\d{7}/\d{4})|((tt|nm|ch|co|ev)\d{7}). LaddΩ chat ;) 21:56, 6 June 2016 (UTC)
- I am not convinced we should add syntax explanations to regular expressions. But if we are, I prefer a specialized property over comment (DEPRECATED) (P2315). --Srittau (talk) 00:20, 12 June 2016 (UTC)
- Comment I don't think we should just throw out the old "comment" values, they do seem helpful. If this property isn't supported, maybe those comments should move to the respective discussion pages (perhaps as an additional line in the property documentation template?) ArthurPSmith (talk) 20:32, 16 June 2016 (UTC)
- Support Useful, many people have difficulty understanding regular expressions. Lymantria (talk) 20:45, 18 June 2016 (UTC)
@Laddo, Thryduulf, GAllegre, Lymantria: Done --Srittau (talk) 01:45, 19 June 2016 (UTC)