Questions tagged [wikidata]

Wikidata is a free, collaborative, multilingual database, collecting structured data to provide support for Wikipedia, Wikimedia Commons, and the other wikis of the Wikimedia movement. One can retrieve all data using Wikidata Query Service (Wikidata SPARQL endpoint) or Wikidata API (Wikidata MediaWiki API extension). If you are completely new both to SPARQL and MediaWiki API, please consider to ask your question on opendata.stackexchange.com.

Wikidata is a free, collaboratively edited knowledge base operated by the Wikimedia Foundation. It is intended to provide a common source of certain data types (for example, birth dates) which can be used by Wikimedia projects such as Wikipedia. This is similar to the way Wikimedia Commons provides storage for media files and access to those files for all Wikimedia projects.

Concepts:

Wikidata is a document-oriented database, focused around items. Each item represents a topic (or an administrative page used to maintain Wikipedia) and is identified by a unique number, prefixed with the letter Q — for example, the item for the topic Politics is Q7163. This enables the basic information required to identify the topic the item covers to be translated without favouring any one language.

Information is added to items by creating statements. Statements take the form of key-value pairs, with each statement consisting of a property (the key) and a value linked to the property.

Wikidata statement

Further reference:

887 questions
0
votes
2 answers

Meaning of "*" and "/" in SPARQL

I want to know the meaning of * and / in SPARQL. If you check this example from Wikidata, you will see that a / and a * are used in here: ?item wdt:P361* wd:Q362 . ?item wdt:P31/wdt:P279* wd:Q178561 . What are they for? Why are they used? Thank…
Jack Green
  • 141
  • 2
  • 12
0
votes
1 answer

SPARQL - fetching data from dbpedia and wikidata

How can i fetch result from both wikidata and dbpedia SELECT ?film WHERE { ?film wdt:P31 wd:Q11424; wdt:P915 wd:Q506250. }
0
votes
0 answers

Collapse multiple results into one

I have the following Wikidata SPARQL query: SELECT ?game ?gameLabel ?enwiki ?genreLabel ?devLabel ?publisherLabel ?platformLabel ?dateYear WHERE { ?game wdt:P31 wd:Q7889; wdt:P136 wd:Q744038. OPTIONAL { ?enwiki schema:about ?game; …
posfan12
  • 2,541
  • 8
  • 35
  • 57
0
votes
0 answers

How to combine 2 endpoints in the same time with ARC2?

I'm using ARC2 in order to execute SPARQL queries on DBpedia and get the results as a HTML Web page (a table). Thus the script for this purpose is written in PHP and SPARQL. But I would also like to integrate "in the same time" another endpoint in…
Olscream
  • 127
  • 1
  • 14
0
votes
1 answer

SPARQL Wikidata - How to combine two queries to retrieve object information

I have following problem which I explain on an example: I want to retrieve the object Berlin from the triplet Germany - capital - object. I must use labels, because those are inputs in my program. Following query gives me back the propertyLabel…
grajkowski
  • 349
  • 1
  • 3
  • 14
0
votes
1 answer

Latent Semantic Indexation with gensim

In order to use the Latent semantic indexation method from gensim, I want to begin with a small "classique" example like : import logging, gensim, bz2 id2word = gensim.corpora.Dictionary.load_from_text('wiki_en_wordids.txt') mm =…
0
votes
0 answers

Getting the correct information from differently formulated queries

Howdo people, I'm to put together a limited Q&A program that will allow the user to query Wikidata using SPARQL with very specific/limited query structures. I've got the program going, but I'm running into issues when entering queries that are…
Fillask
  • 23
  • 3
0
votes
1 answer

SPARQL for getting movies list with proper attributes ordered

I'm trying to get list of movies in a specific year (just say 1990) with each movie and it's attributes. I tried different ways to get SPARQL but couldn't. How do I group genres into single column? The format I would want is with some of the…
Venkat Reddy
  • 1,046
  • 1
  • 8
  • 13
0
votes
0 answers

SPARQL Apache Jena - Execution Limit on queries in DBpedia?

I'm dealing with a problem that I can't execute the same query (see Example below) multiple times against DBpedia, because the execution freezes after like 4-5 queries. The thing is, with the same Apache Jena Code, I can execute hundreds of same…
grajkowski
  • 349
  • 1
  • 3
  • 14
0
votes
1 answer

getting only instance of human entries in wikidata

Is there a way to get only higher confidence wikidata entries? For example how do I tell that this is not an article about a person: https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q19069838&language=en&limit=1 The instanceof attribute…
Captain Jack sparrow
  • 959
  • 1
  • 13
  • 28
0
votes
0 answers

How to show places with coordinates and multilanguage labels in Wikidata SPARQL?

I'm trying to retrieve a list of points of interests of a given class or subclass (museum, skyscraper, etc.) in a given city and to display for each of them: The list of translated labels in all known languages in a single row (for eg. "Statue of…
Davide
  • 764
  • 1
  • 6
  • 18
0
votes
0 answers

How do I get the "children" of "part of" property? / Accessing hierarchical structures

I want to get all military operations that are part of (P361) WW2, I don't get, e.g., Case Blue, because it is only a part of the Soviet German War but not part of WW2, but the Soviet German War itself is part of WW2. So what do I need to do to the…
datorum
  • 47
  • 5
0
votes
1 answer

How to use "participant" vs. "participant of" correctly?

I trying to figure out the correct usage of "participant of" (P1344) and participant (P710). As sample I want the participants of the US Civil War. The first statement: SELECT ?label WHERE { wd:Q8676 wdt:P710 ?subj. ?subj rdfs:label ?label. …
datorum
  • 47
  • 5
0
votes
2 answers

SPARQL queries with blank-nodes as subjects

I have data like this: [ "0.15"^^xsd:float] .
Scaraffe
  • 5,041
  • 5
  • 21
  • 20
0
votes
0 answers

Save Wikipedia image as an ImageIcon

I'm coding a Java program that provides the user with some info on a given element. For example, the user chooses "Hydrogen," and the program gives some info about Hydrogen. I'd like to take the "thumbnail" image from the Wikipedia article…