Property talk:P7084

Latest comment: 1 year ago by Amadalvarez in topic Planned deprecation of of (P642)

Documentation

related category
Wikimedia category is related to this item
RepresentsWikimedia category (Q4167836)
Data typeItem
ExampleWelsh (Q9309)Category:Welsh pronunciation (Q84970198)
Ludwig van Beethoven (Q255)Category:Compositions by Ludwig van Beethoven (Q7132900)
See alsocategory for people buried here (P1791), category for employees of the organization (P4195), category of associated people (P1792), category for alumni of educational institution (P3876), category for recipients of this award (P2517), category for films shot at this location (P1740), category for eponymous categories (P6186), category for the water basin (P1200), category for pictures taken with equipment (P2033), topic's main category (P910), category for people who died here (P1465), member category (P6365), category for people born here (P1464), category for members of a team (P6112), category for films in this language (P5996)
Lists
Proposal discussionProposal discussion
Current uses
Total17,965
Main statement17,958>99.9% of uses
Qualifier3<0.1% of uses
Reference4<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Value type “Wikimedia category (Q4167836): This property should use items as value that contain property “instance of (P31)”. On these, the value for instance of (P31) should be an item that uses subclass of (P279) with value Wikimedia category (Q4167836) (or a subclass thereof). (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/P7084#Value type Q4167836, SPARQL
Scope is as main value (Q54828448): the property must be used by specified way only (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/P7084#Scope, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (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/P7084#Unique value, SPARQL (every item), SPARQL (by value)
Inverse property of “category combines topics (P971):
if [item A] has this property (related category (P7084)) linked to [item B],
then [item B] should also have property “category combines topics (P971)” linked to [item A]. (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/P7084#inverse, SPARQL
Allowed entity types are Wikibase item (Q29934200), Wikibase lexeme (Q51885771): 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/P7084#Entity types
 

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)

Use for pronunciation file categories (Commons) edit

SELECT ?item ?itemLabel ?itemDescription ?ll ?llLabel
{
	?item wdt:P971 wd:Q184377 .   
	MINUS { ?l p:P7084 [ ps:P7084 ?item ; pq:P642 wd:Q184377 ] }
	OPTIONAL { ?item wdt:P971 ?ll . FILTER( ?ll != wd:Q184377 ) }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}

Try it!

To generate the Commons category column on the list at Property_talk:P443#Statistics_by_language_(items), I started using this property.

The query finds categories might not have been added with this property yet. --- Jura 02:34, 15 February 2020 (UTC)Reply

Define and use different categoritzation criteria edit

Hi, @Ghuron:, et al. I am thinking of using this property to increase the level of automatic cawiki categorization. It’s been pretty hard to understand how it worked until I went to the “proposal page”; maybe we should improve this talk page for future new users.

Anyway. I have two different but similar situations in their effects. 1) when the category reported in P7084 does not exist in the cawiki and it is not planned to create it, for reasons of category tree structure. 2) when the reported value corresponds to a different tree level than the one we apply to our platform. In both cases, it would be necessary to know for which platform the statement is valid, in the first case it would not be necessary to have an alternative value for the platform, but in the second case, the P7084 would have to be multivalued pointing towards the values corresponding to each situation. Have you had a similar situation? How should it be solved?. Thanks, Amadalvarez (talk) 22:41, 27 January 2022 (UTC) (CC:@KRLS:)Reply

@Amadalvarez, what kind of categories can we derive from Princess Alice of Battenberg (Q116062)award received (P166)Righteous Among the Nations (Q112197)? In ru-wiki we have somewhat complicated categorization under Category:Righteous Among the Nations (Q8662876):
  1. Since we have Righteous Among the Nations (Q112197)related category (P7084)Category:Righteous Among the Nations Alphabetical (Q32405154)of (P642)by name (Q24571879), everybody who has this award should be included not in Category:Righteous Among the Nations (Q8662876), but in Category:Righteous Among the Nations Alphabetical (Q32405154). If for certain award such statement is not defined, we fallback to the regular Righteous Among the Nations (Q112197)category for recipients of this award (P2517)Category:Righteous Among the Nations (Q8662876)
  2. We also have categorization by countries. Since Princess Alice of Battenberg (Q116062)award received (P166)Righteous Among the Nations (Q112197)country of citizenship (P27)Greece (Q41) we are looking for Righteous Among the Nations (Q112197)related category (P7084)Category:Greek Righteous Among the Nations (Q8499817)of (P642)Greece (Q41) and include her into Category:Greek Righteous Among the Nations (Q8499817)
