Update process.py
Browse files- process.py +2 -1
process.py
CHANGED
@@ -84,4 +84,5 @@ df = df[[count[p] >= 3 for p in df['predicate']]]
|
|
84 |
print(f"[remove rare predicate] : {len(df)} triples, {len(df['predicate'].unique())} predicates")
|
85 |
|
86 |
with open(f"data/t_rex.filter.jsonl", 'w') as f:
|
87 |
-
|
|
|
|
84 |
print(f"[remove rare predicate] : {len(df)} triples, {len(df['predicate'].unique())} predicates")
|
85 |
|
86 |
with open(f"data/t_rex.filter.jsonl", 'w') as f:
|
87 |
+
for _, i in df.iterrows():
|
88 |
+
f.write(json.dumps(i.to_dict() + '\n'))
|