维基数据标签在 SPARQL 查询浏览器中解析但不使用 GET 请求

Wikidata labels resolved in SPARQL query browser but not with GET request

我在维基数据查询浏览器中运行这个查询:

SELECT ?child ?childLabel
WHERE
{
# ?child  father   Bach
  ?child wdt:P22 wd:Q1339.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}

结果如预期,一首table巴赫children的名字。但是,如果我使用代码工具提供的 URL,我会得到 children 的未解析 Q 代码,而不是它们的名称。另外,如果我要求这样的描述:

SELECT ?child ?childLabel ?childDescription
WHERE
{
# ?child  father   Bach
  ?child wdt:P22 wd:Q1339.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}

我在查询浏览器生成的 table 中得到描述,但如果我使用提供的 URL 而不是代码服务,则不会。

我在 wikibase 标签服务中看到了暗示错综复杂的问题,但我对这个主题的了解还不足以理解答案。

非常感谢任何帮助!

来自User Manual

The Wikidata Query Service website auto-magically replaces [AUTO_LANGUAGE] with the language code of current user's interface. For example, if the user's UI is in French, the SPARQL's code bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" will be converted to bd:serviceParam wikibase:language "fr,en" before being sent to the query service.

服务器不知道 [AUTO_LANGUAGE] 是什么。将 [AUTO_LANGUAGE] 替换为 en.

More info


是的,The word "AUTO" is too broad and confusing.