Property talk:P2737

From Wikidata
Jump to navigation Jump to search

Documentation

union of
every instance of this class is an instance of at least one class in that list of classes. Use "list item" P11260 as qualifiers to specify the list of classes
Representsunion (Q185359)
Data typeItem
Domainlist, or metaclass (note: this should be moved to the property statements)
Allowed values
According to this template: class list, or metaclass list (resp)
According to statements in the property:
list of values as qualifiers (Q23766486)
When possible, data should only be stored as statements
Usage notesThis property must be used with a value of Q23766486. Use P11260 to specify the list members.
Examplechemical compound (Q11173)list of values as qualifiers (Q23766486)
broadcasting program (Q11578774)list of values as qualifiers (Q23766486)
See alsodisjoint union of (P2738)
Lists
Proposal discussionProposal discussion
Current uses
Total755
Main statement75099.3% of uses
Qualifier50.7% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Scope is as main value (Q54828448): the property must be used by specified way only (Help)
List of violations of this constraint: Database reports/Constraint violations/P2737#Scope, hourly updated report, SPARQL
One of list of values as qualifiers (Q23766486): value must be one of the specified items. Please expand list if needed. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2737#One of, values statistics, search, SPARQL
Required qualifier “list item (P11260): this property should be used with the listed qualifier. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2737#mandatory qualifier, SPARQL
Qualifiers “list item (P11260), criterion used (P1013), nature of statement (P5102), sourcing circumstances (P1480), valid in period (P1264): this property should be used only with the listed qualifiers. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2737#allowed qualifiers, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2737#Entity types
Deprecation of P642
Replace of (P642) with list item (P11260) (Help)
Violations query: SELECT DISTINCT ?item ?itemLabel ?itemvalLabel ?ofLabel WHERE { { ?item p:P2737 ?stm . ?stm ps:P2737 ?itemval . ?stm pq:P642 ?of . } }
List of this constraint violations: Database reports/Complex constraint violations/P2737#Deprecation of P642
Union used to list instances
The values listed in the statements are actually instances of the class (Help)
Violations query: SELECT DISTINCT ?item ?stm ?instance WHERE { { ?item p:P2737 ?stm . ?stm pq:P11260 ?instance . ?instance wdt:P31/wdt:P279* ?item . } }
List of this constraint violations: Database reports/Complex constraint violations/P2737#Union used to list instances

Help[edit]

See disjoint union of (P2738) View with SQID for more information who to use this property. This property is used like its cousin, unless it is only required that any instance of the parent class is an instance of at least one of the subclass list. In mathematical terms, the set of instances is covered by the set of subclasses.

constraints ; requests[edit]

antipatterns[edit]

This property and her sister's creation has been motivated partly because of a misuse of part of (P361) View with SQID and has part Search. Here two queries to detect those antipatterns :

  • select ?item ?itemLabel ?part ?partLabel where {
      ?part wdt:P279 ?item .
      ?item wdt:P361 ?part .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      }
    }
    
    Try it!
     : alleged subclasses that are also parts.
  • select ?item ?itemLabel ?part ?partLabel where {
      ?part wdt:P279 ?item .
      ?item wdt:P527 ?part .
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
      }
    }
    
    Try it!
     : alleged parts that are also subclasses.

Unused?[edit]

At Property talk:P2737/list, there is a list of items using this property. It seems currently unused.
--- Jura 18:52, 13 April 2016 (UTC)[reply]

Constraints make no sense[edit]

There is no reason for this property to be forced to use the roundabout tool of list of values as qualifiers (Q23766486), except where the values form discrete, non-overlapping sets that can only be indicated by listing them as qualifiers of separate statements. Otherwise, values should be direct values of the property, as one would expect. Swpb (talk) 18:33, 2 January 2018 (UTC)[reply]

@Swpb:_Two points : First, this would amount to use union of as an inverse property of subclass of, which no one wants and was NETHER the point. Second, this would be creating a particular case which make more complicate to use the datas. For this kind of properties it make sense to normalize the representations. author  TomT0m / talk page 09:52, 13 March 2018 (UTC)[reply]

Multiple subclass claims[edit]

