query-9a13afd075da9af40253f340857b1c57

rq turtle/ttl

ContentAs of 2022/11/22 00:24:00 -05, the query times out. . get the actual count with this SPARQL query), because SPARQL needs to iterate through all the previously obtained items which are more 20,485,52 as of 2022/11/22 00:29:25 -05 ((P31)instance of I've executed the query multiple times and it never finishes, but I think that the logic behind the query would definitively find such items. The most expensive operation is in finding those items that doesn't use

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
SELECT ?item
{
  { {
  SELECT ?item {
     {
  SELECT ?lemma {
    []
      wikibase:lexicalCategory wd:Q1084;
      ontolex:sense?/wdt:P5137/wdt:P279* wd:Q80228;
      wikibase:lemma ?lemma.
  }
}
     {
  SELECT ?item ?label {
    INCLUDE %1.
    ?item rdfs:label ?label.
  }
}
    FILTER(LANG(?label) = LANG(?lemma) &&
           CONTAINS(LCASE(?label), LCASE(?lemma))).
  }
}}
  UNION
  { {
  SELECT ?item {
     {
  SELECT ?lemma {
    []
      wikibase:lexicalCategory wd:Q1084;
      ontolex:sense?/wdt:P5137/wdt:P279* wd:Q80228;
      wikibase:lemma ?lemma.
  }
}
     {
  SELECT ?item ?description {
    ?item schema:description ?description.
  }
}
    FILTER(LANG(?description) = LANG(?lemma) &&
           CONTAINS(LCASE(?description), LCASE(?lemma))).
  }
}}
}

Query found at