Skip to content

TiantianZhu110/Con2GEN

Repository files navigation

Con2GEN

--     code for EMNLP 2023 paper: Controllable Contrastive Generation for Multilingual Biomedical Entity Linking

#Requirement

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.

How to run the code?

--

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published