Code Monkey home page Code Monkey logo

metadata-extraction-service's Introduction

Metadata-Extraction-Service

Python scripts including Flask REST app for metadata extraction

PYTHON (2.7) SCRIPTS FOR METADATA EXTRACTION

  1. checkForPublications.py --> Queries pubmed with n days as a parameter to find new publications which have come out in the past n days. Targets specific journals, list can be expanded using journals.txt.

  2. downloadPublications.py --> Downloads publications as pdfs to a folder, takes as input a txt file containing doi numbers or pmids.

    Usage: python downloadPublications.py file.txt directoryToSaveFilesIn/ (optional)

  3. main_top_level.py --> All-in-one script that extracts metadata from PDF using GROBID, enriches using APIs, and inserts into Solr. Each component is modularized (1. Get papers from Journal (Download PDFs if needed) 2. Classify publication 3. Extract metadata from PDF & enrich 4. Insert metadata into Solr)

    Usage: python main_top_level.py -directory pdfDir/ -pushToSolr 1/0 -doiRecords dois.json

    dois.json is obtained automatically from using downloadPublications.py

    Calls the following scripts in order: classifier.py (Still in progress, current accuracy ~80%) pdf_extract.py parse_extracts.py pushToSolr.py

    Dependencies ==>

    Solr instance running at localhost:8983 (if pushing to Solr)

    GROBID (https://github.com/kermitt2/grobid) running on localhost:8080

    Tor and Privoxy for downloading/web scraping (Follow instructions on these pages for Linux and OS X respectively: http://sacharya.com/crawling-anonymously-with-tor-in-python/ and http://www.andrewwatters.com/privoxy/) Tor control port is 9051, set password as 'downloader' in torrc file. If you want to set a different password, please change the python file. Privoxy running on port 8118

    pdftotext

    sudo pip install bs4 git clone git://github.com/aaronsw/pytorctl.git pip install pytorctl/ sudo pip install pycurl sudo pip install xmltodict sudo pip install summa sudo pip install -U nltk (download nltk.tokenize)

    Scipy NumPy Scikit 0.18 dev version

  4. schema.xml and solrconfig.xml --> Configure your local solr server with these files to run the above scripts.

metadata-extraction-service's People

Contributors

singularity9971 avatar vincekyi avatar

Watchers

James Cloos avatar  avatar Brian Bleakley avatar defibull 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.