Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
asahi417 commited on
Commit
6c8d646
1 Parent(s): d8cb616

Update process.py

Browse files
Files changed (1) hide show
  1. 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
- f.write('\n'.join([json.dumps(i.to_dict()) for _, i in df.iterrows()]))
 
 
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'))