来自名称的Wikidata实体值 [英] Wikidata entity value from name
问题描述
例如,如果我想获取Google的页面数据,是否可以根据实体名称获取Wikidata页面信息. 我认为必须使用带有相应实体值的实体"来完成,但是我不确定是否有任何简单的方法来确定实体值.
Is there a way to get Wikidata page information based on the name of the entity for example if I wanted to get page data for Google. I think it has to be done using "entity" with the corresponding entity value however I am not sure of there is any easy way to determine the entity value.
推荐答案
If you want to do this using the API, you would first use wbsearchentities
to find out which entity do you want. For example:
https://www.wikidata. org/w/api.php?action = wbsearchentities& search = Google& language = zh-CN
问题在于存在多个称为"Google"的实体:公司(Google Inc.),搜索引擎(Google Web Search),动词(to google)甚至是Wikipedia歧义消除页面.
The problem with this is that there are multiple entities called "Google": the company (Google Inc.), the search engine (Google Web Search), the verb (to google) and even a Wikipedia disambiguation page.
After you somehow decide which entity to access, use wbgetentities
to actually get the information you want:
https://www.wikidata. org/w/api.php?action = wbgetentities& ids = Q95& languages = zh-CN
或者,如果您不能决定使用哪个实体,则可以同时获取所有实体的信息:
Or, if you can't decide which entity to use, you could get information for all of them at the same time:
>://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q95|Q9366|Q961680|Q1156923&languages=zh-CN
这篇关于来自名称的Wikidata实体值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!