├── .DS_Store ├── .gitignore ├── .ipynb_checkpoints └── test-checkpoint.ipynb ├── LICENSE.md ├── README.md ├── __pycache__ ├── loss.cpython-36.pyc └── utils.cpython-36.pyc ├── data.py ├── datasets ├── .DS_Store ├── FB13 │ ├── .DS_Store │ ├── entity2id.txt │ ├── head_tail_proportion.pkl │ ├── many_to_many_test.txt │ ├── many_to_one_test.txt │ ├── negtest2id.txt │ ├── negvalid2id.txt │ ├── one_to_many_test.txt │ ├── one_to_one_test.txt │ ├── relation2id.txt │ ├── test2id.txt │ ├── train2id.txt │ ├── triple2id.txt │ └── valid2id.txt ├── FB15k │ ├── .DS_Store │ ├── entity2id.txt │ ├── head_tail_proportion.pkl │ ├── many_to_many_test.txt │ ├── many_to_one_test.txt │ ├── one_to_many_test.txt │ ├── one_to_one_test.txt │ ├── relation2id.txt │ ├── test2id.txt │ ├── train2id.txt │ ├── triple2id.txt │ └── valid2id.txt ├── WN11 │ ├── .DS_Store │ ├── entity2id.txt │ ├── head_tail_proportion.pkl │ ├── many_to_many_test.txt │ ├── many_to_one_test.txt │ ├── negtest2id.txt │ ├── negvalid2id.txt │ ├── one_to_many_test.txt │ ├── one_to_one_test.txt │ ├── relation2id.txt │ ├── test2id.txt │ ├── train2id.txt │ ├── triple2id.txt │ └── valid2id.txt └── WN18 │ ├── .DS_Store │ ├── entity2id.txt │ ├── head_tail_proportion.pkl │ ├── many_to_many_test.txt │ ├── many_to_one_test.txt │ ├── one_to_many_test.txt │ ├── one_to_one_test.txt │ ├── relation2id.txt │ ├── test2id.txt │ ├── train2id.txt │ ├── triple2id.txt │ └── valid2id.txt ├── evaluation.py ├── loss.py ├── model.py ├── projection.py ├── transD_Bernoulli_pytorch.py ├── transD_pytorch.py ├── transE_Bernoulli_pytorch.py ├── transE_pytorch.py ├── transH_Bernoulli_pytorch.py ├── transH_pytorch.py ├── transR_Bernoulli_pytorch.py ├── transR_pytorch.py ├── utils.py └── 中文版使用说明.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/.gitignore -------------------------------------------------------------------------------- /.ipynb_checkpoints/test-checkpoint.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/.ipynb_checkpoints/test-checkpoint.ipynb -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/README.md -------------------------------------------------------------------------------- /__pycache__/loss.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/__pycache__/loss.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/__pycache__/utils.cpython-36.pyc -------------------------------------------------------------------------------- /data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/data.py -------------------------------------------------------------------------------- /datasets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/.DS_Store -------------------------------------------------------------------------------- /datasets/FB13/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/.DS_Store -------------------------------------------------------------------------------- /datasets/FB13/entity2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/entity2id.txt -------------------------------------------------------------------------------- /datasets/FB13/head_tail_proportion.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/head_tail_proportion.pkl -------------------------------------------------------------------------------- /datasets/FB13/many_to_many_test.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /datasets/FB13/many_to_one_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/many_to_one_test.txt -------------------------------------------------------------------------------- /datasets/FB13/negtest2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/negtest2id.txt -------------------------------------------------------------------------------- /datasets/FB13/negvalid2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/negvalid2id.txt -------------------------------------------------------------------------------- /datasets/FB13/one_to_many_test.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /datasets/FB13/one_to_one_test.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /datasets/FB13/relation2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/relation2id.txt -------------------------------------------------------------------------------- /datasets/FB13/test2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/test2id.txt -------------------------------------------------------------------------------- /datasets/FB13/train2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/train2id.txt -------------------------------------------------------------------------------- /datasets/FB13/triple2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/triple2id.txt -------------------------------------------------------------------------------- /datasets/FB13/valid2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB13/valid2id.txt -------------------------------------------------------------------------------- /datasets/FB15k/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/.DS_Store -------------------------------------------------------------------------------- /datasets/FB15k/entity2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/entity2id.txt -------------------------------------------------------------------------------- /datasets/FB15k/head_tail_proportion.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/head_tail_proportion.pkl -------------------------------------------------------------------------------- /datasets/FB15k/many_to_many_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/many_to_many_test.txt -------------------------------------------------------------------------------- /datasets/FB15k/many_to_one_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/many_to_one_test.txt -------------------------------------------------------------------------------- /datasets/FB15k/one_to_many_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/one_to_many_test.txt -------------------------------------------------------------------------------- /datasets/FB15k/one_to_one_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/one_to_one_test.txt -------------------------------------------------------------------------------- /datasets/FB15k/relation2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/relation2id.txt -------------------------------------------------------------------------------- /datasets/FB15k/test2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/test2id.txt -------------------------------------------------------------------------------- /datasets/FB15k/train2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/train2id.txt -------------------------------------------------------------------------------- /datasets/FB15k/triple2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/triple2id.txt -------------------------------------------------------------------------------- /datasets/FB15k/valid2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/FB15k/valid2id.txt -------------------------------------------------------------------------------- /datasets/WN11/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/.DS_Store -------------------------------------------------------------------------------- /datasets/WN11/entity2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/entity2id.txt -------------------------------------------------------------------------------- /datasets/WN11/head_tail_proportion.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/head_tail_proportion.pkl -------------------------------------------------------------------------------- /datasets/WN11/many_to_many_test.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /datasets/WN11/many_to_one_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/many_to_one_test.txt -------------------------------------------------------------------------------- /datasets/WN11/negtest2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/negtest2id.txt -------------------------------------------------------------------------------- /datasets/WN11/negvalid2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/negvalid2id.txt -------------------------------------------------------------------------------- /datasets/WN11/one_to_many_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/one_to_many_test.txt -------------------------------------------------------------------------------- /datasets/WN11/one_to_one_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/one_to_one_test.txt -------------------------------------------------------------------------------- /datasets/WN11/relation2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/relation2id.txt -------------------------------------------------------------------------------- /datasets/WN11/test2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/test2id.txt -------------------------------------------------------------------------------- /datasets/WN11/train2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/train2id.txt -------------------------------------------------------------------------------- /datasets/WN11/triple2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/triple2id.txt -------------------------------------------------------------------------------- /datasets/WN11/valid2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN11/valid2id.txt -------------------------------------------------------------------------------- /datasets/WN18/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/.DS_Store -------------------------------------------------------------------------------- /datasets/WN18/entity2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/entity2id.txt -------------------------------------------------------------------------------- /datasets/WN18/head_tail_proportion.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/head_tail_proportion.pkl -------------------------------------------------------------------------------- /datasets/WN18/many_to_many_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/many_to_many_test.txt -------------------------------------------------------------------------------- /datasets/WN18/many_to_one_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/many_to_one_test.txt -------------------------------------------------------------------------------- /datasets/WN18/one_to_many_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/one_to_many_test.txt -------------------------------------------------------------------------------- /datasets/WN18/one_to_one_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/one_to_one_test.txt -------------------------------------------------------------------------------- /datasets/WN18/relation2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/relation2id.txt -------------------------------------------------------------------------------- /datasets/WN18/test2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/test2id.txt -------------------------------------------------------------------------------- /datasets/WN18/train2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/train2id.txt -------------------------------------------------------------------------------- /datasets/WN18/triple2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/triple2id.txt -------------------------------------------------------------------------------- /datasets/WN18/valid2id.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/datasets/WN18/valid2id.txt -------------------------------------------------------------------------------- /evaluation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/evaluation.py -------------------------------------------------------------------------------- /loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/loss.py -------------------------------------------------------------------------------- /model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/model.py -------------------------------------------------------------------------------- /projection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/projection.py -------------------------------------------------------------------------------- /transD_Bernoulli_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transD_Bernoulli_pytorch.py -------------------------------------------------------------------------------- /transD_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transD_pytorch.py -------------------------------------------------------------------------------- /transE_Bernoulli_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transE_Bernoulli_pytorch.py -------------------------------------------------------------------------------- /transE_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transE_pytorch.py -------------------------------------------------------------------------------- /transH_Bernoulli_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transH_Bernoulli_pytorch.py -------------------------------------------------------------------------------- /transH_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transH_pytorch.py -------------------------------------------------------------------------------- /transR_Bernoulli_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transR_Bernoulli_pytorch.py -------------------------------------------------------------------------------- /transR_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/transR_pytorch.py -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/utils.py -------------------------------------------------------------------------------- /中文版使用说明.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimmywangheng/knowledge_representation_pytorch/HEAD/中文版使用说明.md --------------------------------------------------------------------------------