├── Code ├── __init__.py ├── data_process │ ├── TransE.py │ ├── __init__.py │ ├── bert.py │ ├── dataset.py │ ├── gen_anomaly.py │ └── similarity_trainer.py └── models │ ├── __init__.py │ ├── inter_classifier.py │ ├── knowformer.py │ ├── knowformer_encoder.py │ ├── nbert.py │ ├── nformer.py │ └── utils.py ├── LICENSE ├── README.md ├── dataset ├── fb15k-237 │ ├── dev.txt │ ├── support │ │ ├── entity.json │ │ └── relation.json │ ├── test.txt │ └── train.txt └── wn18rr │ ├── dev.txt │ ├── support │ ├── entity.json │ └── relation.json │ ├── test.txt │ └── train.txt ├── pretrain_bert.py ├── train_CCA.py └── utils.py /Code/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/__init__.py -------------------------------------------------------------------------------- /Code/data_process/TransE.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/data_process/TransE.py -------------------------------------------------------------------------------- /Code/data_process/__init__.py: -------------------------------------------------------------------------------- 1 | from .dataset import KGCDataModule 2 | -------------------------------------------------------------------------------- /Code/data_process/bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/data_process/bert.py -------------------------------------------------------------------------------- /Code/data_process/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/data_process/dataset.py -------------------------------------------------------------------------------- /Code/data_process/gen_anomaly.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/data_process/gen_anomaly.py -------------------------------------------------------------------------------- /Code/data_process/similarity_trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/data_process/similarity_trainer.py -------------------------------------------------------------------------------- /Code/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/models/__init__.py -------------------------------------------------------------------------------- /Code/models/inter_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/models/inter_classifier.py -------------------------------------------------------------------------------- /Code/models/knowformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/models/knowformer.py -------------------------------------------------------------------------------- /Code/models/knowformer_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/models/knowformer_encoder.py -------------------------------------------------------------------------------- /Code/models/nbert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/models/nbert.py -------------------------------------------------------------------------------- /Code/models/nformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/models/nformer.py -------------------------------------------------------------------------------- /Code/models/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/Code/models/utils.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/README.md -------------------------------------------------------------------------------- /dataset/fb15k-237/dev.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/fb15k-237/dev.txt -------------------------------------------------------------------------------- /dataset/fb15k-237/support/entity.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/fb15k-237/support/entity.json -------------------------------------------------------------------------------- /dataset/fb15k-237/support/relation.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/fb15k-237/support/relation.json -------------------------------------------------------------------------------- /dataset/fb15k-237/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/fb15k-237/test.txt -------------------------------------------------------------------------------- /dataset/fb15k-237/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/fb15k-237/train.txt -------------------------------------------------------------------------------- /dataset/wn18rr/dev.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/wn18rr/dev.txt -------------------------------------------------------------------------------- /dataset/wn18rr/support/entity.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/wn18rr/support/entity.json -------------------------------------------------------------------------------- /dataset/wn18rr/support/relation.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/wn18rr/support/relation.json -------------------------------------------------------------------------------- /dataset/wn18rr/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/wn18rr/test.txt -------------------------------------------------------------------------------- /dataset/wn18rr/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/dataset/wn18rr/train.txt -------------------------------------------------------------------------------- /pretrain_bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/pretrain_bert.py -------------------------------------------------------------------------------- /train_CCA.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/train_CCA.py -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nju-websoft/CCA/HEAD/utils.py --------------------------------------------------------------------------------