Code Monkey home page Code Monkey logo

citationhunt's Introduction

CitationHunt

CitationHunt is a simple tool for finding unsourced statements on Wikipedia in different languages. It is hosted at https://tools.wmflabs.org/citationhunt/.

This repository contains the full server and client code. The scripts/ directory contains all the scripts used for processing Wikipedia dumps. Hopefully they will be illustrative and reusable for similar applications.

Developing

The run-tests.sh script will run all tests for you. You may want to install it as a pre-push hook on git:

ln -s ../../run-tests.sh .git/hooks/pre-push

Running

It's highly recommended that you use a virtualenv for running CitationHunt:

$ virtualenv ch-venv
$ cd ch-venv
$ . bin/activate

Dependencies are managed via a requirements.txt file:

$ git clone https://github.com/eggpi/citationhunt
$ cd citationhunt
$ pip install -r requirements.txt

Once all dependencies are installed, just run app.py and point your browser to localhost:5000:

$ DEBUG=1 python app.py

Adding DEBUG=1 to the environment will run the server in Flask's debug mode and enable HTTP access (the default is to redirect all URLs to HTTPS, which causes certificate errors when running locally).

On Tools Labs

CitationHunt can be installed on Wikimedia's Tools Labs using its specialized support for Python uwsgi applications.

After logging in to login.tools.wmflabs.org, run the following commands to create the directory structure and enter the virtualenv:

$ mkdir www/python/
$ virtualenv www/python/venv/
$ . www/python/venv/bin/activate

Now, clone this repository, point uwsgi to it and install the dependencies:

$ git clone https://github.com/eggpi/citationhunt.git
$ ln -s ../../citationhunt www/python/src
$ pip install -r citationhunt/requirements.txt

and start the webservice:

$ webservice2 uwsgi-python start

You will also want to schedule a cron job to automatically update the database as new dumps are released. See scripts/README.md for more information.

citationhunt's People

Watchers

 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.