Wikidata:Property proposal/regex (lang)
Jump to navigation
Jump to search
format as language specific regular expression
[edit]Originally proposed at Wikidata:Property proposal/Generic
Description | regex describing a string in a given language. Use the language code to define which language it applies to. |
---|---|
Data type | Monolingual text |
Example 1 | see discussion |
Example 2 | Property:P8744#P8744$c6240499-46be-e807-6f1f-53689b0801b0 → economy of (the )?.* @en |
Example 3 | Property:P8744#P8744$c6240499-46be-e807-6f1f-53689b0801b0 → economie van .* @nl |
Example 4 | Property:P8625#P8625$4c5ceaa5-4728-008f-8c47-6de984a1c2df → bibliography of .+|.+ bibliography @en |
Example 5 | Property:P2184#P2184$df861cc1-453b-3c52-ce11-8c1f2efa716c → history of .+|timeline of .+|.+ history @en |
Example 6 | Property:P2633#P2633$1db7d103-494f-125e-351e-3c48373e95d3 → .+ geografi @sv |
Planned use | use for Help:Property constraints portal/Value label, change its P1450-qualifier to this |
See also | format as a regular expression (P1793) |
Motivation
[edit]To check language specific strings, it could be helpful to define language specific regexes. The uses at Property:P8744#P1552 can be an application (Add your motivation for this property here.) --- Jura 08:06, 26 October 2020 (UTC)
Discussion
[edit]- Support Arlo Barnes (talk) 22:36, 2 November 2020 (UTC)
- Support Pmt (talk) 22:54, 2 November 2020 (UTC)
- Comment What would this property constrain? The examples above constrain item-typed properties, implying that the proposed property would constrain the label of the item referred to by the claim's value. But labels can be idiosyncratic for various reasons. In some domains, the official name (P1448) or inscription (P1684) would be expected to be consistent enough to constrain, but not necessarily the label. If I'm not mistaken, format as a regular expression (P1793) is more straightforward because it's only used on text-typed properties. Besides, Property:P8744#P1552 would be better expressed by a "value must be an instance of" property. – Minh Nguyễn 💬 07:45, 5 November 2020 (UTC)
- It's just a property that describes a pattern. In the samples above that is that of complex constraint value label (Q100884525). "value must be an instance of" isn't sufficient as labels tend to have various issues, see Help:Property_constraints_portal/Value_label#Possible_actions. --- Jura 07:51, 5 November 2020 (UTC)
- @Jura1: OK, thanks for the explanation. In any event, we should decouple this proposal from Wikidata:Property proposal/road name formatter. It may be useful to define a per-network constraint on road number (P1824), but it wouldn't be multilingual and the regex would need to be defined on the network item somehow, not on any property. – Minh Nguyễn 💬 08:29, 5 November 2020 (UTC)
- It's just a property that describes a pattern. In the samples above that is that of complex constraint value label (Q100884525). "value must be an instance of" isn't sufficient as labels tend to have various issues, see Help:Property_constraints_portal/Value_label#Possible_actions. --- Jura 07:51, 5 November 2020 (UTC)
- Done by Epidosis. Thanks for your help/support. --- Jura 08:45, 6 November 2020 (UTC)