Giter Site home page Giter Site logo

izuna385 / pubtator-multiprocess-parser Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.34 MB

Specifically for Entity Linking. Quick demo with MedMentions and NCBI datasets is also included.

Home Page: https://qiita.com/izuna385/items/d673694d25b2cf4efb89

License: MIT License

Python 91.03% Shell 7.27% Dockerfile 1.70%
natural-language-processing spacy allennlp pubtator bioinformatics entity-linking entity-disambiguation

pubtator-multiprocess-parser's Introduction

Multiprocessing PubTator Parsing for Entity Linking

Quick Starts with MedMentions, BC5CDR and NCBI-dataset

$ git clone https://github.com/izuna385/PubTator-Multiprocess-Parser.git
$ cd PubTator-Multiprocess-Parser
$ docker build -t multiprocess_pubtator .
$ docker run -itd multiprocess_pubtator /bin/bash

# In container
$ sh ./scripts/quick_start_Med_full.sh # for MedMentions
  • You can run quick_start_NCBI_full.sh, too. If so, before running, make pickled_doc_dir empty.

  • Note: If you use Mac, do brew install wget before running above script.

Description

How to run

  • Note: The following steps are entirely automated.

    After building container, run sh ./scripts/quick_start_[dataset_name]_full.sh

1. Place PubTator format files to the ./dataset/

  • corpus_pubtator.txt, corpus_pubtator_pmids_trng.txt, corpus_pubtator_pmids_dev.txt, and corpus_pubtator_pmids_test.txt must be placed there.

2. run

python3 main.py

3. Check

  • Each Pubtator documents is preprocessed and dumped to ./dataset/**pmid**.pkl

    The format is as the below.

    {'title':title,  
     'abst':abst,
     'title_plus_abst': title_plus_abst,
     'pubmed_id': pubmed_id,
     'entities': entities,
     'split_sentence': splitted_sentence,
     'if_txt_length_is_changed_flag':if_txt_lenght_is_changed_flag,
     'lines':lines,
     'lines_lemma':lines_lemma
    }
    
    • The Key component is 'lines', in which all information for entity linking is included.
  • Each document takes about 100sec for preprocessing, under en_core_sci_md model.

  • Under 24 core cpus and en_core_sci_md model, ~10GB RAM is needed.

LISENCE

MIT

pubtator-multiprocess-parser's People

Contributors

izuna385 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

zhangbeibei1991

pubtator-multiprocess-parser's Issues

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.