Views
No views yet
pip install InstructorEmbedding1from InstructorEmbedding import INSTRUCTOR
2model = INSTRUCTOR('yinghy2018/CoRTEx')
3term = "fever"
4term_definition = "xxxx"
5instruction = "Represent the biomedical term for identifying synonymous terms. Input: "
6instruction2 = "Represent the meaning of the biomedical term for retrieval. Input: "
7embeddings = model.encode([[instruction,term]])
8embeddings = model.encode([[instruction2,term_definition]])
9print(embeddings)1@article{ying2024cortex,
2 title={CoRTEx: contrastive learning for representing terms via explanations with applications on constructing biomedical knowledge graphs},
3 author={Ying, Huaiyuan and Zhao, Zhengyun and Zhao, Yang and Zeng, Sihang and Yu, Sheng},
4 journal={Journal of the American Medical Informatics Association},
5 pages={ocae115},
6 year={2024},
7 publisher={Oxford University Press}
8}