wikidata

sparql query on wikidata

落花浮王杯 提交于 2019-12-31 05:23:10
问题 i am very new to sparql and i am trying to run 3 queries on wikidata: Persons who are not painters and who are students of painters. Persons who are not painters and who are academic offspring or children of painters (note: an academic offspring of a person P is somebody who is/was a student of P , or a student of a student of P , or .... ). People who are academic offspring of themselves. i got stuck on the first one, i tried: SELECT DISTINCT ?human ?humanLabel WHERE { ?human wdt:P31 wd:Q5.

Get all Wikidata items that are an instance of a given item

心不动则不痛 提交于 2019-12-30 06:27:48
问题 Wikidata has an item called smartphone model. I want to get all instances of it. QUESTION: How to get the identifiers of the instances programmatically, using the live server? Preferably not including false positives that show up in WhatLinksHere but are in the "Wikidata:" namespace rather than the main namespace. 回答1: Your question specifies the "Mediawiki API" but this is not possible. Wikidata has a SPARQL query service at https://query.wikidata.org The query that you want is: PREFIX wd:

Federated SPARQL query in dbpedia and wikidata: Few questions

让人想犯罪 __ 提交于 2019-12-25 00:28:24
问题 I have following query: # endpoint used: https://query.wikidata.org/ # # PREFIX wd: <http://www.wikidata.org/entity/> # PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/resource/> SELECT DISTINCT ?musicianLabel WHERE { { # *** dbpedia *** SERVICE <http://dbpedia.org/sparql> { #SERVICE <http://lod.openlinksw.com/sparql> { ?musician a dbo:Person . { # person, who has musical genre xy ?musician dbo:genre ?genre . }

Why can't I seem to read an entire compressed file from a URL stream?

♀尐吖头ヾ 提交于 2019-12-24 22:53:19
问题 I'm trying to parse Wiktionary dumps on the fly, directly from the URL, in Java. The Wiki dumps are distributed as compressed BZIP2 files, and I am using the following approach to attempt to parse them: String fileURL = "https://dumps.wikimedia.org/cswiktionary/20171120/cswiktionary-20171120-pages-articles-multistream.xml.bz2"; URL bz2 = new URL(fileURL); BufferedInputStream bis = new BufferedInputStream(bz2.openStream()); CompressorInputStream input = new CompressorStreamFactory()

Federation query on Dbpedia and Wikidata

江枫思渺然 提交于 2019-12-24 20:44:44
问题 I'm doing federation query exercise. I want the list of films that stars with leonardio di caprio and also the list of directors that worked with him. I have to design federated SPARQL query over Wikidata and Dbpedia. I have to run the query through FEDx. Here's the query. This is done in Eclipse. Also tested on the wikidata endpoint. PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbr: <http:/

Some cities aren't instances of city or big city? Odd behaviour of Wikidata

别说谁变了你拦得住时间么 提交于 2019-12-24 20:27:00
问题 While examining the results of the official example query "Continents, countries, regions and capitals" (on https://query.wikidata.org/, limited to Germany for your convenience here: link), I noticed that some capitals of German federal states were missing. For example Wiesbaden as capital of Hesse. I noticed that Wiesbaden is an instance of big city , but not of city (see https://www.wikidata.org/wiki/Q1721), in contrast to some other cities. I was able to alleviate the problem by also

Wikidata Dumps - Long QIDs

时光怂恿深爱的人放手 提交于 2019-12-24 15:13:23
问题 While playing with the dump, I came across many entries like the following: http://www.wikidata.org/entity/Q12258SCD97A47E-A0CA-453F-B01A-DEE8829139BF http://www.wikidata.org/entity/P646v "/m/021821" . what does the Q12258SCD97A47E-A0CA-453F-B01A-DEE8829139BF stand for? it seems to be a QID followed by something else. What does the property: P646v stands for, it doesn't seem to be valid? 回答1: Each Wikidata item has statements, and each statement consists of a statement property and one or

Validate language code for Wikimedia languages [closed]

*爱你&永不变心* 提交于 2019-12-24 10:47:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I have a shell script that uses Wikidata Query Service (WDQS) to get required data. The SPARQL query that run WDQS takes input parameter language code. Is there a way that I can check in shell script if the input language code is a valid Wikimedia language code as the first column data in below link https://www

Wikidata sparql query returns 0 result

余生长醉 提交于 2019-12-24 10:24:21
问题 I’m new to query languages and linked data so thanks a lot for the help. I also have a similar question about sparql on dbpedia dbpedia sparql query returns 0 result I would like to look up all the art movements in wikidata with the associated artists (founder/inventor/creator, known for), date start, date end, country. Here is my query: PREFIX wdno: <http://www.wikidata.org/prop/novalue/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?art ?artLabel ?start ?end

finding super classes of an entity in SPARQL

无人久伴 提交于 2019-12-24 09:13:09
问题 I want to make a Name Entity Recognizer using wikipedia Data, I need to get all the super classes of a word to see in which category (Place, Human, Organization or None) the word is. I surfed the Internet a lot and find some pages like : SPARQL query to find all sub classes and a super class of a given class which when I execute the query results "No matching records found" even with the word mentioned in the page and trying other namespaces. and: Extracting hierarchy for dbpedia entity using