query-1ab072e2402bf5a37d765491524ceed8
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?en_description
WHERE
{
  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "www.wikidata.org" .
    bd:serviceParam wikibase:api "Search" .
    bd:serviceParam mwapi:srsearch "algebra OR geometry mathematician " .
    bd:serviceParam mwapi:srlimit "max" .
    bd:serviceParam mwapi:srnamespace "0" .
    ?item wikibase:apiOutputItem mwapi:title .
  }
  ?item schema:description ?en_description .
  FILTER (LANG(?en_description) = "en")
  BIND (LCASE(?en_description) AS ?lc_desc)
  FILTER CONTAINS(?lc_desc, "mathematician")
  FILTER (CONTAINS(?lc_desc, "algebra") || CONTAINS(?lc_desc, "geometry"))
  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;
  v2("?en_description"):::projected 
  v3("?item"):::projected 
  v4("?lc_desc")
  c8(["www.wikidata.org"]):::literal 
  c14(["max"]):::literal 
  c16(["0"]):::literal 
  c6(["bd:serviceParam"]):::iri 
  c12(["algebra OR geometry mathematician "]):::literal 
  c10(["Search"]):::literal 
  c22(["#91;AUTO_LANGUAGE#93;,en"]):::literal 
  c18(["mwapi:title"]):::iri 
  f0[["(contains(?lc_desc,'algebra') || contains(?lc_desc,'geometry'))"]]
  f0 --> v4
  f1[["contains(?lc_desc,'mathematician')"]]
  f1 --> v4
  f2[["?en_description = 'en'"]]
  f2 --> v2
  subgraph s1["http://wikiba.se/ontology#mwapi"]
    style s1 stroke-width:4px;
    c6 --"mwapi:endpoint"-->  c8
    c6 --"mwapi:api"-->  c10
    c6 --"mwapi:srsearch"-->  c12
    c6 --"mwapi:srlimit"-->  c14
    c6 --"mwapi:srnamespace"-->  c16
    v3 --"mwapi:apiOutputItem"-->  c18
  end
  v3 --"schema:description"-->  v2
  bind3[/"lower-case(?en_description)"/]
  v2 --o bind3
  bind3 --as--o v4
  subgraph s2["http://wikiba.se/ontology#label"]
    style s2 stroke-width:4px;
    c6 --"mwapi:language"-->  c22
  end