wikidata

Filter skyscrapers higher than 500 meters in Wikidata

我们两清 提交于 2019-12-11 07:02:55
问题 I try to construct a SPARQL query, where I get a list of skyscrapers with a height of more then 500 meters. I realized, that the property height (P2048) is measured in different units (meter, foot, centimeter). This would not be a problem for me to calculate the different units into meters. But my problem is to figure out, that unit is used for the property height. So my question: how can I get the unit for the property height? My query so far, where ?unit is just empty: SELECT ?skyscraper

Query both DBPedia and Wikidata at the same time?

☆樱花仙子☆ 提交于 2019-12-11 05:45:31
问题 Is there a way to query both DBPedia and Wikidata at the same time? Like any way to query all the people in DBPedia and Wikidata at the same time? PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX dbo: <http://dbpedia.org/ontology/> { SELECT ?person WHERE { ?person wdt:P31 wd:Q5 } limit 100 } UNION { SELECT * { ?person a dbo:Person } } Try here 回答1: Thanks to @AKSW I got the answer to my question. The Federated SPARQL queries would do the

How to retrieve the categorical details in wikidata

自古美人都是妖i 提交于 2019-12-11 04:24:22
问题 I have a list of instances as follows. myinstances = ['word2vec', 'tf-idf', 'dijkstra's algorithm'] For each myinstance in the above list, I want to find: 1. What are the other instances of `myinstance`'s category (i.e. only one hop) 2. What are the instances of `myinstance`'s category's category (i.e. two hops) For example, if we consider myinstance = word2vec What are the other instances of myinstance 's category (i.e. only one hop)? As shown in the figure below the other instances of its

Wikidata SPARQL query with label not working

只谈情不闲聊 提交于 2019-12-11 04:11:20
问题 I can't understand why with this query I can't get movement and genre labels: SELECT DISTINCT ?item ?itemLabel ?value ?inception ?creatorLabel ?image (group_concat(?genreLabel; separator=", ") AS ?genres) (group_concat(?movementLabel; separator=", ") AS ?movements) WHERE { ?item wdt:P4610 ?value; wdt:P18 ?image. #with an image OPTIONAL { ?item wdt:P571 ?inception; #optionally with creationdate wdt:P170 ?creator; #Optionally with creator wdt:P136 ?genre; wdt:P135 ?movement. } SERVICE wikibase

Parsing returns from AltLabel in a SPARQL query

只愿长相守 提交于 2019-12-11 02:35:25
问题 In a Wikidata SPARQL query such as the following, I want to be able to use a custom delimiter for the returns for ?placeOfBirthAltLabel . The problem is that some values under ?placeOfBirthAltLabel contain commas e.g. synonyms for "New York" include "New York, USA" as a single entry. However, as the returns are comma delimited, this single entry will be parsed as two separate strings. So in other words I need the return to be [New York, USA ; NYC ; NYC, USA ] as opposed to [New York, USA, NYC

wikidata query missing out countries in Europe

别说谁变了你拦得住时间么 提交于 2019-12-11 01:38:23
问题 I am using the following query against wikidata; SELECT ?country ?countryLabel WHERE { ?country wdt:P30 wd:Q46; wdt:P31 wd:Q6256. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } where P30 is continent; Q46 is Europe; P31 is Instance Of and Q6256 is country; https://query.wikidata.org/#SELECT%20%3Fcountry%20%3FcountryLabel%0A%20%20%20%20%20%20WHERE%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%3Fcountry%20%20%20wdt%3AP30%20wd%3AQ46%3B%0A%20%20%20%20%20

Wikidata on local Blazegraph : Expected an RDF value here, found '' [line 1]

吃可爱长大的小学妹 提交于 2019-12-11 01:26:01
问题 We (Thomas and Wolfgang) have installed locally wikidata and blazegraph following the instruction here : https://github.com/wikimedia/wikidata-query-rdf/blob/master/docs/getting-started.md The mvn package command was successful [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent ............................................. SUCCESS [ 54.103 s] [INFO] Shared code ........................................ SUCCESS [ 23.085 s

Failed to install wikidata-query-rdf / Blazegraph

情到浓时终转凉″ 提交于 2019-12-11 01:04:14
问题 I am trying to install wikidata-query-rdf (https://github.com/wikimedia/wikidata-query-rdf) and there is a failure with Blazegraph : git clone https://gerrit.wikimedia.org/r/wikidata/query/rdf wikidata-query-rdf cd wikidata-query-rdf sudo mvn install I first get this kind of warning : [WARNING] The POM for com.blazegraph:bigdata-cache:jar:2.1.5-SNAPSHOT is missing, no dependency information available And then : [INFO] ------------------------------------------------------------------------

Using Wikidata label service in federated queries

醉酒当歌 提交于 2019-12-10 19:48:37
问题 I'm wondering if it is possible to use Wikidata label service in a federated query. E.g., the following query # Query from a local SPARQL enpoint select ?item ?itemLabel where { SERVICE <https://query.wikidata.org/sparql> { ?item wdt:P31 wd:Q146. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } } returns empty ?itemLabel s. How can I get also ?itemLabel s in my resultset? 回答1: You could also use the manual mode, it's just one line more in your case: PREFIX

Duplicated results from Wikidata

元气小坏坏 提交于 2019-12-10 18:39:47
问题 I created the following SPARQL query to Wikidata. And the result of this query are records related to states in Germany. But as you can see, results are occurring four times in a row (you can test it here: https://query.wikidata.org/). I supposed that there is a problem with geo coordinates and languages but I can't resolve it anyway. What is wrong with this query and how can I fix it to receive a result without repetition? PREFIX p: <http://www.wikidata.org/prop/> PREFIX schema: <http:/