Wikidata:Property proposal/format string

From Wikidata
Jump to navigation Jump to search

format strings[edit]

format string placeholder[edit]

Originally proposed at Wikidata:Property proposal/Generic

   Not done
Descriptiondescribes which placeholder is used by values of this format string property (usually $1, which indicates that $1 has to be replaced)
Data typeString
Domainproperty
Example 1formatter URL (P1630)format string placeholder$1
Example 2DOI formatter (P8404)format string placeholder$1
Example 3URN formatter (P7470)format string placeholder$1

format string produces[edit]

Originally proposed at Wikidata:Property proposal/Generic

   Not done
Descriptiondescribes what a format string of this property produces when interpolated with values
Data typeItem
Domainproperty
Example 1formatter URL (P1630)format string producesURL (Q42253)
Example 2DOI formatter (P8404)format string producesdigital object identifier (Q25670)
Example 3URN formatter (P7470)format string producesURN (Q76497)
Example 4ARK formatter (P8054)format string producesArchival Resource Key (Q2860403)
Example 5road number formatter (P8498)format string producesroad number (Q3241753)
Example 6road name formatter (P8898)format string producesstreet or road name (Q1640962)
Example 7shortened URL formatter (P11136)format string producesshort URL (Q99513765)

Motivation[edit]

We currently have 12 format string properties and that number will go up as time goes on. There are however two problems with our format string properties:

  1. Data consumers cannot reliably detect that a given property is a $1-placeholder-based format string property.
  2. Data consumers cannot reliably infer what the string formatting produces because Wikidata item of this property (P1629) is ambiguous (e.g. road number formatter (P8498) has both road number (Q3241753) and road number prefix (Q1881659) as road number formatter (P8498) values).

So I propose the introduction of a #format string placeholder property to address #1 and the introduction of a #format string produces property to address #2.

Note that #format string produces is very similar to the existing class of non-item property value (P10726) ... however there is an important semantical difference:

whereas

In fact for all of these format string properties, class of non-item property value (P10726)format string (Q3748135) can be stated ... the class produced by the format string can however differ between the properties as shown in the above examples.

--Push-f (talk) 09:30, 16 December 2022 (UTC)[reply]

Discussion[edit]