eespie
eespie

Reputation: 77

QLever Wikidata Query not returning names

I'm trying to surface subclasses of a Wikidata class in QLever. The query is returning QIDs but not the labels of the entities.

I've tried looking through examples on the Wikidata query service and on Qlever, but none of these are working.

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?item ?name WHERE {
  {
    SELECT DISTINCT ?item WHERE {
      ?item p:P279 ?statement0.
      ?statement0 (ps:P279/(wdt:P279*)) wd:Q2424752.
      ?item rdfs:label ?name.
  MINUS { ?item a <http://www.w3.org/ns/lemon/ontolex#LexicalSense> }
  MINUS { ?item a <http://www.w3.org/ns/lemon/ontolex#LexicalEntry> }
  MINUS { ?item a <http://www.w3.org/ns/lemon/ontolex#Lexeme> }
    }
  }
}

Upvotes: 0

Views: 103

Answers (0)

Related Questions