Source code and datasets for "MSKETS: Multi-Source Knowledge Enhanced language representation with Type Selection". here
Python == 3.7
Pytorch >= 1.10
transformers >= 4.10.0
dgl == 0.7.2
- Download the
pytorch_model.bin
from [here]( hfl/chinese-roberta-wwm-ext at main (huggingface.co) ), and save it to thepretrained_models/chinese-roberta-wwm-ext/
directory. - Download the
CMeKG and CN-DBpedia
from here(提取码:qaj5), and save it to theknowledge/
directory. - Download the datasets from [here]( 数据集-阿里云天池 (aliyun.com) ), place them in the
datasets/
directory.
- fine-tune on CMeEE:
python train_NER.py
, and predict an answer:python predict_NER.py
- fine-tune on CMeIE:
python train_RE.py
, and predict an answer:python predict_RE.py