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 geografia d[aoe]s? .+ P2633
Italian it 6 economia d(ella|ello|elle|egli|el|ei|i|ell|)[ '].+ P8744
Dutch nl 6 geografie van .+|.+geografie P2633
Polish pl 6 geografia .+ P2633
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 .+
topic's main Wikimedia portal (P1151) 2 def violations missing langs Portal:.+
property usage tracking category (P2875) 2 def violations missing langs Category:Pages using Wikidata property P\d+|Category:.+ template using Wikidata
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|[Hh]onorary citizen|[Hh]onorary doctor|[Ll]ecturer|[Ff]ellow|[Aa]cademician|[Ss]portsperson|[Mm]ember|[Mm]edalist|[Mm]edallist|[Ww]ork|[Ww]riter|[Pp]oet|[Cc]oache|[Mm]aster|[Ss]cholar|[Ss]ignatorie|[Hh]eroe|[Cc]ommander|[Kk]night|[Dd]ame|[Cc]hevalier|[Hh]onoree|[Cc]ompanion|[Ff]ilm|[Ii]nductee|[Hh]ero [Cc]itie|[Cc]osmonau|[Cc]hampion|[Oo]rder|[Aa]rtist|[Pp]layer|[Ww]orker|[Ee]mployee|[Pp]laymate|[Cc]andidate|[Hh]older|[Cc]rosse|[Nn]ame|[Ss]ong|Named Reference)s|([Aa]lumn)i|(Sportsmen of the year|Sportswomen of the year).*
list of characters (P1881) 1 def violations missing langs list of .+ characters|list of characters (of|in) .+
bibliography (P8625) 1 def violations missing langs bibliography o[fn] .+|.+ bibliography
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 the view from the item (P8933) 1 def violations missing langs Category:Views from .+
category for pictures taken with this camera (P2033) 1 def violations missing langs Category:(Photos t|T)aken with .+

∑ 21 items.

End of automatically generated list.