My understanding is that in cawiki you don't have a tradition to place articles in Category:xxx Alphabetical, so your platform can simply avoid implementing #1. If for some awards you have distinction by country, your platform can implement #2, but if corresponding category does not exists in cawiki, it shows nothing.
Right now it looks like platform can decide which category tree structure should be used by itself. What do you think? Ghuron (talk) 06:03, 28 January 2022 (UTC)Reply
Thanks. Let me digest it and test both situations with several real cases of cawiki. Initially, I assumed to use the fallback to detect categories to create, ....but I see now that is not always valid. So, probably your formula is better.
To be sure, when you say: "we are looking for Righteous Among the Nations (Q112197) related category (P7084) Category:Greek Righteous Among the Nations (Q8499817) / of (P642) Greece (Q41) and include her .....", you mean "looking for Q112197 = ? / P642 = Q41" ?. When I get P7084, I just filter by P642, because the property value is the result to be used. Is it the procedure? Thanks, keep in touch. Amadalvarez (talk) 07:00, 28 January 2022 (UTC)Reply

Hi @Ghuron: I'm in process to understand, excuse me. I have three questions and one request.

by profession Righteous Among the Nations (Q112197)related category (P7084)occupation (P106)of (P642)architect (Q42973), or
by sex Righteous Among the Nations (Q112197)related category (P7084)sex or gender (P21)of (P642)female (Q6581072);
or even the combination of nationality x sex.
Should I simply add categories as new values of P7084? Doing this, would I be "defining" a certain category tree for everyone? My initial idea for the generator module was to go through all the existing values in P7084 ​​and assign to the articles the values ​​I found. But it seems to me that the P7084 is oriented as a "catalog of categories" where each entry indicates the subset it represents, via the P642. Therefore, the generator module must go to retrieve the subsets of entries expected internally for the WP.
It's right ?
  • How to represent multi-vector categories? : I thought it was with various P642 values ​​as classes. Examples:
That is, applying an "and" relationship between P642 values. However, looking at the multi-qualifier cases I find that in Q5583669#P7084 it appears to have been used for a "OR" relationship.
It's right? If so, how is each situation identified?

Thanks a lot !, --Amadalvarez (talk) 15:53, 29 January 2022 (UTC)Reply

Sorry for delay with answers, you are asking much more broader questions that I initially thought  :
  1. Yes, I initially thought that P7084 would act as a "catalog of categories" where each entry indicates the subset it represents, via the P642. So yes, I think it is reasonable to expect that generator module must go to retrieve the subsets of entries expected internally for the WP
  2. Based on the similar properties I'd expect P642 values to have "AND" relationship. "OR" relationship can be expressed via multiple P7084 statements. In that sense, Q5583669#P7084 appears to be incorrect
  3. Fallback path might be different in different wikis
  4. I'll think about Category:Contemporary Barcelona writers in Catalan (Q10147816)
