Page MenuHomePhabricator

Add shortcut to specify labels in label service
Open, LowPublic


I find that even I specify the labels that the label service should provide – usually for some technical reason – I prefer to keep the ?variableLabel pattern, so the extra parameter triples are always ?variable rdfs:label ?variableLabel for several values of ?variable. I think it would be nice to have an abbreviation for this pattern, perhaps something like:

SERVICE wikibase:label {
  bd:serviceParam wikibase:language "en";
                  wikibase:autoLabel ?foo, ?bar, ?baz.

which would be equivalent to:

SERVICE wikibase:label {
  bd:serviceParam wikibase:language "en".
  ?foo rdfs:label ?fooLabel.
  ?bar rdfs:label ?barLabel.
  ?baz rdfs:label ?bazLabel.

What do you think @Smalyshev?

If you’d like, I could try to implement this myself, to get my feet wet in the query service itself :)

Event Timeline

Restricted Application added a project: Discovery. · View Herald TranscriptAug 23 2017, 4:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev triaged this task as Low priority.Sep 25 2017, 12:05 AM
Smalyshev added a project: patch-welcome.

Can be done, by having Optimizer step that rewrites that. Not sure it's a big win, but wouldn't hurt probably.