def load_data(self, data_dir, data_type="train", reverse=False):
with open("%s%s.txt" % (data_dir, data_type), "r") as f:
data = f.read().strip().split("\n")
data = [i.split("") for i in data]
if reverse:
data += [[i[2], i[1]+"_reverse", i[0]] for i in data]
return data
Are your sure the data is data = [i.split("") for i in data] not data = [i.split("\t") for i in data], your data is splited by "\t", but you used space, if I use data = [i.split("\t") for i in data], I can not get the result you report in your paper about FB15k-237, can you explain it?
def load_data(self, data_dir, data_type="train", reverse=False): with open("%s%s.txt" % (data_dir, data_type), "r") as f: data = f.read().strip().split("\n") data = [i.split("") for i in data] if reverse: data += [[i[2], i[1]+"_reverse", i[0]] for i in data] return data
Are your sure the data is data = [i.split("") for i in data] not data = [i.split("\t") for i in data], your data is splited by "\t", but you used space, if I use data = [i.split("\t") for i in data], I can not get the result you report in your paper about FB15k-237, can you explain it?