query-a0c5a80094d580b8e65523993829b78a
14:24, 25 April 2023 (UTC) pagetalk / TomT0m author 08:38, 27 April 2023 (UTC) pagetalk / TomT0m author and the tool will pick up the problems on navigation, hopefully … (P2738)disjoint union of A query also computes the most suspicious item, the item the upper in the class tree that is a subclass of two conflicting classes. So now we could work on adding more , the test version of the script, it still needs a few cosmetic changes, and to work on subclasses will need a bit of work still. I did not solved it immediately because it was my test case :) But there are others, so not a real issue.User:TomT0m/classification/sandbox.jsYep, this is clear on the screenshot of the query below. The query is now integrated into 22:30, 26 April 2023 (UTC)) talk (JesseW. here was very messy, the error was actually (Q147276)proper noun Actually, while 01:48, 26 April 2023 (UTC)) talk (JesseW. I'm going to take a stab at fixing it. Talk:Q147276, as can be seen on (Q147276)proper noun That mess seems to be underneath 01:40, 26 April 2023 (UTC)) talk (JesseWExcellent! Uncovering messes like that is very much one of the uses I hoped to make of this tool. capture d’écran de la vue de conflit d’appartenance à des classes disjointe du gadget classification.js sur WikidataNew query today ! soon integrated into my script. It makes kind of crystal clear where the issue is with colors : one of the classes is both a process and an object currently
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Graph
prefix violated_top: <http://www.wikidata.org/entity/Q35120>
prefix violated_1: <http://www.wikidata.org/entity/Q488383>
prefix violated_2: <http://www.wikidata.org/entity/Q3249551>
prefix instance: <http://www.wikidata.org/entity/Q566893>
select ?class ?rgb ?classLabel ?img
?parent
?edgeLabel
?size
{
{#{select * { {
select distinct ?class
(sample(?rgb_) as ?rgb)
(concat(?classLabel_, " : ",group_concat(distinct ?violatedLabel_;separator=", ")) as ?classLabel)
(group_concat(distinct ?violatedLabel_;separator=", ") as ?edgeLabel)
{
instance: wdt:P31 ?baseclass.
?baseclass wdt:P279* ?class .
?class wdt:P279* ?violated .
values (?violated ?rgb_) {
(violated_1: "223311")
(violated_2: "447711")
}
SERVICE wikibase:label {
?class rdfs:label ?classLabel_ .
?violated rdfs:label ?violatedLabel_ .
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
}
} group by ?class ?classLabel_
}} }
{select (?class as ?parent) { {
select distinct ?class
(sample(?rgb_) as ?rgb)
(concat(?classLabel_, " : ",group_concat(distinct ?violatedLabel_;separator=", ")) as ?classLabel)
(group_concat(distinct ?violatedLabel_;separator=", ") as ?edgeLabel)
{
instance: wdt:P31 ?baseclass.
?baseclass wdt:P279* ?class .
?class wdt:P279* ?violated .
values (?violated ?rgb_) {
(violated_1: "223311")
(violated_2: "447711")
}
SERVICE wikibase:label {
?class rdfs:label ?classLabel_ .
?violated rdfs:label ?violatedLabel_ .
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
}
} group by ?class ?classLabel_
}} }
{
select distinct ?class
(sample(?rgb_) as ?rgb)
(concat(?classLabel_, " : ",group_concat(distinct ?violatedLabel_;separator=", ")) as ?classLabel)
(group_concat(distinct ?violatedLabel_;separator=", ") as ?edgeLabel)
{
instance: wdt:P31 ?baseclass.
?baseclass wdt:P279* ?class .
?class wdt:P279* ?violated .
values (?violated ?rgb_) {
(violated_1: "223311")
(violated_2: "447711")
}
SERVICE wikibase:label {
?class rdfs:label ?classLabel_ .
?violated rdfs:label ?violatedLabel_ .
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
}
} group by ?class ?classLabel_
}.
?class wdt:P279 ?parent .
}
union {
bind (instance: as ?class)
bind ( "Base" as ?classLabel)
?class wdt:P31 ?parent .
bind ("FFFF33" as ?rgb)
bind (12 as ?taille)
bind ("plop" as ?edgeLabel)
} union {
values (?class ?rgb ?classLabel) {
(violated_1: "223311" "vio1")
(violated_2: "447711" "vio2")
}
values ?parent {
violated_top:
}
# values ?rgb { "111111" }
#SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?class rdfs:label ?classLabel}
} union {
values (?class ?rgb ?size ?classLabel ){
(violated_top: "FF0000" "10"^^xsd:number "Top !!")
}
}
}