nichtich/wikidata-taxonomy

sparqlRequest bug involving wdk.simplifySparqlResults?

maxlath opened this issue · 2 comments

great module!
If you have an example where wdk.simplifySparqlResults crashes as suggested by your comment, I would be happy to have a look at it :)

Try this with wdsparql --simplify. The query is not optimized but valid:

SELECT ?item ?itemLabel ?broader ?parents
WHERE
{
    {
        SELECT ?item (count(distinct ?parent) as ?parents) {
            ?item wdt:P279* wd:Q1
            OPTIONAL { ?item wdt:P279 ?parent }
        } GROUP BY ?item
    }
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
    }
}