By consistency with regex

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 459 5 98.9
Spanish es geografía .+ 604 15 97.5
Finnish fi .+ maantiede 348 13 96.3
English en geography of .+|.+ geography 729 17 97.7
Catalan ca geografia d['e].+ 422 13 96.9
Basque eu [A-Z].+[kg]o geografia 367 9 97.5
Czech cs geografie .+ 473 10 97.9
French fr géographie .+ 643 17 97.4
Italian it geografia d.+ 416 25 94
Polish pl geografia .+ 375 4 98.9
Portuguese pt geografia d[aoe]s? .+ 587 15 97.4
Dutch nl geografie van .+|.+geografie
geografie van (de |het )?.+
1042 19 98.2
Romanian ro geografia .+ 239 9 96.2
British English en-gb geography of .+|.+ geography 35 4 88.6
Swedish sv .+geografi 622 5 99.2
Lithuanian lt [A-Z].+ geografija 231 14 93.9
Nynorsk nn .+sk geografi|geografien til.+|.+ sin geografi 75 5 93.3
Canadian English en-ca geography of .+|.+ geography 35 4 88.6
End of automatically generated list.

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 .+ 201 0 100
Canadian English en-ca Category:Films shot (in|at) .+ 51 0 100
Brazilian Portuguese pt-br Categoria:Filmes gravados (na|em|no|nos) .+ 49 0 100
French fr Catégorie:Film tourné .+ 986 2 99.8
Polish pl Kategoria:Filmy kręcone .+ 800 2 99.8
Spanish es Categoría:Películas rodadas .+ 271 2 99.3
English en Category:Films shot (in|at) .+ 1218 2 99.8
Portuguese pt Categoria:Filmes gravados .+ 317 2 99.4
Swedish sv Kategori:Filmer inspelade (i|på) .+ 473 3 99.4
End of automatically generated list.

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 .+ 98 93 5.1
English en Category:Interior of .+ 21206 853 96
End of automatically generated list.

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.+ 920 84 90.9
English en list of .+ episodes 4426 77 98.3
Portuguese pt lista de episódios d[aeo] .+ 785 35 95.5
Catalan ca llista d'episodis d.+ 377 50 86.7
British English en-gb list of .+ episodes 120 91 24.2
Canadian English en-ca list of .+ episodes 111 74 33.3
End of automatically generated list.

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 .+ 61 30 50.8
French fr discographie d.+ 11040 117 98.9
Italian it discografia d.+|catalogo .+ 5260 86 98.4
Polish pl dyskografia .+ 1633 68 95.8
Spanish es discografía d.+ 9759 538 94.5
English en .+ discography|.+ catalog|discography of .+ 14418 123 99.1
Portuguese pt discografia d.+ 2223 130 94.2
End of automatically generated list.

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').+ 1798 421 76.6
German de Filmogra(f|ph)ie von .+|.+ Filmogra(f|ph)ie 728 562 22.8
Spanish es filmografía de .+ 2130 926 56.5
Finnish fi .+ filmografia 322 113 64.9
English en filmography of .+|.+ filmography|.+ in film 2842 1424 49.9
Catalan ca filmografia d.+ 190 130 31.6
Danish da .+[- ]filmografi 514 117 77.2
Czech cs filmografie .+ 112 95 15.2
Turkish tr .+ filmografisi 186 93 50
Italian it filmografia .+ 526 234 55.5
Portuguese pt filmografia d.+ 393 229 41.7
Dutch nl filmografie .+|.+ filmografie
filmografie van (de |het )?.+
718 691 3.8
Romanian ro filmografia .+ 133 75 43.6
Swedish sv .+ filmografi 247 128 48.2
Slovak sk filmografia .+ 30 29 3.3
Hungarian hu .+ filmográfiája|.+[- ]filmográfia 184 147 20.1
Bokmål nb .+[- ]filmografi 137 92 32.8
Brazilian Portuguese pt-br filmografia d.+ 66 62 6.1
End of automatically generated list.

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 232 10 95.7
Polish pl gospodarka .+ 325 14 95.7
Portuguese pt economia d(os|as|e|o|a) .+ 411 10 97.6
Russian ru экономика .+ 467 24 94.9
Romanian ro economia .+ 178 7 96.1
Ukrainian uk економіка .+ 225 19 91.6
Swedish sv .* ekonomi 235 9 96.2
Slovak sk ekonomika .+ 111 10 91
Slovene sl gospodarstvo .+ 435 12 97.2
Occitan oc economia .+ 203 5 97.5
French fr économie d(u |es |e l'|e la |e |').+ 571 12 97.9
Italian it economia d(ella|ello|elle|egli|el|ei|i|ell|)[ '].+ 263 11 95.8
Finnish fi .+ talous 215 8 96.3
Japanese ja .+の経済 314 8 97.5
Dutch nl economie van (de |het )?.+ 1190 10 99.2
Hungarian hu .+ gazdasága 102 9 91.2
Lithuanian lt .+ ekonomika 80 5 93.8
Malay ms ekonomi .+ 138 29 79
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 205 159 22.4
Esperanto eo ekonomio de .+ 412 10 97.6
German de Wirtschaft .+ 232 14 94
Spanish es economía de(l| las| la)? .+ 571 11 98.1
English en economy of (the )?.+ 1397 23 98.4
Catalan ca economia d.+ 311 8 97.4
Basque eu .+ ekonomia 141 8 94.3
Danish da .+ økonomi|økonomi .+ 76 6 92.1
Czech cs ekonomika .+|.+ ekonomika 200 9 95.5
Estonian et .+ majandus 39 8 79.5
Azerbaijani az .+ iqtisadiyyatı 93 8 91.4
Welsh cy economi('r)? .+ 84 6 92.9
End of automatically generated list.

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/.+ 9616 10 99.9
Swedish sv Wikipedia:KML/.+ 461 1 99.8
Czech cs Šablona:Mapa souřadnic/.+ 1056 1 99.9
End of automatically generated list.