query-cc2f1601dbc335132a4a36a857aa7855

rq turtle/ttl

modifier that lets you reverse the direction along the tree. inverse-ofThis is an easier case, as gorilla and human are closer, taxonomically if not culinarily, than human and chicken. I also limit the depth of the search to a maximum of three for the way "down" from any checked root. There is "+" meaning "one or more", "*" meaning "zero or more", but unfortunately no "{1,5}" for "from one to five", so I used the ugly construction with consecutive "?"s. "^" is the 07:33, 19 August 2020 (UTC)) talk (Matthias WinkelmannYou may be able to find relations between more distant taxons by trying around with the depth, adding a limitation for the upward search and, in turn, allowing more on the way down. -- for instance: (Q6027402)human leg to (Q1072190)chicken nugget , but I think it is useful here as it works at least for a couple of arbitrary steps to find a link from RDF_GAS_API I don't have much experience with the Расстояние между элементами

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX gas: <http://www.bigdata.com/rdf/gas#>
SELECT ?depth ?subject ?subjectLabel ?predicate ?object ?objectLabel {
  SERVICE gas:service {
     gas:program gas:gasClass 'com.bigdata.rdf.graph.analytics.BFS';
                 gas:in wd:Q1072190;
                 gas:target wd:Q6027402;
                 gas:out ?object;
                 gas:out1 ?depth;
                 gas:out2 ?subject;
                 gas:maxIterations 12;
                 gas:maxVisited 10000 .
  }
  ?subject ?predicate ?object . # figure out what link type(s) connect a vertex with a predecessor
  FILTER(?depth > 0) . # remove dead ends from results
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} ORDER BY ASC(?depth)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?depth"):::projected v2("?object"):::projected v4("?predicate"):::projected v3("?subject"):::projected c3(["gas:program"]):::iri c14(["12^^xsd:integer"]):::literal c9(["wd:Q6027402"]):::iri c20(["en"]):::literal c7(["wd:Q1072190"]):::iri c5(["com.bigdata.rdf.graph.analytics.BFS"]):::literal c18(["bd:serviceParam"]):::iri c16(["10000^^xsd:integer"]):::literal f0[["?depth > '0^^xsd:integer'"]] f0 --> v1 subgraph s1["http://www.bigdata.com/rdf/gas#service"] style s1 stroke-width:4px; c3 --"gas:gasClass"--> c5 c3 --"gas:in"--> c7 c3 --"gas:target"--> c9 c3 --"gas:out"--> v2 c3 --"gas:out1"--> v1 c3 --"gas:out2"--> v3 c3 --"gas:maxIterations"--> c14 c3 --"gas:maxVisited"--> c16 end v3 -->v4--> v2 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c18 --"wikibase:language"--> c20 end