Giter Club home page Giter Club logo

bert-crf-for-bionlp-ost2019-agac-task1's Introduction

BERT-CRF for BioNLP-OST2019 AGAC-Task1

How to Cite us ?

Please cite follow work, if you use this code:
Yuxing Wang, Kaiyin Zhou, Mina Gachloo, Jingbo Xia*. An Overview of the Active Gene Annotation Corpus and the BioNLP OST 2019 AGAC Track Tasks. BioNLP Open Shared Task 2019, workshop in EMNLP-IJCNLP 2019. Page: 62-71, Hong Kong, 2019.

Virtual Environment

You can build a virtual environment for project operation.

# Building a virtual environment
pip3 install virtualenv
pip3 install virtualenvwrapper

virtualenv -p /usr/local/bin/python3.6 $env_name --clear  

# active venv.
source $env_name/bin/activate  

# deactive venv.
deactivate

Requirements

pip3 install -r requirements.txt

If you cannot download torch automatically through requirements.txt, you can delete the torch version information and get the command line of torch installation from the torch official website. Note that the installed torch version needs to be the same as that in requirenemts.txt.

OSX

pip3 install torch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2

Linux and Windos

# CUDA 11.0
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

# CUDA 10.2
pip install torch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2

# CUDA 10.1
pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

# CUDA 9.2
pip install torch==1.7.1+cu92 torchvision==0.8.2+cu92 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

# CPU only
pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

Default Run

Model training and evaluation

python3 main.py

modify hyperparameters
You can modify the model hyperparameters by editing the config.py file.
vi config.py

Data

label.txt contains all the labels involved in the data set, as well as the labels corresponding to [CLS], [SEP] and [Padding].
train_input.txt, test_input.txt train_input.txt, test_input.txt files contain training data and test data in BIO format.

data/label.txt
data/train_input.txt
data/test_input.txt

Evaluation

The current model evaluation uses the Conlleval.pl script. You can view the details of the model evaluation results through logging/conlleval.log
Best Model: (On test set)

Model Accuracy Precision Recall F1-score
BERT+CRF+AGAC.V3 95.7730 54.6274 56.4596 55.5284
BioBERT (WordPiece)+CRF+AGAC.V3 94.4856 87.1869 88.7542 87.9635

Reference

  1. Conlleval.py https://github.com/sighsmile/conlleval
  2. Conlleval.pl https://www.clips.uantwerpen.be/conll2000/chunking/output.html
  3. BioNLP OST-2019 AGAC Task https://sites.google.com/view/bionlp-ost19-agac-track
  4. Wang, Yuxing, et al. "An Overview of the Active Gene Annotation Corpus and the BioNLP OST 2019 AGAC Track Tasks." Proceedings of The 5th Workshop on BioNLP Open Shared Tasks. 2019.

bert-crf-for-bionlp-ost2019-agac-task1's People

Contributors

yaoxinzhi avatar

Stargazers

 avatar  avatar

Watchers

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