This should be simple, but I find myself confused over how it works: Does simultaneously making item A a subclass of (P279) B and a subclass of (P279) C imply that every instance of (P31) A is also an instance of (P31) of B and C (i.e. the intersection of B and C), or will it include anything that is an instance of (P31) either B or C (the union of B and C)?

I ask because today I encountered biblical character (Q12405827) and found that it had five subclass claims, listing religious character (Q18563354), hypothetical entity (Q18706315), mythical character (Q4271324), fictional character (Q95074), and literary character (Q3658341). It looked to me like a pretty limited intersection, saying that any biblical character must be religious, hypothetical and fictional at the same time. I thus decided to create a single union of (P2737) claim combining those five classes into one instead.

But did I really do it right? I have now left the existing subclass claims on that item intact, pending an answer to my question above. If a union of (P2737) construct is required whenever you want to combine the contents of two or more Wikidata classes, then there must be a lot of unintentional intersections across Wikidata, and I don't recall seeing any statement having problems because it conflicts with one or the other of the subclasses.

But if heaping subclass claims on top of each other typically results in a union being created, what do we need union of (P2737) for? What does specifying no subclass claims at all mean to an item? And what happens if I start playing around with subclass of (P279) currently empty class (Q86098365)..? --SM5POR (talk) 20:47, 12 January 2022 (UTC)[reply]

@SM5POR: In theory, subclass of (P279) should be used only when all the instances of A are instances of B and, adding another superclass C, the instances of A will be instances of the intersection of B and C (in practice, this rule is not always kept in mind).
According to the current state, every biblical character (Q12405827) is a religious character (Q18563354), and also a hypothetical entity (Q18706315), and also a mythical character (Q4271324), etc.
I don't actually know if this is necessary false. May you show any counterexample (i.e. an item that should be instance of only a part of these superclasses)? --Horcrux (talk) 09:22, 13 January 2022 (UTC)[reply]
Thanks for confirming my assumption, and now I see that I probably misinterpreted hypothetical entity (Q18706315) to include also kings potentially identical to historical rulers in the Middle East, such as some King of Assyria (Q28124026), since they are mentioned in the WP article linked to hypothetical entity (Q18706315) which I had Google translate from Hebrew... Neither is Augustus (Q1405) included. Then the intersection of the five classes listed was most likely intentional after all, and I can remove my union of (P2737) statement. -- SM5POR (talk) 11:46, 13 January 2022 (UTC)[reply]
This however reminds of nation at occurrence (Q61130878), a real ontological train wreck I explored a year and a half ago, but didn't have the patience to sort out then... -- SM5POR (talk) 12:13, 13 January 2022 (UTC)[reply]
P.S. Also notice that:
Yes, I suspected quite a bit of redundancy there but didn't verify it. However, I was a bit surprised to find neutron (Q2348) to be a hypothetical entity (Q18706315), but this is apparently due to it being a subclass of (P279) neutronium (Q1195471), which I believe is a mistake in two ways: it should be claimed as part of (P361), not subclass of (P279), and such a claim should probably be subject to some constraint as well. --SM5POR (talk) 12:01, 13 January 2022 (UTC)[reply]
@SM5POR: Since all the certainly-existed humans (like Augustus (Q1405)) are exclusively instance of (P31)human (Q5), it is not a problem that every biblical character (Q12405827) is a hypothetical entity (Q18706315). I think this problem is solved.
For what concerns the case of neutron (Q2348), I solved it in this way. Now ASK WHERE { wd:Q2348 wdt:P279* wd:Q18706315 . } will return false. --Horcrux (talk) 12:31, 13 January 2022 (UTC)[reply]

Move qualifiers to values[edit]

@Swpb @Jura1 @Vojtěch Dostál We should move this property and disjoint union of (P2738)'s qualifiers to instead be values of the property itself. I'm not exactly sure why they were made qualifiers in the first place. We should do this so that editors aren't confused how to use this with the weird list of values as qualifiers (Q23766486) value that's required and so that we can eventually depreciate of (P642). Lectrician1 (talk) 00:35, 14 February 2022 (UTC)[reply]

You should look to the property proposals. One major flaw with using the property values directly is that some items are decomposable in multiple unrelated ways. Using list of values as qualifiers (Q23766486) allows expressing one decomposition in one statement and another decomposition in a separate statement. Swpb (talk) 19:14, 14 February 2022 (UTC)[reply]