query-16d088402e1125c5242c1741d044d351

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?elev ?unit_label #?dlangLabel ?unit ?sense ?lexeme ?form_1 ?repr_1 ?form_2 ?repr_2
WHERE {
  BIND(wd:Q13428 as ?item)
  ?item p:P2044 ?place_st .
  ?place_st a wikibase:BestRank .
  ?place_st psv:P2044 ?placeElev.
  ?placeElev wikibase:quantityAmount ?elev.
  ?placeElev wikibase:quantityUnit ?unit.
  ?sense wdt:P5137 ?unit . 
  ?lexeme ontolex:sense ?sense .

  ?lexeme dct:language ?dlang . FILTER (?dlang IN (wd:Q1412, wd:Q9027))

  ?lexeme ontolex:lexicalForm ?form_1. 
  ?form_1 wikibase:grammaticalFeature wd:Q110786 .
  ?form_1 wikibase:grammaticalFeature wd:Q131105 .
  OPTIONAL { ?form_1 wikibase:grammaticalFeature ?indef_1 . FILTER (?indef_1 IN (wd:Q53997857)) }
  ?form_1 ontolex:representation ?repr_1 .
  FILTER((?dlang = wd:Q9027 && BOUND(?indef_1)) || (?dlang = wd:Q1412))

  ?lexeme ontolex:lexicalForm ?form_2. 
  ?form_2 wikibase:grammaticalFeature wd:Q146786 .
  ?form_2 wikibase:grammaticalFeature wd:Q131105 .
  OPTIONAL { ?form_2 wikibase:grammaticalFeature ?indef_2 . FILTER (?indef_2 IN (wd:Q53997857)) }
  ?form_2 ontolex:representation ?repr_2 .
  FILTER((?dlang = wd:Q9027 && BOUND(?indef_2)) || (?dlang = wd:Q1412))

  BIND(IF(ABS(?elev) >= 2,  ?repr_2, ?repr_1) AS ?unit_label)

  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; v1("?dlang") v7("?elev"):::projected v11("?form_1") v13("?form_2") v3("?indef_1") v2("?indef_2") v4("?item"):::projected v10("?lexeme") v6("?placeElev") v5("?place_st") v12("?repr_1") v14("?repr_2") v9("?sense") v8("?unit") v15("?unit_label"):::projected c16(["wd:Q131105"]):::iri c15(["wd:Q110786"]):::iri c18(["wd:Q146786"]):::iri c6(["wikibase:BestRank"]):::iri c20(["bd:serviceParam"]):::iri c22(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["(?dlang = 'wd:Q9027'bound(?indef_2) || ?dlang = 'wd:Q1412')"]] f0 --> v1 f0 --> v2 f1[["(?dlang = 'wd:Q9027'bound(?indef_1) || ?dlang = 'wd:Q1412')"]] f1 --> v1 f1 --> v3 list0c2(["wd:Q9027"]):::iri list0c1(["wd:Q1412"]):::iri list0c1 --o f2 list0c2 --o f2 f2[[" in "]] f2 --> v1 bind3[/"'wd:Q13428'"/] bind3 --as--o v4 v4 --"p:P2044"--> v5 v5 --"a"--> c6 v5 --"p:statement/value/P2044"--> v6 v6 --"wikibase:quantityAmount"--> v7 v6 --"wikibase:quantityUnit"--> v8 v9 --"p:direct/P5137"--> v8 v10 --"ontolex:sense"--> v9 v10 --"dct:language"--> v1 v10 --"ontolex:lexicalForm"--> v11 v11 --"wikibase:grammaticalFeature"--> c15 v11 --"wikibase:grammaticalFeature"--> c16 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v11 -."wikibase:grammaticalFeature".-> v3 end v11 --"ontolex:representation"--> v12 v10 --"ontolex:lexicalForm"--> v13 v13 --"wikibase:grammaticalFeature"--> c18 v13 --"wikibase:grammaticalFeature"--> c16 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v13 -."wikibase:grammaticalFeature".-> v2 end v13 --"ontolex:representation"--> v14 bind4[/"if(numeric-abs(?elev) >= '2^^xsd:integer',?repr_2,?repr_1)"/] v7 --o bind4 v14 --o bind4 v12 --o bind4 bind4 --as--o v15 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c20 --"wikibase:language"--> c22 end