query-55a1f534d44608e4e30336ea524e1622
User Script to warn about conflicting superclasses now working! an idea of mine to make a Gadget that warned editors when they changed an items basic superclasses (i.e. changed an item from being a process to an object, or a spatial entity to a temporal entity). I've now written it (at least a first version), and got it to a point where I'd appreciate wider feedback. It checks each time a new item is selected when changing an instance-of or subclass-of value, and makes a bubble notification if a conflict is identified. (For now, for debugging, it also displays a notification if no problems are seen, but I plan to remove that.) previously wrote on Project Chat aboutI'd : Special:MyPage/common.jsYou can try it out just by adding the following to your mw.loader.load('//www.wikidata.org/w/index.php?title=User:JesseW/conflicting_superclass_warnings.js&action=raw&ctype=text/javascript'); // [[User:JesseW/conflicting_superclass_warnings.js]] 03:54, 2 April 2023 (UTC)) talk (JesseWVery glad for any feedback, particularly suggestions for additional conflicting superclasses! (above copied from my Project Chat announcement) 22:34, 26 April 2023 (UTC)) talk (JesseW. this edit in (Q5482740)programmer I've removed the loop on 01:42, 26 April 2023 (UTC)) talk (JesseWOoh, neat! 15:52, 24 April 2023 (UTC) pagetalk / TomT0m author (I don’t solve this immediately for the example). (Q5482740)programmer next. I recently finished the feature to show … loops in the class tree ! And there are some, see User:TomT0m/classification.jsSure, I think I’ll add this to 13:05, 24 April 2023 (UTC)) talk (JesseW; it would certainly be neat to implement logic to automatically extract such relationships and check them. But I think higher priority features including handling adding properties (not just editing them), and maybe being able to check RecentChanges/RelatedChanges/history pages for edits that introduced conflicts. In any case, please try it out and let me know how it goes! (P2738)disjoint union of I've manually added some uses of 10:02, 23 April 2023 (UTC) pagetalk / TomT0m author :) (P2738)disjoint union of Good, it could be generalised beyond basic superclasses by using JesseW@ 02:35, 3 April 2023 (UTC)) talk (JesseW now. done soGood idea, thanks! I've 21:30, 2 April 2023 (UTC)) talk (Lectrician1! Wikidata:Tools/Enhance_user_interface Please add your script to JesseW@ . Scary, a name is a mathematical object and a set … https://w.wiki/6dKD. It’s efficient, although the involved class tree is a real mess : this statement being both an instance of (Q566893)Annie : A first promising query : this one shows that there is a problem with JesseWFirst experiment ! @
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
select ?class ?st ?instance (count(distinct ?classes) as ?count) {
?class p:P2738 ?st .
?st pq:P642|pq:P11260 ?classes .
bind (wd:Q566893 as ?instance) .
?classes wdt:P279* ?class .
?instance wdt:P31/wdt:P279* ?classes .
#?st pq:P642|pq:P11260 ?classesc .
} group by ?class ?instance ?st
having (?count > 1)
limit 1