User talk:TomT0m/classification.js

From Wikidata
Jump to navigation Jump to search
Classification gadget
This is the place to chat about the classification.js tool, report errors, request features, etc.


SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 7 days. For the archive overview, see Archive/. The latest archive is located at Archive/2024.

use of the gadget[edit]

Is there documentation on how to use this gadget? Peter F. Patel-Schneider (talk) 14:31, 11 December 2023 (UTC)[reply]

@Peter F. Patel-Schneider Not really yet, I’m procrastinating this. Hopefully some features are self explaining … I’ll let you know when I have something usable. author  TomT0m / talk page 14:42, 11 December 2023 (UTC)[reply]
I'm taking a close look at disjointness and a tool like this appears to be useful. I'm not even sure how to use the tool at all.
I'm currently using SPARQL queries (and QLever, as the WDQS often times our for me). Peter F. Patel-Schneider (talk) 15:08, 11 December 2023 (UTC)[reply]
To install, like other gadgets on page Wikidata:Tools/Enhance user interface#Classification.js
Insert this code on your Special:MyPage/common.js and this will activate the gadget
mw.loader.load( '//www.wikidata.org/w/index.php?title=User%3ATomT0m%2Fclassification.js&action=raw&ctype=text%2Fjavascript' ); // [[User:TomT0m/classification.js]]
The disjointness part will appear only if there is a disjointness problem, such as in the current discussion on the Ontology project. The key for this tool is to understand the triangles arrow and the titles around can be clicked and expanded.
Succinctly : the tool just begun as a way to show the superclasses, and the classes an item is an instance of. They are displayed under the "instance of" and "subclass of" statements on a Wikidata page. You can click around to show additional informations, there are links to show the paths between an item and one of its superclass. If there is many superclasses there is a field in which you can type a classname and if there is a path between the class and the selected class it will be displayed.
There are also informations that are shown only if there are problems, currently if there is a loop in the class tree and disjointness problems. In such cases information to help solve the problem are displayed. author  TomT0m / talk page 15:42, 11 December 2023 (UTC)[reply]