Codes for the paper Hierarchical Contextualized Representation for Named Entity Recognition in AAAI 2020
Python: 3.6 or higher.
PyTorch 0.4.1 or higher.
Prepare training data and word/label embeddings in sample_data.
In training status:
python main.py --config demo.train.config
In test status:
python main.py --config demo.test.config
The configuration file controls the network structure, I/O, training setting and hyperparameters.
-
BERT embeddings
We use the tool to gennerate the BERT embedding for NER.
Our pre-trained model is put in lstmcrf.model.
If you use this software for research, please cite our paper as follows:
@inproceedings{luo2019hierarchical,
title={Hierarchical Contextualized Representation for Named Entity Recognition},
author={Luo, Ying and Xiao, Fengshun and Zhao, Hai},
booktitle = "the Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI-2020)",
year = "2020",
}
The code in this repository and portions of this README are based on NCRF++.