query-22b0fdbae84a2eec1f9e22f9d6452c3a

rq turtle/ttl

WhidouBot) logs • contribs • talk (Whidou Operator: )xtools • User rights • User rights log • Block log • SUL • new lexemes • new items • contribs • talk (WhidouBot Add missing descriptions to music albums. Task/s: (based on Pywikibot) https://gitlab.com/Whidou/WhidouBot/ Code: Queries albums without descriptions in the selected language whose interpret have a label in said language, then adds the description "album by " in that language. The operator is notified of description conflicts but the bot does not attempt to solve them on its own. Right now, supported languages are en, eo, es and fr, but more could be added in the future. Function details:Here is a sample SPARQL query:

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?item ?artistLabel WHERE
{
    ?item wdt:P31 wd:Q482994 .
    ?item wdt:P175 ?artist .

    ?artist rdfs:label ?artistLabel .
    FILTER( LANG( ?artistLabel ) = "eo" ) .

    MINUS
    {
        ?item schema:description ?description .
        FILTER( LANG( ?description ) = "eo" ) .
    }
}

LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?artist") v1("?artistLabel"):::projected v4("?description") v2("?item"):::projected c3(["wd:Q482994"]):::iri f0[["?artistLabel = 'eo'"]] f0 --> v1 v2 --"wdt:P31"--> c3 v2 --"wdt:P175"--> v3 v3 --"rdfs:label"--> v1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; f2[["?description = 'eo'"]] f2 --> v4 v2 --"schema:description"--> v4 end