ConvE icon indicating copy to clipboard operation
ConvE copied to clipboard

any example of Adding new datasets?

Open ghost opened this issue 5 years ago • 1 comments

hi i wanna test convE on my knowledge graph but i don't know what format should be this graph to be able to load in this model. is there any example code to convert my own graph in the right format?

ghost avatar Jun 13 '20 11:06 ghost

You create a folder with your dataset name. ConvE/data/mydataset and in that folder you have three files: train.txt, valid.txt, test.txt. These files have the format e1\trel\te2 where \t is a tab delimiter. In other words, each file is a tab-delimited CSV file with a triple e1,rel,e2 per row.

Once you have that, you can add your dataset to preprocess.sh or just execute python wrangle_KG.py mydataset. Now you run python main.py --data mydataset --preprocess and you are ready to go!

Let me know if you run into any problems.

TimDettmers avatar Jun 20 '20 13:06 TimDettmers