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!

lang ?lang ?count sample
regex
sample
prop
English en 22 bibliography o[fn] .+|.+ bibliography P8625
French fr 10 économie d(u |es |e l'|e la |e |').+ P8744
Spanish es 7 economía de(l| las| la)? .+ P8744
Portuguese pt 7 economia d(os|as|e|o|a) .+ P8744
Italian it 6 economia d(ella|ello|elle|egli|el|ei|i|ell|)[ '].+ P8744
Dutch nl 6 economie van (de |het )?.+ P8744
Polish pl 6 gospodarka .+ P8744
Swedish sv 6 .* ekonomi P8744
Catalan ca 5 economia d.+ P8744
Czech cs 5 ekonomika .+|.+ ekonomika P8744
German de 5 Wirtschaft .+ P8744
Romanian ro 5 economia .+ P8744
Canadian English en-ca 3 Category:Films shot (in|at) .+ P1740
Esperanto eo 3 ekonomio de .+ P8744
Finnish fi 3 .+ talous P8744
Hungarian hu 3 .+ gazdasága P8744
Lithuanian lt 3 .+ ekonomika P8744
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 .+ ekonomia P8744
Galician gl 2 economía d.+ P8744
Bokmål nb 2 .+ økonomi P8744
Nynorsk nn 2 .+ økonomi|økonomien til.+ P8744
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!

Property Patterns Link Violations Missing langs Sample pattern (English)
economy of topic (P8744) 35 def violations missing langs economy of (the )?.+
geography of topic (P2633) 19 def violations missing langs geography of .+|.+ geography
filmography (P1283) 19 def violations missing langs filmography of .+|.+ filmography|.+ in film
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:.+
list of characters (P1881) 1 def violations missing langs list of .+ characters|list of characters (of|in) .+
category for pictures taken with this camera (P2033) 1 def violations missing langs Category:(Photos t|T)aken with .+
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) .+
bibliography (P8625) 1 def violations missing langs bibliography o[fn] .+|.+ bibliography
category for recipients of this award (P2517) 1 def violations missing langs Category:.*([Ww]inner|[Ll]aureate|[Rr]ecipient|[Hh]onorary [Cc]itizen|[Ii]llustrious [Cc]itizen|[Hh]onorary [Dd]octor|[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|[Aa]ppointee|[Gg]rand [Cc]rosse|[Gg]rand [Oo]fficer|[Cc]ommander|[Oo]fficer|[Kk]night|[Dd]ame|[Mm]edal|[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).*
history of topic (P2184) 1 def violations missing langs (history|timeline|chronology) of .+|.+ history
category for films in this language (P5996) 1 def violations missing langs Category:.+-language films
category for the view of the item (P8989) 1 def violations missing langs Category:Views of .+
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

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

lang ?lang regex labels ≠regex % regex
French fr géographie .+ 643 18 97.2
Finnish fi .+ maantiede 346 12 96.5
English en geography of .+|.+ geography 728 17 97.7
Dutch nl geografie van .+|.+geografie
geografie van (de |het )?.+
1042 21 98
Romanian ro geografia .+ 238 8 96.6
Basque eu [A-Z].+[kg]o geografia 366 8 97.8
Esperanto eo geografio de .+|.+ geografio 459 4 99.1
Italian it geografia d.+ 416 25 94
Polish pl geografia .+ 374 3 99.2
Spanish es geografía .+ 605 16 97.4
Portuguese pt geografia d[aoe]s? .+ 587 15 97.4
Catalan ca geografia d['e].+ 426 14 96.7
British English en-gb geography of .+|.+ geography 34 3 91.2
Swedish sv .+geografi 621 4 99.4
Czech cs geografie .+ 472 9 98.1
Lithuanian lt [A-Z].+ geografija 231 14 93.9
Nynorsk nn .+sk geografi|geografien til.+|.+ sin geografi 74 4 94.6
Canadian English en-ca geography of .+|.+ geography 33 2 93.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!

lang ?lang regex labels ≠regex % regex
Italian it Categoria:Film girati .+ 204 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é .+ 1008 3 99.7
Polish pl Kategoria:Filmy kręcone .+ 806 2 99.8
Spanish es Categoría:Películas rodadas .+ 278 3 98.9
English en Category:Films shot (in|at) .+ 1191 3 99.7
Portuguese pt Categoria:Filmes gravados .+ 319 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!

lang ?lang regex labels ≠regex % regex
French fr Category:Intérieur de .+ 97 94 3.1
English en Category:Interior of .+ 21477 1122 94.8
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!

lang ?lang regex labels ≠regex % regex
French fr liste des épisodes d.+ 922 83 91
English en list of .+ episodes 4459 93 97.9
Portuguese pt lista de episódios d[aeo] .+ 792 41 94.8
Catalan ca llista d'episodis d.+ 417 62 85.1
British English en-gb list of .+ episodes 121 92 24
Canadian English en-ca list of .+ episodes 112 75 33
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!

lang ?lang regex labels ≠regex % regex
Esperanto eo diskaro de .+ 59 24 59.3
French fr discographie d.+ 11055 74 99.3
Italian it discografia d.+|catalogo .+ 5335 69 98.7
Polish pl dyskografia .+ 1632 62 96.2
Spanish es discografía d.+ 9725 573 94.1
English en .+ discography|.+ catalog|discography of .+ 14790 70 99.5
Portuguese pt discografia d.+ 2221 127 94.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!

lang ?lang regex labels ≠regex % regex
Turkish tr .+ filmografisi 208 114 45.2
Italian it filmografia .+ 565 272 51.9
Spanish es filmografía de .+ 2189 988 54.9
Portuguese pt filmografia d.+ 436 272 37.6
Catalan ca filmografia d.+ 233 165 29.2
Swedish sv .+ filmografi 278 158 43.2
Danish da .+[- ]filmografi 536 139 74.1
Czech cs filmografie .+ 132 115 12.9
Bokmål nb .+[- ]filmografi 157 112 28.7
Brazilian Portuguese pt-br filmografia d.+ 83 79 4.8
French fr filmographie (du |de |des |d').+ 1861 483 74
German de Filmogra(f|ph)ie von .+|.+ Filmogra(f|ph)ie 781 614 21.4
Finnish fi .+ filmografia 345 136 60.6
English en filmography of .+|.+ filmography|.+ in film 3007 1564 48
Dutch nl filmografie .+|.+ filmografie
filmografie van (de |het )?.+
814 787 3.3
Romanian ro filmografia .+ 151 93 38.4
Slovak sk filmografia .+ 50 49 2
Hungarian hu .+ filmográfiája|.+[- ]filmográfia 214 177 17.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!

lang ?lang regex labels ≠regex % regex
English en economy of (the )?.+ 1395 25 98.2
Romanian ro economia .+ 179 8 95.5
Turkish tr .+ ekonomisi|.+[td][ae] ekonomi 235 11 95.3
Polish pl gospodarka .+ 326 15 95.4
Catalan ca economia d.+ 323 8 97.5
Czech cs ekonomika .+|.+ ekonomika 201 10 95
Slovene sl gospodarstvo .+ 480 12 97.5
Lithuanian lt .+ ekonomika 80 5 93.8
Malay ms ekonomi .+ 139 29 79.1
Indonesian id ekonomi .+ 170 26 84.7
Galician gl economía d.+ 216 8 96.3
Occitan oc economia .+ 203 5 97.5
Nynorsk nn .+ økonomi|økonomien til.+ 95 16 83.2
Bokmål nb .+ økonomi 205 159 22.4
Italian it economia d(ella|ello|elle|egli|el|ei|i|ell|)[ '].+ 265 12 95.5
Spanish es economía de(l| las| la)? .+ 571 11 98.1
Japanese ja .+の経済 315 8 97.5
Ukrainian uk економіка .+ 226 20 91.2
Swedish sv .* ekonomi 237 9 96.2
Danish da .+ økonomi|økonomi .+ 76 6 92.1
Estonian et .+ majandus 40 8 80
Azerbaijani az .+ iqtisadiyyatı 94 8 91.5
Welsh cy economi('r)? .+ 84 6 92.9
Afrikaans af ekonomie van .+ 47 6 87.2
Asturian ast economía d.+ 146 5 96.6
Esperanto eo ekonomio de .+ 415 10 97.6
French fr économie d(u |es |e l'|e la |e |').+ 573 12 97.9
German de Wirtschaft .+ 235 14 94
Finnish fi .+ talous 214 8 96.3
Portuguese pt economia d(os|as|e|o|a) .+ 412 10 97.6
Dutch nl economie van (de |het )?.+ 1189 11 99.1
Russian ru экономика .+ 473 27 94.3
Basque eu .+ ekonomia 141 8 94.3
Slovak sk ekonomika .+ 112 11 90.2
Hungarian hu .+ gazdasága 102 9 91.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!

lang ?lang regex labels ≠regex % regex
English en Template:Attached KML/.+ 9614 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.