Pytorch implementation of Attention and Edge-Label Guided Graph Convolutional Networks for Named Entity Recognition
EMNLP 2022 Edge-Label Guided Graph Convolutional Networks for Named Entity Recognition
Python 3.7
Pytorch 1.4.0
Transformers 3.3.1
CUDA 10.1, 10.2
Model | Dataset | F1 |
---|---|---|
Syn-LSTM-CRF | Chinese | 78.51 |
Syn-LSTM-CRF(Our Implementation) | Chinese | 79.10 |
BiLSTM-AELGCN-CRF | Chinese | 79.44 |
Our AELGNC Implementation | Chinese | 79.04 |
Model | Dataset | F1 |
---|---|---|
Syn-LSTM-CRF | Onotnotes | 89.04 |
Syn-LSTM-CRF(Our Implementation) | Onotnotes | 89.13 |
BiLSTM-AELGCN-CRF | Onotnotes | 89.25 |
Our AELGNC Implementation | Onotnotes | 89.07 |
Firstly, download the embedding files: glove.6B.100d.txt , cc.ca.300.vec, cc.es.300.vec, cc.zh.300.vec, and put the files in the data folder.
By default, the model eval our saved model (without BERT) on SemEval 2010 Task 1 Spanish dataset.
python main.py
To train the model with other datasets:
python main.py --mode=train --dataset=ontonotes --embedding_file=glove.6B.100d.txt
For more detailed usage, please refer to the SynLSTM-for-NER project
The code are created based on the codes of the paper "Dependency-Guided LSTM-CRF Model for Named Entity Recognition", EMNLP 2019 "Better Feature Integration for Named Entity Recognition", NAACL 2021 "Edge-Enhanced Graph Convolution Networks for Event Detection with Syntactic Relation", EMNLP 2020 "Attention Guided Graph Convolutional Networks for Relation Extraction", ACL 2019