| 1 |
Medical Subject Headings |
| 2 |
|
| 3 |
nquire -get "http://id.nlm.nih.gov/mesh/sparql" \ |
| 4 |
-query "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \ |
| 5 |
SELECT DISTINCT ?class FROM <http://id.nlm.nih.gov/mesh> \ |
| 6 |
WHERE { ?s rdf:type ?class } ORDER BY ?class" | |
| 7 |
xtract -pattern result -pfx "meshv:" -first "uri[http://id.nlm.nih.gov/mesh/vocab#|]" |
| 8 |
|
| 9 |
MeSH Predicates |
| 10 |
|
| 11 |
nquire -get "http://id.nlm.nih.gov/mesh/sparql" \ |
| 12 |
-query "SELECT DISTINCT ?p FROM <http://id.nlm.nih.gov/mesh> \ |
| 13 |
WHERE { ?s ?p ?o } ORDER BY ?p" | |
| 14 |
xtract -pattern result -pfx "meshv:" -first "uri[http://id.nlm.nih.gov/mesh/vocab#|]" |
| 15 |
|
| 16 |
WikiData Predicate List |
| 17 |
|
| 18 |
nquire -url "https://query.wikidata.org/sparql" \ |
| 19 |
-query "SELECT ?property ?propertyType ?propertyLabel \ |
| 20 |
?propertyDescription ?propertyAltLabel WHERE { \ |
| 21 |
?property wikibase:propertyType ?propertyType . SERVICE wikibase:label \ |
| 22 |
{ bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en'. } } \ |
| 23 |
ORDER BY ASC(xsd:integer(STRAFTER(STR(?property), 'P')))" | |
| 24 |
xtract -pattern result -first "uri[http://www.wikidata.org/entity/|]" -first literal |
| 25 |
|
| 26 |
Vitamin Binding Site |
| 27 |
|
| 28 |
nquire -get "http://www.wikidata.org/entity/Q22679758" | |
| 29 |
transmute -j2x | |
| 30 |
xtract -pattern entities -group claims -block P527 -element "value/id" |
| 31 |
|
| 32 |
Children of JS Bach |
| 33 |
|
| 34 |
nquire -url "https://query.wikidata.org/sparql" \ |
| 35 |
-query "SELECT ?child ?childLabel WHERE \ |
| 36 |
{ ?child wdt:P22 wd:Q1339. SERVICE wikibase:label \ |
| 37 |
{ bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en'. } }" | |
| 38 |
xtract -pattern result -block binding -if "@name" -equals childLabel -element literal |
| 39 |
|
| 40 |
Eye Color Frequency |
| 41 |
|
| 42 |
nquire -url "https://query.wikidata.org/sparql" \ |
| 43 |
-query "SELECT ?eyeColorLabel WHERE \ |
| 44 |
{ ?human wdt:P31 wd:Q5. ?human wdt:P1340 ?eyeColor. SERVICE wikibase:label \ |
| 45 |
{ bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en'. } }" | |
| 46 |
xtract -pattern result -element literal | |
| 47 |
sort-uniq-count-rank |