A SPARQL query like:
SELECT distinct * where {
?x dc:title ?title .
}
is always returning ?title with a language tag. How to obtain an rdf language string without a language tag, e.g. return "English"@en as "English" only
A SPARQL query like:
SELECT distinct * where {
?x dc:title ?title .
}
is always returning ?title with a language tag. How to obtain an rdf language string without a language tag, e.g. return "English"@en as "English" only
I guess you are willing to show the results from one language only. If that is the case, you can take off the label with:
SELECT distinct ?stripped_title where {
?x dc:title ?title .
BIND (STR(?title) AS ?stripped_title)
}
but it would be meaningful only after you filter your results for the desired language, e.g.
FILTER ( LANG(?title) = "en" )
Alternatively, there might be some confusion in reading the results, for example you might get seemingly duplicating answers, while it just happened that the label is the same in two different languages.
© 2022 - 2024 — McMap. All rights reserved.