Help:Property constraints portal/Value label

complex constraint value label (Q100884525) specifies that the labels of items used as values for a property should conform to a certain pattern in a given language.

It can be suitable for properties with item-datatype that have a distinct value constraint. It is different from format constraint applicable to string-datatype properties.

For example, the English label of values for category for the interior of the item (P7561) would generally start with the string "Category:Interior of ". This can be written with the regular expression Category:Interior of .+ and the language code en.

Contrary to standard property constraints, this constraint is added with has characteristic (P1552) on properties. As a complex constraint, it also requires the addition of {{Complex constraint}} to the property talk page.

The output is available only as a periodically updated report at Wikidata:Database_reports/Complex_constraint_violations.

Possible actions edit

The main report for the constraint violations allows top-down analysis and the correction of minor or systematic errors. It generally doesn't aim to achieve zero constraint violations. Sample corrections can be:

  • fix uppercase/lowercase errors on items: e.g. items for the history of topic shouldn't be labelled "History of <topic>", but "history of <topic>". This is an initial cleanup generally needed for labels based on Wikipedia article titles.
  • fix typos: e.g. ensure "geography" isn't spelled "gegography"
  • It's possible that the label of another language was incorrectly added to the language being checked: e.g. the French label shouldn't use the English label. This can happen through manual or bot edits
  • It's possible that the label incorrectly includes "Category:"
  • It's possible that the label misses "Category:"

Also:

  • It’s possible that the value is correct, but does not belong to this property, and that it should be moved to a statement for a different property: e.g. "Category:Films set in <place>" is added instead of "Category:Films shot in <place>".
  • It’s possible that the property has expanded its field and the regex needs to be adapted.

A second report lists languages that have labels for the values, but no regular expression defined.

Parameters edit

This constraint has one mandatory and one optional parameter:

format as language specific regular expression (P8770)
Contains the format/pattern and the language code. It can contain one or several values for a given language. no value Help or unknown value Help are not permitted. It must be a valid regular expression.
syntax clarification (P2916)
Contains a human-readable description of the pattern. Can be specified several times in different languages.


Examples edit

Example 1 edit

The labels of the values for category for the interior of the item (P7561) should start with Category:Interior of .+.

has characteristic
  complex constraint value label
format as language specific regular expression Category:Interior of .+ (English)
0 references
add reference


add value

Template edit

To define the constraint, {{Complex constraint}} with a SPARQL query needs to be added to the property's talk page.

This can be done by adding:
{{subst:Define value label constraint}}

Lists edit

Statistics edit

