This repo contains the source code and dataset for the following paper:
Att-ChemdNER uses the following dependencies:
To train a basic BiLSTM-CRF model, you need to provide the file of the training set, development set,testing set and word embedding model, and run the train.py script:
python train.py --train trainfile --dev devfile --test testfile --pre_emb word_embedding.model
To train our Att-BiLSTM-CRF model, you need to provide the file of the training set, development set,testing set and word embedding model, and run the AttenTrain.py script:
python AttenTrain.py --train trainfile --dev devfile --test testfile --pre_emb word_embedding.model
Recognize the chemical entities from the documents using the pretrained BiLSTM-CRF model, and you need to provide the pretrained model, inputfile and outputfile:
python tagger.py --model BiLSTM-CRF.model --input inputfile --output outputfile
The inputfile should contain one document by line, and they have to be tokenized.
Recognize the chemical entities from the documents using the pretrained Att-BiLSTM-CRF model, and you need to provide the pretrained model, inputfile and outputfile:
python Atten_tagger.py --model Att-BiLSTM-CRF.model --input inputfile --output outputfile
The inputfile should contain one document by line, and they have to be tokenized.