wikidata

Getting only english property value

元气小坏坏 提交于 2021-02-11 17:37:30
问题 I am trying to get a list countries including the english short names: # get a list countries with the corresponding ISO code PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wikibase: <http://wikiba.se/ontology#> SELECT ?country ?countryLabel ?shortName (MAX(?pop) as ?population) ?coord ?isocode WHERE { # instance of country ?country wdt:P31 wd:Q3624078. OPTIONAL { ?country rdfs:label

Retrieve linked wikidata entities having a wikipedia page

泄露秘密 提交于 2021-02-10 20:37:50
问题 I want to query wikidata by free text or by category, to return entities who has a corresponding wikipedia page. For each page (or for a selected page) I want to fetch all the linked wikidata entities who have a corresponding wikipedia article. Note that: for each wikipedia page and linked pages, I want to fetch the corresponding Wikidata Id a linked wikidata entity may exist on other wikipedias, not necessarily in the queried language (e.g. a page in French History is available in multiple

Retrieve linked wikidata entities having a wikipedia page

痞子三分冷 提交于 2021-02-10 20:32:05
问题 I want to query wikidata by free text or by category, to return entities who has a corresponding wikipedia page. For each page (or for a selected page) I want to fetch all the linked wikidata entities who have a corresponding wikipedia article. Note that: for each wikipedia page and linked pages, I want to fetch the corresponding Wikidata Id a linked wikidata entity may exist on other wikipedias, not necessarily in the queried language (e.g. a page in French History is available in multiple

how to programmatically get all available information from a Wikidata entity?

怎甘沉沦 提交于 2021-02-08 06:52:22
问题 I'm really new to wikidata. I just figured that wikidata uses a lot of reification. Suppose we want to get all information available for Obama. If we are going to do it from DBpedia, we would just use a simple query: select * where {<http://dbpedia.org/resource/Barack_Obama> ?p ?o .} This would return all the properties and values with Obama being the subject. Essentially the result is the same as this page: http://dbpedia.org/page/Barack_Obama while the query result is in a format I needed.

how to programmatically get all available information from a Wikidata entity?

*爱你&永不变心* 提交于 2021-02-08 06:51:39
问题 I'm really new to wikidata. I just figured that wikidata uses a lot of reification. Suppose we want to get all information available for Obama. If we are going to do it from DBpedia, we would just use a simple query: select * where {<http://dbpedia.org/resource/Barack_Obama> ?p ?o .} This would return all the properties and values with Obama being the subject. Essentially the result is the same as this page: http://dbpedia.org/page/Barack_Obama while the query result is in a format I needed.

how to programmatically get all available information from a Wikidata entity?

此生再无相见时 提交于 2021-02-08 06:50:17
问题 I'm really new to wikidata. I just figured that wikidata uses a lot of reification. Suppose we want to get all information available for Obama. If we are going to do it from DBpedia, we would just use a simple query: select * where {<http://dbpedia.org/resource/Barack_Obama> ?p ?o .} This would return all the properties and values with Obama being the subject. Essentially the result is the same as this page: http://dbpedia.org/page/Barack_Obama while the query result is in a format I needed.

How to reliably get the image used in the Wikipedia Infobox?

大憨熊 提交于 2021-02-07 22:42:20
问题 How do I (reliably) get the main image(s) used in the Wikipedia Infobox from the API? This question has been asked before and the accepted answer admits that it is just a guess. Subsequent answers seem like a hack, at best and don't return the correct image. For instance, the Jimi Hendrix Wikipedia entry uses "File:Jimi Hendrix 1967.png" as the main image in the InfoBox. The updated answers suggest using this url but for Jimi Hendrix (and other topics) it often returns the wrong image. If I

How to reliably get the image used in the Wikipedia Infobox?

人盡茶涼 提交于 2021-02-07 22:42:19
问题 How do I (reliably) get the main image(s) used in the Wikipedia Infobox from the API? This question has been asked before and the accepted answer admits that it is just a guess. Subsequent answers seem like a hack, at best and don't return the correct image. For instance, the Jimi Hendrix Wikipedia entry uses "File:Jimi Hendrix 1967.png" as the main image in the InfoBox. The updated answers suggest using this url but for Jimi Hendrix (and other topics) it often returns the wrong image. If I

Can ISO 8601 represent a date such as “Summer 2011”?

本秂侑毒 提交于 2020-12-12 07:05:30
问题 Can ISO 8601 represent a date such as "Summer 2011"? The closest I can think of is "2011-07" or fallback to "2011". Of course if you are allowed to make use of time intervals you could use "2011-06-01/2011-08-31", but I am interested in possibilities that can be used in Wikidata and I don't thing the time interval solution can be used there. 来源: https://stackoverflow.com/questions/42468714/can-iso-8601-represent-a-date-such-as-summer-2011