Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LANG support or work-around #1312

Open
WolfgangFahl opened this issue Mar 25, 2024 · 4 comments
Open

LANG support or work-around #1312

WolfgangFahl opened this issue Mar 25, 2024 · 4 comments

Comments

@WolfgangFahl
Copy link

WolfgangFahl commented Mar 25, 2024

http://qlever.wikidata.dbis.rwth-aachen.de/wikidata/tVCucU

Not supported: The LANG function is currently only supported in the construct FILTER(LANG(?variable) = "langtag" by QLever

isn't there a workaround? why does e.g. http://qlever.wikidata.dbis.rwth-aachen.de/wikidata/k1889D not work?

@hannahbast
Copy link
Member

@WolfgangFahl It is problematic when you post links to an endpoint that is down most of the time. I clicked on your links several times over the last week and always received an 404.

@WolfgangFahl
Copy link
Author

@hannahbast - i didn't now that the links are not persistent - where can i file a ticket for or find the documentation to enable such a feature?

@joka921
Copy link
Member

joka921 commented May 3, 2024

@WolfgangFahl
The official qlever-ui has a database that keeps the short links alive. But as it seems you are not using this but are using your own UI, so making these links persistent is your responsibility. (The persistent query links are not a feature of the QLever backend, but of the UI which is used in top of it).

As for your actual question: I recently had an idea for an efficient implementation of the general case of the LANG function which might happen as a byproduct of more prominent feature, so this might appear some time in the future.

@Rdataflow
Copy link

@joka921 it would be great to see proper LANG() support

I'd like to sponsor some simple test cases here https://qlever.cs.uni-freiburg.de/wikidata/CzM2Kb
HTH for your upcoming work 🤞

# test cases for `LANG()` implementation
SELECT * WHERE {
  # test case 1 - check returns "" if literal has no language tag 
  VALUES ?something { "aLiteralWithoutLanguageTag" }
  FILTER(LANG(?something) = "")

  # test case 2 - check returns the language tag of literal, if it has one
  VALUES ?anotherthing { "anotherLiteralWithLanguageTagDE"@de }
  FILTER(LANG(?anotherthing) = "de")

  # test case 3 - check returns the language tag of literal, if it has one
  BIND(STRLANG("anotherLiteralWithLanguageTagEN", "en") AS ?anotherthing2)
  FILTER(LANG(?anotherthing2) = "en")
}

# expected output: (according to the w3c recommendation)
# ?something                  ?anotherthing                    ?anotherthing2
# aLiteralWithoutLanguageTag  anotherLiteralWithLanguageTagDE  anotherLiteralWithLanguageTagEN

# actual output: (qlever:latest as of "2024-06-15"^^xsd:date)
# ?something                  ?anotherthing
# [[empty set]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants