Git Product home page Git Product logo

wikidata-sparql-history's Introduction

SPARQL endpoint for Wikidata history

This repository provides a SPARQL endpoint for Wikidata history, allowing to do queries like "count the number of humans in Wikidata in 2015" or "how many contributors have added values for the sex or gender property".

A documentation page is available on Wikidata.org.

Build Status

Developer documentation

To setup a working endpoint do:

  • Compile the Java program mvn package
  • Download the Wikidata history dumps to a directory mkdir dumps && cd dumps && bash ../download_wd_history.sh. Warning: it requires around 600GB of disk.
  • Preprocess the dump to get all revision metadata and triples annotated with their insertions and deletions (takes a few days and all your CPU cores): java -server -jar target/sparql-endpoint-0.1-SNAPSHOT.jar -preprocess
  • Build database indexes: java -server -jar target/sparql-endpoint-0.1-SNAPSHOT.jar -load. This task is mostly I/O bounded. A (big) fast SSD helps a lot.
  • Start the web server java -server -classpath target/sparql-endpoint-0.1-SNAPSHOT.jar org.wikidata.history.web.Main

License

Copyright (C) 2019 Thomas Pellissier Tanon.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

Citation

If you want to cite this software in an academic publication, please use:

Pellissier Tanon T., Suchanek F. (2019) Querying the Edit History of Wikidata. In: Hitzler P. et al. (eds) The Semantic Web: ESWC 2019 Satellite Events. ESWC 2019. Lecture Notes in Computer Science, vol 11762. Springer, Cham

In BibTex:

@inproceedings{wikdiataHistoryQueryService,
  author    = {Thomas Pellissier Tanon and Fabian M. Suchanek},
  title     = {Querying the Edit History of Wikidata},
  booktitle = {The Semantic Web: {ESWC} 2019 Satellite Events - {ESWC} 2019 Satellite
               Events, Portoro{\v{z}}, Slovenia, June 2-6, 2019, Revised Selected
               Papers},
  pages     = {161--166},
  year      = {2019},
  doi       = {10.1007/978-3-030-32327-1\_32}
}

wikidata-sparql-history's People

Contributors

daniel-mietchen avatar dependabot[bot] avatar tpt avatar vrandezo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wikidata-sparql-history's Issues

Properties missing from the indices throw org.wikidata.history.sparql.NotSupportedValueException: Not able to numerically encode

When I run a query that uses a property that is missing from the indices, such as rdfs:label, the server returns the error org.wikidata.history.sparql.NotSupportedValueException: Not able to numerically encode: http://www.w3.org/2000/01/rdf-schema#label instead of responding with empty bindings. For example, the error can be replicated with the following query:

PREFIX hist: <http://wikiba.se/history/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

ASK {
  [] hist:additions ?g .
  GRAPH ?g {
    [] rdfs:label [] .
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.