query-aaa2bbb7dd92886c5af502d036abc4ad
402 (auxiliary) WFM Dictionary No. Control content"In the beginning was the dictionary"ContentMine dictionaries are usually extracted from Wikidata by a query. , and(Q29496)leukemia paired with Wikidata items such as lists of search terms like "leukemia", http://sciencesource.wmflabs.org/wiki/File:Cereal_dictionary2.pngExample: WikidataIt is Wikimedia's knowledge base, multilingual and part of the Semantic Web family of machine-readable sites. It is also illustrated with several million images. Our interests are mainly in drugs, diseases and scientific papers, which are not the best topics to show off the illustrations. But here is something in the drug field:
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#ImageGrid for compounds "-sterone".
#defaultView:ImageGrid
SELECT DISTINCT ?item ?itemLabel ?pic
WHERE
{
?item wdt:P31 wd:Q11173;
rdfs:label ?itemLabel;
FILTER (lang(?itemLabel) = "en")
FILTER regex (?itemLabel, "(sterone)$")
OPTIONAL { ?item wdt:P18 ?pic }
}
Query found at
- https://www.wikidata.org/wiki/User:Charles_Matthews/ContentMine_workshop_15_December_2018
- https://www.wikidata.org/wiki/Wikidata:WikiFactMine/Core_SPARQL
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?itemLabel"):::projected
v3("?pic"):::projected
c4(["wd:Q11173"]):::iri
f0[["regex(?itemLabel,'(sterone)$')"]]
f0 --> v1
f1[["?itemLabel = 'en'"]]
f1 --> v1
v2 --"wdt:P31"--> c4
v2 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v3
end