Giter Site home page Giter Site logo

n2c2-challenge-2019's Introduction

n2c2 Challenge 2019

This repository contains our contribution to the 2019 n2c2 challenge for track 1 ("n2c2/OHNLP Track on Clinical Semantic Textual Similarity"). The code in this repository can be used to reproduce the results in our paper "Extending BERT for Clinical Semantic Textual Similarity".

How to Use the Code

  • Make sure you have Docker installed on your system.
  • Navigate to the docker directory and build the image: docker build --tag n2c2 .
  • Set the following environment variables:
    models
    └─ pretrained
       ├── document_embeddings
       └── word_embeddings
           ├── bert_models
           │   └── biobert_pretrain_output_all_notes_150000
           │       ├── bert_config.json
           │       ├── bert_model.ckpt.data-00000-of-00001
           │       ├── bert_model.ckpt.index
           │       ├── bert_model.ckpt.meta
           │       ├── graph.pbtxt
           │       ├── pytorch_model.bin
           │       └── vocab.txt
           ├── crawl-300d-2M
           │   ├── crawl-300d-2M.vec
           │   └── model_info.md
           ├── glove.840B.300d
           │   ├── glove.840B.300d.txt
           │   └── model_info.md
           ├── infersent1
           │   ├── infersent1.pkl
           │   └── model_info.md
           └── infersent2
               ├── infersent2.pkl
               └── model_info.md
    
    • NLP_RAW_DATA: path to the directory which ontains the raw challenge data with the following directory structure:
    challenge_data
    └── n2c2
        ├── clinicalSTS2019.test.gs.sim.txt
        ├── clinicalSTS2019.test.txt
        └── clinicalSTS2019.train.txt
    
    • NLP_EXPERIMENT_PATH: path to a directory which is used to store the results from the model.
  • Run the container (also inside the docker folder): docker run --gpus all -it --rm -v ${PWD}/..:/workspace -v $NLP_MODELS_PATH:/mtc/models -v $NLP_RAW_DATA:/mtc/raw -v $NLP_EXPERIMENT_PATH:/mtc/experiment --name n2c2 n2c2
  • You can now execute the file generate_results.py inside the container.
  • If everything was successful, there should now be a subfolder named submission_generation which contains the resulting scores which we report in our paper.

Copyright

Copyright © German Cancer Research Center (DKFZ), Division of Medical Image Computing (MIC). Please make sure that your usage of this code is in compliance with the code license.

n2c2-challenge-2019's People

Contributors

jansellner 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.