-- code for EMNLP 2023 paper: Controllable Contrastive Generation for Multilingual Biomedical Entity Linking
python>=3.7
pytorch>=1.6
fairseq>=0.10
transformers>=4.2 (optional for inference of GENRE)
you can go here to know more about fairseq.
--
1.download train data (We will upload the data later), and put it to the folder "data/origin_data and data/cl_data".
2.Run the file "train_lang_type.sh" for training to obtain the model into folder "model/finetune_lang_type".
3.Run the file "train_cl.sh for contrastive learning and fine-tuning"
4.Run gener_predict_typelist.py to predict the result.
5.Run acc.py to calculated result indicators.