Help:Property constraints portal/Value label
This is the documentation page for a particular constraint type. See Help:Property constraints portal for a general overview of property constraints. |
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 |
| ||||||||||||
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
∑ 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
∑ 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
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
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
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
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
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
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
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
End of automatically generated list.
|