Keras Implementation of the BiLSTM-CRF model as described in https://guillaumegenthial.github.io/.
For the PyTorch implementation (with ELMO) please refer to this link.
-
Requirements:
a. Packages: Anaconda, TensorFlow, Keras
b. Data: Train, valid and test datasets in CoNLL 2003 NER format.
c. Glove 300B embeddings (optional) -
Configure Settings:
a. Change settings in model/config.py
b. Main settings to change: File directories, model hyperparameters etc. -
Build Data:
a. Run build_data.py
i. Builds embedding dictionary, text file of words, chars tags, as well as idx to word and idx to char mapping for the model to read -
Train Model:
a. Run train_keras.py -
Test Model:
a. Run evaluate_keras.py
b. Evaluates on test set. Also accepts other arguments to predict on custom string