Ghuron (talk) 12:18, 31 January 2022 (UTC)Reply
Don't worry, and many thanks for direct and clear answers. I asked to fill these two examples, to be sure I'm understanding pretty well the conception of this topic. I hope it revolutionizes the maintenance of the categories. In small-medium WP is a very cumbersome job that is detrimental to the resources devoted to content. I think WD should help automate, more and better, some repetitive tasks where a normal editor doesn't have to be an expert. I'm expecting to your new answer. Amadalvarez (talk) 23:00, 1 February 2022 (UTC)Reply
@Ghuron, @Amadalvarez: Please note that of (P642) is currently being deprecated. Any suggestions for a different separator to use with related category (P7084), and how to arrange an orderly transition for 10,000+ claims? --SM5POR (talk) 11:49, 28 February 2022 (UTC)Reply
In my opinion, category contains (P4224) or contains (P4330) could be good alternatives. However, I'm just trying to understand the use of P7084, and @Ghuron has the knowledge about the impact and accuracy of any alternative property. Thanks for your message. Amadalvarez (talk) 06:09, 1 March 2022 (UTC)Reply
Thanks for the suggestions! It seems that contains (P4330) is intended for physical objects, such as a bottle (Q80228) of water (Q283) (this is where "of" would translate into no word at all in Swedish), but category contains (P4224) seems quite on target. Two other options might be category's main topic (P301) and category combines topics (P971). Which one of those latter three do you think best describes the association with related category (P7084) (considering semantics only, not word order or style of language)? --SM5POR (talk) 14:12, 1 March 2022 (UTC)Reply
Technically any property can work as a separator, it is more of general data modelling question. I still do not understand why it was decided to deprecate of (P642) so I hope those who do can propose adequate replacement here. Current semantics should be pretty clear from the examples and property proposal discussion.
Once decided, technical transition is trivial with the combination of WDQS, excel and QuickStatements (remove P7084 statement and add it back with correct qualifier) Ghuron (talk) 06:33, 1 March 2022 (UTC)Reply
I was unaware of the deprecation effort until February 8, when the constraint validator began telling me my use of of (P642) was incorrect, and I learned about the ongoing discussion at Wikidata:WikiProject Data Quality/Issues (apparently, the constraint change I saw was reverted the same day for being premature).
The semantics of related category (P7084) seem clear enough to me, but of (P642) itself is a whole different matter. It's a convenient preposition in the English language, but The Concise Oxford Dictionary of Current English identifies ten different senses of "of", which hardly translate into a single corresponding word in any other language (I tried them in Swedish, and ended up with maybe five different prepositions, one use of genitive ending, and one case of no word at all). It appears from the discussion that this is a problem especially in Chinese.
This property is sometimes used in a completely redundant way, such as the composer (P86) of The Look (Q2313776) being Per Gessle (Q312801) of (P642) Sweden (Q34), even as his country of citizenship (P27) is also declared as Sweden (Q34). Once found, those qualifiers should simply be dropped, as they don't add any information. In other cases, a replacement qualifier (or perhaps an entirely different property construct for the claim) must be identified.
I think I saw during my queries that there are some 300,000 instances of the qualifier "of" in Wikidata, and maybe 13,000 of them belong to related category (P7084). As the queries grow more complex to cover exactly those claims that should be identically treated, they tend to time out. One way of addressing that problem may be to first eliminate the most common uses, such as related category (P7084) (there could be other ways, but I'm no optimization expert).
As to the transition, you may be aware that some items have the same related category (P7084) claim made twice; I suggest removing the duplicates before changing the qualifier on the remaining claim. --SM5POR (talk) 13:24, 1 March 2022 (UTC)Reply
Correction: The 300,000 count I mentioned is probably from a query still limited to WikibaseItem type properties, and may even have referenced the number of unique qualifier values rather than the number of statements. I think I have found the elephant in the closet causing the timeouts, and it has nothing to do with related category (P7084). My apologies...
There are more than ten million statements for the P2215 (P2215) property, where the value is numeric, the unit is "milliarcseconds per year", and the of (P642) property is merely used to select either right ascension (Q13442) or declination (Q76287) (i.e. celestial "longitude" or "latitude"). The items involved are more than four million stars.
I'd say this way of representing celestial unit sphere vectors is far from optimal, but that is a dicussion which doesn't belong here. --SM5POR (talk) 21:07, 1 March 2022 (UTC)Reply

Allowed entity types edit

I listed Wikibase item (Q29934200) and Wikibase lexeme (Q51885771) as allowed entity types to satisfy the constraint validator, though I'm not entirely sure about Wikibase lexeme (Q51885771) (or the form and sense entity types), so please adjust it if necessary. --SM5POR (talk) 11:39, 28 February 2022 (UTC)Reply

Planned deprecation of of (P642) edit

This property currently requires the qualifier of (P642), specifying the content of the category. As work is underway to deprecate of (P642), I propose that for this use, it be replaced with category contains (P4224). Can anyone think of a more appropriate alternative property? Swpb (talk) 19:57, 1 December 2022 (UTC)Reply

@Amadalvarez, @Ghuron: Referring to the earlier discussion above, can we at the same time get a clarification of the implied semantics of multiple of (P642) qualifiers on the same statement being interpreted as a logical "AND" (intersection of classes) or "OR" (union of classes)? Will those semantics be automatically carried over to the category contains (P4224) qualifier, or should they be explicitly specified/documented somewhere? --SM5POR (talk) 04:59, 3 December 2022 (UTC)Reply
Hi, @SM5POR. As I mentioned above, I was just testing the functionalities of P7084 in order to generate categories for catalan WP. Finally, I left it behind, because our structure of categories is more difficult to maintain by this way than manually.
So, I have no answer nor reject to the change. Thank for your work. Amadalvarez (talk) 06:39, 3 December 2022 (UTC)Reply
Return to "P7084" page.