By language edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang ?count sample
regex
sample
prop
English en 22 bibliography o[fn] .+|.+ bibliography P8625
French fr 10 géographie .+ P2633
Spanish es 7 geografía .+ P2633
Portuguese pt 7 demografia d(os|as|e|o|a) .+ P9241
Italian it 6 economia d(ella|ello|elle|egli|el|ei|i|ell|)[ '].+ P8744
Dutch nl 6 geografie van .+|.+geografie P2633
Polish pl 6 demografia .+ P9241
Swedish sv 6 .+geografi P2633
Catalan ca 5 economia d.+ P8744
Czech cs 5 ekonomika .+|.+ ekonomika P8744
German de 5 Wirtschaft .+ P8744
Romanian ro 5 geografia .+ P2633
Canadian English en-ca 3 list of .+ episodes P1811
Esperanto eo 3 geografio de .+|.+ geografio P2633
Finnish fi 3 .+ maantiede P2633
Hungarian hu 3 .+ gazdasága P8744
Lithuanian lt 3 [A-Z].+ geografija P2633
Brazilian Portuguese pt-br 3 demografia d(os|as|e|o|a) .+ P9241
Afrikaans af 2 ekonomie van .+ P8744
Welsh cy 2 economi('r)? .+ P8744
Danish da 2 .+ økonomi|økonomi .+ P8744
British English en-gb 2 list of .+ episodes P1811
Estonian et 2 .+ majandus P8744
Basque eu 2 [A-Z].+[kg]o geografia P2633
Galician gl 2 economía d.+ P8744
Bokmål nb 2 .+ økonomi P8744
Nynorsk nn 2 .+sk geografi|geografien til.+|.+ sin geografi P2633
Russian ru 2 экономика .+ P8744
Slovak sk 2 ekonomika .+ P8744
Slovene sl 2 gospodarstvo .+ P8744
Turkish tr 2 .+ ekonomisi|.+[td][ae] ekonomi P8744
Ukrainian uk 2 економіка .+ P8744
Asturian ast 1 economía d.+ P8744
Azerbaijani az 1 .+ iqtisadiyyatı P8744
Bavarian bar 1 Kategorie:Ehrenbürger P10280
Belarusian be 1 Катэгорыя:Ганаровыя грамадзяне .+ P10280
Taraškievica be-tarask 1 Катэгорыя:Ганаровыя грамадзяне .+ P10280
Bulgarian bg 1 Категория:Почетни граждани .+ P10280
Chechen ce 1 Категори:.+ сийлахь гражданаш P10280
Indonesian id 1 ekonomi .+ P8744
Japanese ja 1 .+の経済 P8744
Kazakh kk 1 Санат:.+ құрметті азаматтары P10280
Mongolian mn 1 Ангилал:.+ хүндэт иргэн P10280
Malay ms 1 ekonomi .+ P8744
Occitan oc 1 economia .+ P8744
Tatar tt 1 Төркем:.+ шәрәфле ватандашлары P10280

∑ 46 items.

End of automatically generated list.

By property edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
Property Patterns Link Violations Missing langs Sample pattern (English)
economy of topic (P8744) 35 def violations missing langs economy of (the )?.+
filmography (P1283) 19 def violations missing langs filmography of .+|.+ filmography|.+ in film
geography of topic (P2633) 19 def violations missing langs geography of .+|.+ geography
demographics of topic (P9241) 14 def violations missing langs demographics of .+
category for films shot at this location (P1740) 9 def violations missing langs Category:Films shot (in|at) .+
discography (P358) 7 def violations missing langs .+ discography|.+ catalog|discography of .+
list of episodes (P1811) 6 def violations missing langs list of .+ episodes
hardiness of plant (P8193) 3 def violations missing langs 1?\d[ab]?
KML file (P3096) 3 def violations missing langs Template:Attached KML/.+
category for the interior of the item (P7561) 2 def violations missing langs Category:Interior of .+
property usage tracking category (P2875) 2 def violations missing langs Category:Pages using Wikidata property P\d+|Category:.+ template using Wikidata
topic's main Wikimedia portal (P1151) 2 def violations missing langs Portal:.+
category for films in this language (P5996) 1 def violations missing langs Category:.+-language films
history of topic (P2184) 1 def violations missing langs (history|timeline|chronology) of .+|.+ history
category for recipients of this award (P2517) 1 def violations missing langs Category:.*([Ww]inner|[Ll]aureate|[Rr]ecipient)s.*
bibliography (P8625) 1 def violations missing langs bibliography o[fn] .+|.+ bibliography
list of characters (P1881) 1 def violations missing langs list of .+ characters|list of characters (of|in) .+
category for the view of the item (P8989) 1 def violations missing langs Category:Views of .+
content partnership category (P8464) 1 def violations missing langs Category:(Contributions|Media|Images|Books|Photographs|Photos|Files|Documents|Content donations) (contributed by|donated by|owned by|from|provided by|by) .+
category for pictures taken with equipment (P2033) 1 def violations missing langs Category:(Photos t|T)aken with .+
category for the view from the item (P8933) 1 def violations missing langs Category:Views from .+

∑ 21 items.

End of automatically generated list.

By consistency with regex edit

geography of topic (P2633) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
Esperanto eo geografio de .+|.+ geografio 455 5 98.9
Spanish es geografía .+ 599 14 97.7
Finnish fi .+ maantiede 344 13 96.2
English en geography of .+|.+ geography 723 13 98.2
Catalan ca geografia d['e].+ 416 13 96.9
Basque eu [A-Z].+[kg]o geografia 364 8 97.8
Czech cs geografie .+ 469 10 97.9
French fr géographie .+ 637 13 98
Italian it geografia d.+ 413 23 94.4
Polish pl geografia .+ 373 4 98.9
Portuguese pt geografia d[aoe]s? .+ 584 15 97.4
Dutch nl geografie van .+|.+geografie
geografie van (de |het )?.+
1038 19 98.2
Romanian ro geografia .+ 235 8 96.6
British English en-gb geography of .+|.+ geography 34 3 91.2
Swedish sv .+geografi 618 5 99.2
Lithuanian lt [A-Z].+ geografija 228 12 94.7
Nynorsk nn .+sk geografi|geografien til.+|.+ sin geografi 73 3 95.9
Canadian English en-ca geography of .+|.+ geography 34 3 91.2
End of automatically generated list.

category for films shot at this location (P1740) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
Italian it Categoria:Film girati .+ 189 0 100
Canadian English en-ca Category:Films shot (in|at) .+ 50 0 100
Brazilian Portuguese pt-br Categoria:Filmes gravados (na|em|no|nos) .+ 49 0 100
French fr Catégorie:Film tourné .+ 974 1 99.9
Polish pl Kategoria:Filmy kręcone .+ 695 2 99.7
Spanish es Categoría:Películas rodadas .+ 268 1 99.6
English en Category:Films shot (in|at) .+ 1217 2 99.8
Portuguese pt Categoria:Filmes gravados .+ 315 2 99.4
Swedish sv Kategori:Filmer inspelade (i|på) .+ 470 3 99.4
End of automatically generated list.

category for the interior of the item (P7561) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
French fr Category:Intérieur de .+ 89 84 5.6
English en Category:Interior of .+ 21160 795 96.2
End of automatically generated list.

list of episodes (P1811) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
French fr liste des épisodes d.+ 897 75 91.6
English en list of .+ episodes 4407 75 98.3
Portuguese pt lista de episódios d[aeo] .+ 782 41 94.8
Catalan ca llista d'episodis d.+ 350 38 89.1
British English en-gb list of .+ episodes 119 91 23.5
Canadian English en-ca list of .+ episodes 110 74 32.7
End of automatically generated list.

discography (P358) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
Esperanto eo diskaro de .+ 55 26 52.7
French fr discographie d.+ 10980 82 99.3
Italian it discografia d.+|catalogo .+ 5178 67 98.7
Polish pl dyskografia .+ 1622 57 96.5
Spanish es discografía d.+ 9728 508 94.8
English en .+ discography|.+ catalog|discography of .+ 14004 91 99.4
Portuguese pt discografia d.+ 2198 107 95.1
End of automatically generated list.

filmography (P1283) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
French fr filmographie (du |de |des |d').+ 1779 405 77.2
German de Filmogra(f|ph)ie von .+|.+ Filmogra(f|ph)ie 709 543 23.4
Spanish es filmografía de .+ 2143 957 55.3
Finnish fi .+ filmografia 297 112 62.3
English en filmography of .+|.+ filmography|.+ in film 2829 1445 48.9
Catalan ca filmografia d.+ 169 122 27.8
Danish da .+[- ]filmografi 512 115 77.5
Czech cs filmografie .+ 112 96 14.3
Turkish tr .+ filmografisi 182 90 50.5
Italian it filmografia .+ 521 232 55.5
Portuguese pt filmografia d.+ 394 229 41.9
Dutch nl filmografie .+|.+ filmografie
filmografie van (de |het )?.+
690 663 3.9
Romanian ro filmografia .+ 131 73 44.3
Swedish sv .+ filmografi 246 127 48.4
Slovak sk filmografia .+ 30 29 3.3
Hungarian hu .+ filmográfiája|.+[- ]filmográfia 189 152 19.6
Bokmål nb .+[- ]filmografi 137 92 32.8
Brazilian Portuguese pt-br filmografia d.+ 66 62 6.1
End of automatically generated list.

economy of topic (P8744) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
Afrikaans af ekonomie van .+ 47 6 87.2
Asturian ast economía d.+ 146 5 96.6
Turkish tr .+ ekonomisi|.+[td][ae] ekonomi 231 10 95.7
Polish pl gospodarka .+ 321 12 96.3
Portuguese pt economia d(os|as|e|o|a) .+ 410 8 98
Russian ru экономика .+ 443 23 94.8
Romanian ro economia .+ 178 7 96.1
Ukrainian uk економіка .+ 223 17 92.4
Swedish sv .* ekonomi 235 9 96.2
Slovak sk ekonomika .+ 111 10 91
Slovene sl gospodarstvo .+ 274 12 95.6
Occitan oc economia .+ 202 4 98
French fr économie d(u |es |e l'|e la |e |').+ 570 13 97.7
Italian it economia d(ella|ello|elle|egli|el|ei|i|ell|)[ '].+ 262 11 95.8
Finnish fi .+ talous 214 8 96.3
Japanese ja .+の経済 312 8 97.4
Dutch nl economie van (de |het )?.+ 1189 10 99.2
Hungarian hu .+ gazdasága 100 9 91
Lithuanian lt .+ ekonomika 80 5 93.8
Malay ms ekonomi .+ 136 28 79.4
Indonesian id ekonomi .+ 169 26 84.6
Galician gl economía d.+ 211 7 96.7
Nynorsk nn .+ økonomi|økonomien til.+ 94 15 84
Bokmål nb .+ økonomi 206 160 22.3
Esperanto eo ekonomio de .+ 404 9 97.8
German de Wirtschaft .+ 229 14 93.9
Spanish es economía de(l| las| la)? .+ 569 10 98.2
English en economy of (the )?.+ 1391 18 98.7
Catalan ca economia d.+ 310 8 97.4
Basque eu .+ ekonomia 141 8 94.3
Danish da .+ økonomi|økonomi .+ 77 7 90.9
Czech cs ekonomika .+|.+ ekonomika 199 9 95.5
Estonian et .+ majandus 38 7 81.6
Azerbaijani az .+ iqtisadiyyatı 93 8 91.4
Welsh cy economi('r)? .+ 84 6 92.9
End of automatically generated list.

KML file (P3096) edit

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | TABernacle | Find images | Recent changes
lang ?lang regex labels ≠regex % regex
English en Template:Attached KML/.+ 9617 10 99.9
Swedish sv Wikipedia:KML/.+ 461 1 99.8
Czech cs Šablona:Mapa souřadnic/.+ 1057 1 99.9
End of automatically generated list.