9std::string inPath =
"../data/FB15K/";
10std::string outPath =
"../data/FB15K/";
11std::string ent_file =
"";
12std::string rel_file =
"";
13std::string train_file =
"";
14std::string valid_file =
"";
15std::string test_file =
"";
17extern "C" void setInPath(
char *path) {
18 INT len = strlen(path);
20 for (INT i = 0; i < len; i++)
21 inPath = inPath + path[i];
22 printf(
"Input Files Path : %s\n", inPath.c_str());
25extern "C" void setOutPath(
char *path) {
26 INT len = strlen(path);
28 for (INT i = 0; i < len; i++)
29 outPath = outPath + path[i];
30 printf(
"Output Files Path : %s\n", outPath.c_str());
33extern "C" void setTrainPath(
char *path) {
34 INT len = strlen(path);
36 for (INT i = 0; i < len; i++)
37 train_file = train_file + path[i];
38 printf(
"Training Files Path : %s\n", train_file.c_str());
41extern "C" void setValidPath(
char *path) {
42 INT len = strlen(path);
44 for (INT i = 0; i < len; i++)
45 valid_file = valid_file + path[i];
46 printf(
"Valid Files Path : %s\n", valid_file.c_str());
49extern "C" void setTestPath(
char *path) {
50 INT len = strlen(path);
52 for (INT i = 0; i < len; i++)
53 test_file = test_file + path[i];
54 printf(
"Test Files Path : %s\n", test_file.c_str());
57extern "C" void setEntPath(
char *path) {
58 INT len = strlen(path);
60 for (INT i = 0; i < len; i++)
61 ent_file = ent_file + path[i];
62 printf(
"Entity Files Path : %s\n", ent_file.c_str());
65extern "C" void setRelPath(
char *path) {
66 INT len = strlen(path);
68 for (INT i = 0; i < len; i++)
69 rel_file = rel_file + path[i];
70 printf(
"Relation Files Path : %s\n", rel_file.c_str());
79extern "C" void setWorkThreads(INT threads) { workThreads = threads; }
81extern "C" INT getWorkThreads() {
return workThreads; }
94extern "C" INT getEntityTotal() {
return entityTotal; }
96extern "C" INT getRelationTotal() {
return relationTotal; }
98extern "C" INT getTripleTotal() {
return tripleTotal; }
100extern "C" INT getTrainTotal() {
return trainTotal; }
102extern "C" INT getTestTotal() {
return testTotal; }
104extern "C" INT getValidTotal() {
return validTotal; }
111extern "C" void setBern(INT con) { bernFlag = con; }