如何查询维基数据以获取所有标签包含单词的项目? 我尝试了这个但没有成功;它什么也没检索到。
SELECT ?item ?itemLabel WHERE {
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
?item rdfs:label ?itemLabel.
}
FILTER(CONTAINS(LCASE(?itemLabel), "keyword"))
}
LIMIT 1000
最佳答案
是的,您可以按标签搜索,例如:
SELECT distinct ?item ?itemLabel ?itemDescription WHERE{
?item ?label "Something"@en.
?article schema:about ?item .
?article schema:inLanguage "en" .
?article schema:isPartOf <https://en.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
查看Query page .
关于sparql - 如何使用标签查询维基数据项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38527828/