query-bfe19805aea44d9b167443c7e9c28cd7

rq turtle/ttl

Problems with searches involving subclass treesOne of the big challenges for the Structured Data for Commons project is going to be trying to understand the information stored in categories and seeing whether the structured data can reproduce it. , we can now identify article-like items here for about 1.2 million Commons categories -- but that is about 5.5 million categories there in total, (and the number being created is rising faster than they are being linked). posted a couple of weeks agoAs I (and won't) want to make a corresponding item for here. But because they are not marked as such, it's hard to know even how many there are. don'tOne issue is complex intersection categories, which for the most part we . As a sweetener to try to encourage use, I added a similar query on the template to the Reasonator one. [5] here, which eg Reasonator can use to make a list of what it thinks should be on the list (P360)is a list of , that could store the specification for one of these complex intersections, in a similar way to that used for c:Template:Category containsSo I made an experimental template But ... most of the queries are timing out, which isn't a very good advertisement. more likely to time out: necessarilyCuriously, a broader query, or one with more returns, isn't : works c:Category:Grade I listed buildings in BedfordshireSo the following, for

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
    ?item wdt:P31?/wdt:P279* wd:Q41176 ; 
          wdt:P131+ wd:Q23143 ; 
          wdt:P1435 wd:Q15700818 . 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected a1((" ")) c7(["wd:Q15700818"]):::iri c5(["wd:Q23143"]):::iri c9(["bd:serviceParam"]):::iri c3(["wd:Q41176"]):::iri c11(["en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end a1 --"wdt:P279"--> c3 v1 --"wdt:P131"--> c5 v1 --"wdt:P1435"--> c7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end