Help:Property constraints portal/Value label

From Wikidata
Jump to navigation Jump to search

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
Normal rank 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 .+
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
category for the view of the item (P8989) 1 def violations missing langs Category:Views of .+
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)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) .+
history of topic (P2184) 1 def violations missing langs (history|timeline|chronology) of .+|.+ history
bibliography (P8625) 1 def violations missing langs bibliography o[fn] .+|.+ bibliography
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 this camera (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]

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 457 4 99.1
Spanish es geografía .+ 602 13 97.8
Finnish fi .+ maantiede 347 12 96.5
English en geography of .+|.+ geography 727 15 97.9
Catalan ca geografia d['e].+ 421 12 97.1
Basque eu [A-Z].+[kg]o geografia 366 8 97.8
Czech cs geografie .+ 472 10 97.9
French fr géographie .+ 641 15 97.7
Italian it geografia d.+ 414 23 94.4
Polish pl geografia .+ 374 3 99.2
Portuguese pt geografia d[aoe]s? .+ 586 14 97.6
Dutch nl geografie van .+|.+geografie
geografie van (de |het )?.+
1040 17 98.4
Romanian ro geografia .+ 238 8 96.6
British English en-gb geography of .+|.+ geography 34 3 91.2
Swedish sv .+geografi 621 4 99.4
Lithuanian lt [A-Z].+ geografija 230 13 94.3
Nynorsk nn .+sk geografi|geografien til.+|.+ sin geografi 74 4 94.6
Canadian English en-ca geography of .+|.+ geography 34 3 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!

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 .+ 799 2 99.7
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 .+ 316 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 .+ 92 87 5.4
English en Category:Interior of .+ 21193 847 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.+ 917 84 90.8
English en list of .+ episodes 4424 76 98.3
Portuguese pt lista de episódios d[aeo] .+ 784 33 95.8
Catalan ca llista d'episodis d.+ 369 47 87.3
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 .+ 62 31 50
French fr discographie d.+ 11039 118 98.9
Italian it discografia d.+|catalogo .+ 5255 87 98.3
Polish pl dyskografia .+ 1634 69 95.8
Spanish es discografía d.+ 9760 539 94.5
English en .+ discography|.+ catalog|discography of .+ 14411 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
Turkish tr .+ filmografisi 186 93 50
Italian it filmografia .+ 525 234 55.4
Portuguese pt filmografia d.+ 393 229 41.7
Dutch nl filmografie .+|.+ filmografie
filmografie van (de |het )?.+
698 671 3.9
Romanian ro filmografia .+ 131 73 44.3
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
French fr filmographie (du |de |des |d').+ 1796 420 76.6
German de Filmogra(f|ph)ie von .+|.+ Filmogra(f|ph)ie 714 548 23.2
Spanish es filmografía de .+ 2130 926 56.5
Finnish fi .+ filmografia 321 112 65.1
English en filmography of .+|.+ filmography|.+ in film 2839 1424 49.8
Catalan ca filmografia d.+ 186 127 31.7
Danish da .+[- ]filmografi 514 117 77.2
Czech cs filmografie .+ 111 95 14.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
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 экономика .+ 456 24 94.7
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 .+ 426 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 .+の経済 313 8 97.4
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 .+ 411 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 )?.+ 1396 21 98.5
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 199 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.