从 SPARQL 请求获取 @language 标签

0 sparql dbpedia

我使用http://dbpedia.org/sparql来执行此请求:

PREFIX res: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?trad
where{
res:Apple
rdfs:label ?trad
}
Run Code Online (Sandbox Code Playgroud)

它返回给我以下结果:

如何在单独的列中获取语言标签(@ar、@es、@fr)?

我在 w3.org 上看到了一些可能有帮助的内容:

有任何想法吗?

AKS*_*KSW 6

SPARQL 文档包含有关 SPARQL 的所有内容,因此,它始终是最适合深入研究的来源。

就您而言,有关RDF 术语语言的部分很有用。

PREFIX res: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?trad (lang(?trad) as ?lang) WHERE {
  res:Apple rdfs:label ?trad
}
Run Code Online (Sandbox Code Playgroud)