Property talk:P7084
Documentation
Wikimedia category is related to this item
List of violations of this constraint: Database reports/Constraint violations/P7084#Value type Q4167836, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P7084#Scope, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P7084#Unique value, SPARQL (every item), SPARQL (by value)
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)
List of violations of this constraint: Database reports/Constraint violations/P7084#inverse, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P7084#Entity types
Use for pronunciation file categories (Commons) edit
- Items used: pronunciation (Q184377)
- Properties used: category combines topics (P971) , related category (P7084) , of (P642)
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"}
}
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)
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:)
- @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):
- 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) - 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)
- Since we have Righteous Among the Nations (Q112197)related category (P7084)Category:Righteous Among the Nations Alphabetical (Q32405154)
- 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)
- 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)
Hi @Ghuron: I'm in process to understand, excuse me. I have three questions and one request.
- Different category trees among wikis: I understand your previous answer. I will ask differently. Imagine that in addition to categorizing as ruwiki: Righteous Among the Nations (Q112197)related category (P7084)country of citizenship (P27)
of (P642)Greece (Q41), I need to categorize:
- 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.
- by profession Righteous Among the Nations (Q112197)related category (P7084)occupation (P106)
- 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:
- in ruwiki you have Category:Baroque architects (Q8290280), I understand that it would be architect (Q42973)related category (P7084)Category:Baroque architects (Q8290280)
of (P642)Q55984204 P642 Q840829, that is, for those items that have occupation (P106)architect (Q42973) & P135baroque architecture (Q840829) - in cawiki we have Category:Italian Baroque architects (Q8557677) and I guess it would be architect (Q42973)related category (P7084)Category:Italian Baroque architects (Q8557677)
of (P642)by occupation or profession (Q55984204) P642 Q840829 P642 Q38
- 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.
- in ruwiki you have Category:Baroque architects (Q8290280), I understand that it would be architect (Q42973)related category (P7084)Category:Baroque architects (Q8290280)
- It's right? If so, how is each situation identified?
- Fallback: In your first answer, you say: "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)". In that case we have the P2517, but not all situations will be the same. Could the topic's main category (P910) be an option?. Is there any structure to hold info about "parent category"?.
- ... and the Petition : May you, please, describe to me the statements that Category:Contemporary Barcelona writers in Catalan (Q10147816) should have? (assuming "contemporary" as 20th century) and one of its subcategories: Category:Mercè Rodoreda (Q20885090)?
Thanks a lot !, --Amadalvarez (talk) 15:53, 29 January 2022 (UTC)
- Sorry for delay with answers, you are asking much more broader questions that I initially thought :
- 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
- 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
- Fallback path might be different in different wikis
- I'll think about Category:Contemporary Barcelona writers in Catalan (Q10147816)
- Ghuron (talk) 12:18, 31 January 2022 (UTC)
- 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)
- @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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
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)
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)
- @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)
- 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)