Update create_split.py
Browse files- create_split.py +7 -0
create_split.py
CHANGED
@@ -59,3 +59,10 @@ with open(f"data/t_rex.filter_unified.min_entity_5.train.jsonl", "w") as f:
|
|
59 |
f.write('\n'.join([json.dumps(i) for i in data_train]))
|
60 |
with open(f"data/t_rex.filter_unified.min_entity_5.validation.jsonl", "w") as f:
|
61 |
f.write('\n'.join([json.dumps(i) for i in data_valid]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
f.write('\n'.join([json.dumps(i) for i in data_train]))
|
60 |
with open(f"data/t_rex.filter_unified.min_entity_5.validation.jsonl", "w") as f:
|
61 |
f.write('\n'.join([json.dumps(i) for i in data_valid]))
|
62 |
+
|
63 |
+
df_train = pd.DataFrame(data_train)
|
64 |
+
df_valid = pd.DataFrame(data_valid)
|
65 |
+
df_test = pd.DataFrame(data_test)
|
66 |
+
print(f"[train]: {len(df_train)} triples, {len(df_train['predicate'].unique())}")
|
67 |
+
print(f"[validation]: {len(df_valid)} triples, {len(df_valid['predicate'].unique())}")
|
68 |
+
print(f"[test]: {len(df_test)} triples, {len(df_test['predicate'].unique())}")
|