CoRTEx / README.md
yinghy2018's picture
Upload README.md
dc979a5 verified
# CoRTEx
Publish the model for the paper "CoRTEx: Contrastive Learning for Representing Terms via Explanations with Applications on Constructing Biomedical Knowledge Graphs"
Because of license of UMLS, we cannot share our training data. So we only provide our model and how to use our model. If you need the training details please contact yinghy22@mails.tsinghua.edu.cn
## Quick start
<hr />
## Installation
```bash
pip install InstructorEmbedding
```
## Compute your customized embeddings
Then you can use the model like this to calculate domain-specific and task-aware embeddings:
```python
from InstructorEmbedding import INSTRUCTOR
model = INSTRUCTOR('yinghy2018/CoRTEx')
term = "fever"
term_definition = "xxxx"
instruction = "Represent the biomedical term for identifying synonymous terms. Input: "
instruction2 = "Represent the meaning of the biomedical term for retrieval. Input: "
embeddings = model.encode([[instruction,term]])
embeddings = model.encode([[instruction2,term_definition]])
print(embeddings)
```
## Cite
```bibtex
@article{ying2024cortex,
title={CoRTEx: contrastive learning for representing terms via explanations with applications on constructing biomedical knowledge graphs},
author={Ying, Huaiyuan and Zhao, Zhengyun and Zhao, Yang and Zeng, Sihang and Yu, Sheng},
journal={Journal of the American Medical Informatics Association},
pages={ocae115},
year={2024},
publisher={Oxford University Press}
}
```