Property talk:P1921

From Wikidata
Jump to navigation Jump to search

Documentation

formatter URI for RDF resource
formatter URL for RDF resource: URI template from which "$1" can be automatically replaced with the effective property value on items (it is the URI of the resources, not the URI of the RDF file describing it)
Associated item
Data typeString
Domain
According to statements in the property:
Wikidata property for an identifier (Q19847637) and Wikidata property for authority control (Q18614948)
When possible, data should only be stored as statements
Allowed valueshttps?://[\wè\d\-\.,/\?=&:_%+#~;!|\[\]\*]*\$1[\w\d\-\.,/\?=&:_%+#~;!|\[\]()]*
ExampleSUDOC authorities ID (P269) → http://www.idref.fr/$1/id
Wikidata property (P1687) → http://www.wikidata.org/entity/$1
Lists
Proposal discussionProperty proposal/Archive/33#P1921
Current uses121
Search for values
[create] Create a translatable help page (preferably in English) for this property to be included here
Type “Wikidata property for an identifier (Q19847637), Wikidata property for authority control (Q18614948): element must contain property “instance of (P31)” with classes “Wikidata property for an identifier (Q19847637), Wikidata property for authority control (Q18614948)” or their subclasses (defined using subclass of (P279)). (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1921#Type Q19847637, Q18614948, SPARQL, SPARQL (new)
Format “https?://[\wè\d\-\.,/\?=&:_%+#~;!|\[\]\*]*\$1[\w\d\-\.,/\?=&:_%+#~;!|\[\]()]*”: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1921#Format, SPARQL, SPARQL (new)
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1921#Unique value, SPARQL (every item), SPARQL (by value), SPARQL (new)
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1921#Single value, SPARQL, SPARQL (new)
Item “formatter URL (P1630): Items with this property should also have “formatter URL (P1630)”. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1921#Item P1630, search, SPARQL, SPARQL (new)
Scope is: the property must be used by specified way only (Help)
List of this constraint violations: Database reports/Constraint violations/P1921#scope, hourly updated report, SPARQL (new)

Generate a skos:ExactMatch based on this property?[edit]

@Lydia Pintscher (WMDE), Lucas Werkmeister, Smalyshev (WMF), Denny, Markus Krötzsch, Andrawaag: I've been talking with most of you in person about how to have more generic triples in our RDF to link to the same concept in another dataset. Let's take National Thesaurus for Author Names ID (P1006) as an example. Josephus (Q134461) has 069071632 on it and using this property (formatter URI for RDF resource (P1921)) an URI gets created in the rdf like <wdtn:P1006 rdf:resource="http://data.bibliotheken.nl/id/thes/p069071632"/>. I would also like to have a more generic triple with this uri. owl:sameAs is probably wrong, but skos:ExactMatch seems to be correct. This makes it much easier to do federated queries. Can the people who are more into the semantic web give feedback if this is the right approach? Multichill (talk) 11:05, 18 May 2018 (UTC)

As an addon to the discussion. Currently, there is exact match (P2888), which was proposed as the Wikidata property for skos:exactMatch. --Andrawaag (talk) 11:08, 18 May 2018 (UTC)
Personally, I think that sounds right. I would even go for owl:sameAs, to be honest. --Denny (talk) 16:17, 18 May 2018 (UTC)
@Multichill: I agree with the idea of adding direct link, but not sure if it should be a generic rule (if you have formatter URI for RDF resource (P1921), it's skos:ExactMatch) or it should be some flag/property on the property that says to do it (maybe then we can decide when skos:ExactMatch is the best one and when owl:sameAs and when something else, by making the exact predicate the value of the property?). Would like some more input from semantic web tools users as to which option is preferable (and any other comments of course). Smalyshev (WMF) (talk) 23:19, 29 May 2018 (UTC)
@Smalyshev (WMF): I let this sink in a bit and I think it's probably better to just create a new property "formatter URI for skos:ExactMatch RDF resource" to prevent any problems in the future. You could just generate the skos:ExactMatch link based on that and no need to worry about difficult checks to do. And yes, would like to get more semantic web people input. Multichill (talk) 10:20, 30 May 2018 (UTC)
Instead of having an other "formatter URI for skos:ExactMatch RDF resource" that would, I believe, always contain the same value as formatter URI for RDF resource (P1921), I would maybe add something like instance of (P31) "exact match property" (respectively "sameAs property") to the properties that should be emitted with skos:exactMatch (respectively owl:sameAs). We could maybe go even one step further and use equivalent property (P1628) and external superproperty (P2235) to get the property to emit in the RDF output. Tpt (talk) 11:32, 30 May 2018 (UTC)
@Tpt: Using properties to generate things instead if items feels more consitent. I encountered Iconclass notation (P1256) and depicts Iconclass notation (P1257). Let's assume Iconclass starts offering RDF (not very far fetched), I would use formatter URI for RDF resource (P1921) on both properties, but would only like to generate the skos:ExactMatch on Iconclass notation (P1256). How would you solve that? Multichill (talk) 11:55, 14 June 2018 (UTC)
@Multichill: We could maybe just not create new properties and items and use external superproperty (P2235). For Iconclass notation (P1256) it would mean to just add Iconclass notation (P1256)external superproperty (P2235)  http://www.w3.org/2004/02/skos/core#exactMatch. Tpt (talk) 12:01, 14 June 2018 (UTC)
@Tpt: Now we're talking! So we just need to instruct the software that if external superproperty (P2235) is used, it should construct a new triple with the <wikibase item> <value of P2235> <rdf link constructed based on P1921>. I like this much more because it keeps the discussion of the skos:ExactMatch or something else out of the software and makes it much more flexible to introduce other external properties. @Smalyshev (WMF), Andrawaag: what do you think? Multichill (talk) 12:05, 14 June 2018 (UTC)

Incorrect URI's[edit]

After this conversation I was wondering what URI's are currently incorrect. Let's take Wikidata as an example. Douglas Adams (Q42) has a concept URI as http://www.wikidata.org/entity/Q42 , not https://www.wikidata.org/entity/Q42 (look in the rdf to confirm that). That's the URI that third-party sites should use in their RDF to link here. Other way around holds too. For this item:

(etc.)

It's not always http, for example if you look at ORCID iD (P496), it's consistently https. Why is this important? The URI is the way to connected different data sets. Inconsistencies will show up when doing federated queries. I already corrected a couple and these should be checked and maybe switched from https to http for the formatter URI:

SELECT ?property ?formatter WHERE {
  ?property wdt:P1921 ?formatter .
  FILTER REGEX(?formatter, "https") .
  # Add the properties here where the URI really starts with https 
  VALUES (?exceptprop) {
    (wd:P496) # ORCID is explicit https (
  }
  FILTER (?property!=?exceptprop) .
  } ORDER BY ?formatter
LIMIT 100

Try it!

Could later be added as a complex constraint violation on this property. Multichill (talk) 13:37, 8 September 2018 (UTC)