Skip to content

mukil/dm4-wikidata-toolkit

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

DeepaMehta 4 Wikidata Toolkit

This plugin provides the functionality to transform selected entities from a wikidata JSON dump file into DeepaMehta 4 Topics and to expose custom queries over those by means of a REST API.

For a detailed and complete description of what this module does, how it works and can be customized please read this blogpost.

Note: This plugin makes use of the WikidataToolkit and therefore requires Java 1.7 or higher.

Requirements

DeepaMehta 4 is a platform for collaboration and knowledge management. https://github.com/jri/deepamehta

Download & Installation

You can find a bundle file for installation at http://download.deepamehta.de.

Copy the downloaded dm45-wikidata-toolkit-0.2.jar file into your DeepaMehta bundle repository and re-start your DeepaMehta installation.

Usage

1 Download one of the json dumps from http://dumps.wikimedia.org/other/wikidata/.

2 Find (, probably edit) and use the commands provided by any topic of type "Wikidata Dump Import". It provides two commands to

  • Start importing (Create topics) or removing wikidata entities as configured (Delete topics)
  • Control aspects (via Edit of the "to-be-imported" data-values (like language) and relations (like websites)

REST API

To get the REST API to respond correctly you need to associate/map the Wikidata Property topics your API endpoint shall understand to the desired Association Type. To get started you can copy this configuration.

You can do GET requests like the following and return a simple list of JSON topics/assocations:

  • /wdtk/list/P108/Q9531/
    Responding with a list of employees of of the British Broadcasting Corporation
  • /wdtk/list/P108/Q9531/with/P27/Q183/
    Responding with a list of employees of BBC which are also citizens of Germany
  • /wdtk/list/claims/P108 Responding with a list of all claims made using the employee of property (naming both players)
  • /wdtk/list/claims/P27/Q183 Responding with a list of all claims made using the citizen of property where one player is the Country Germany

Here on the geo-fronts branch we're developing new experimental endpoints, three current are:

  • /wdtk/list/items/iso-coded
    Responding with a list of wikidata items we know the Three Letter IS Codes for.
  • /wdtk/list/items/osm-relations Responding with a list of wikidata items we know the OSM Relation IDs for.
  • /wdtk/list/items/nuts-coded Responding with a list of wikidata items we know the NUTS code for

No optimizations done yet, just operating by deepamehta4 standard means (but it maybe noteworthy that @jri already solved the super-node problem for the dm4 storage layer).

Research & Documentation

You can find some background infos (but outdated details) on the project page in the DeepaMehta Community Trac at https://trac.deepamehta.de/wiki/WikidataSearchPlugin%20

GNU Public License

This software is released under the terms of the GNU General Public License in Version 3.0, 2007. You can find a copy of that in the root directory of this repository or read it here.

Version History

0.3, UPCOMING

  • Generic implementation of a Geodata Processor (no DM 4 Topic Types involved)
  • Reduced number of transactions involved to "some thousands" of topics
  • Introduced three new custom Association Types (OSM Relation ID, NUTS Code, ISO Code)
  • Qualifying some type of claims
  • Compatible with DM 4.6

0.2, 14. April 2015

  • Importing Persons, Institutions, Cities and Countries (using the instance of property) with a label, description and a webpage URL (if provided as "official website")
  • Importing of five custom relation-types between persons, institutions, cities and countries:<\br> namely: citizen of, student of, employee of, mentor of, affiliated with
  • Compatible with DM 4.5

Author: Malte Reißig, 2014-15

About

The WikidataToolkit as a DeepaMehta 4 OSGi Plugin and a RESTful microservice.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published