Skip to main content

A collection of scripts and utilities for extracting citations to academic literature from Wikipedia's XML database dumps.

Project description

This project contains a utility for extracting academic citation identifiers.

NOTE: As one of its dependencies (Mediawiki-Utilities) requires Python 3 so does mwcites.

pip install mwcites

Usage

There’s really only one utility in this package called mwcitations.

$ mwcitations extract enwiki-20150112-pages-meta-history*.xml*.bz2 > citations.tsv

Documentation

Documentation is provided $ mwcitations extract -h.

Extracts academic citations from articles from the history of Wikipedia
articles by processing a pages-meta-history XML dump and matching regular
expressions to revision content.

Currently supported identifiers include:

 * PubMed
 * DOI
 * ISBN
 * arXiv

Outputs a TSV file with the following fields:

 * page_id: The identifier of the Wikipedia article (int), e.g. 1325125
 * page_title: The title of the Wikipedia article (utf-8), e.g. Club cell
 * rev_id: The Wikipedia revision where the citation was first added (int),
           e.g. 282470030
 * timestamp: The timestamp of the revision where the citation was first
              added. (ISO 8601 datetime), e.g. 2009-04-08T01:52:20Z
 * type: The type of identifier, e.g. pmid, pmcid, doi, isbn or arxiv
 * id: The id of the cited scholarly article (utf-8),
       e.g 10.1183/09031936.00213411

Usage:
    mwcites extract -h | --help
    mwcites extract <dump_file>...

Options:
    -h --help        Shows this documentation

Project details


Release history Release notifications

This version
History Node

0.2.0

History Node

0.1.2

History Node

0.1.0

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mwcites-0.2.0.tar.gz (10.5 kB) Copy SHA256 hash SHA256 Source None Apr 6, 2015
mwcites-0.2.0.zip (17.7 kB) Copy SHA256 hash SHA256 Source None Apr 6, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page