query-4769bc78bccb6fb92917aedd7ad7be51

rq turtle/ttl

Finding existing academic papers for use with "Cite Q"I made a little script that churns through wikitext, extracting citations with DOI numbers, and searches for matching Wikidata entities that can be used for "Cite Q". I ran into a problem with the SPARQL search not being case-insensitive, and I was hoping there was a way to solve this without resorting to filters (because that would make the working set unreasonably large), manually adding upper-case and lower-case duplicate strings or searching for items one-by-one using the API. Any good ideas?

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?doi ?itemLabel WHERE {
  VALUES ?dois {
    "10.1016/j.ijid.2020.01.009"
    "10.1126/science.367.6475.234"
  }
  ?item wdt:P356 ?dois, ?doi.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?doi"):::projected v1("?dois") v2("?item"):::projected c3(["bd:serviceParam"]):::iri c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?dois/] bind0-->v1 bind00(["10.1016/j.ijid.2020.01.009"]) bind00 --> bind0 bind01(["10.1126/science.367.6475.234"]) bind01 --> bind0 v2 --"wdt:P356"--> v1 v2 --"wdt:P356"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end