如何在Wikidata中查询“也称为". [英] How to query Wikidata for "also known as"

查看:136
本文介绍了如何在Wikidata中查询“也称为".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何通过使用别名("查询 Wikidata 也称为).

I would like to know how to query Wikidata by using the alias ("also known as").

现在我正在尝试

SELECT ?item
WHERE
{
?item rdfs:aliases ?alias.
FILTER(CONTAINS(?alias, "Angela Kasner"@en))
}
LIMIT 5

如果我将rdfs:aliases替换为rdfs:labels,这只是一个查询.

This is simply a query that works if I replace rdfs:aliases by rdfs:labels.

我正在尝试此操作,因为 Help:Aliases 表示可以在以下位置搜索别名标签的方式相同,但是我找不到任何其他资源,也找不到示例.

I am trying this, because Help:Aliases says that aliases are searchable in the same way as labels, but I can't find any other resource on that nor can I find an example.

推荐答案

此查询对于有人也称为属性的查询可能会有所帮助:

This query might be helpful for someone querying also known as for properties:

SELECT ?property ?propertyLabel ?propertyDescription (GROUP_CONCAT(DISTINCT(?altLabel); separator = ", ") AS ?altLabel_list) WHERE {
    ?property a wikibase:Property .
    OPTIONAL { ?property skos:altLabel ?altLabel . FILTER (lang(?altLabel) = "en") }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .}
 }
GROUP BY ?property ?propertyLabel ?propertyDescription
LIMIT 5000

这篇关于如何在Wikidata中查询“也称为".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