Git Product home page Git Product logo

gndzero's Introduction

README

The zeroth prototyp of a GND cache.

Get started

Clone the repo:

$ git clone [email protected]:miku/gndzero.git
$ cd gndzero

Create a virtualenv:

$ mkvirtualenv gndzero
...

Install dependencies (you'll need some C compiler):

$ pip install -r requirements.txt

Copy config.sample.py to config.py and adjust the values:

# TEMPDIR and HOME must reside on the same device
TEMPDIR = '/tmp'
HOME = './data'

Now create the sqlite datebase. This will take a while (download, extract, insert) - about 20-30 minutes:

$ python gndzero.py SqliteDB --local-scheduler

The server

Run the server (development):

$ until python server.py; do echo "Re: (err: $?)" >&2; sleep 0.5; done

Examples:

Compare:

Format the output:

$ curl -s "http://localhost:5000/gnd/4000362-0"|xmllint --format -

Run the (gunicorn) server (production):

$ gunicorn --workers 4 --bind 127.0.0.1:5000 server:app

Notes

The local sqlite3 database is about 12G in size and contains 10004751 rows.


The GNDs form a graph, if occurences of GNDs in the metadata are interpreted as outbound links, hence you can compute a pagerank to find some often referred to concepts. An example output can be found here: https://gist.github.com/miku/7427351

$ time python gndzero.py HumanReadablePageRank --local-scheduler

The pagerank command line program can be found here: https://github.com/miku/gopagerank, with credits due to Thomas Dimson. The overall preprocessing for this takes too long (almost a day), but this is only a prototype.

gndzero's People

Contributors

miku avatar

Watchers

 avatar James Cloos avatar Nico Toerl avatar  avatar

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.