Page MenuHomePhabricator

wdqs-streaming-consumer: fix prefixes in lexemes query
Closed, ResolvedPublic1 Estimated Story Points

Description

The consumer queries the lexemes in the triple store using the following query:

# Get lexeme IDs
SELECT ?lex WHERE {
  VALUES ?entity {
     %entityList%
  }
  ?entity (ontolex:lexicalForm|ontolex:sense) ?lex .
}

Qlever requires the definition of all prefixes, thus, it replies with the following error:

2026-06-11 10:48:42.128 - ERROR: Invalid SPARQL query: Prefix ontolex was not registered using a PREFIX declaration
2026-06-11 10:48:42.128 - ERROR: # Get lexeme IDs
SELECT ?lex WHERE {
  VALUES ?entity {
     <http://www.wikidata.org/entity/Q106464459> <http://www.wikidata.org/entity/Q120582646>
  }
  ?entity (ESC[1mESC[4mESC[31montolex:lexicalFormESC[0m|ontolex:sense) ?lex .
}

There might be other pre-defined queries which do not declare all prefixes. Those need to be fixed also. In addition, these query definitions currently live in wdqs-common (in resources) (maybe an oversight during the git repo split). The files should be moved over to the consumer where they are actually used.

AC:

  • Ensure that all pre-defined queries in the consumer are Qlever-compatible, ie. define all used prefixes
  • Move query files (RdfRepository.GetLexemes.sparql and friends) from wdqs-common into wdqs-streaming-consumer
  • New version of wdqs-common without the query files mentioned above released and used in wdqs-streaming-consumer

Event Timeline

trueg changed the task status from Open to In Progress.Jun 11 2026, 11:35 AM
trueg claimed this task.
trueg triaged this task as High priority.
trueg set the point value for this task to 1.Jun 11 2026, 11:49 AM