asahi417 commited on
Commit
b8473ec
1 Parent(s): 5280299

Update process.py

Browse files
Files changed (1) hide show
  1. process.py +0 -7
process.py CHANGED
@@ -65,9 +65,6 @@ if __name__ == '__main__':
65
  for relation, df_p in train_p.groupby('relation'):
66
  if len(df_p) < 2:
67
  continue
68
- if relation in exclude:
69
- continue
70
- print(relation)
71
  f.write(json.dumps({
72
  'relation_type': relation,
73
  'positives': df_p[['head', 'tail']].to_numpy().tolist(),
@@ -78,8 +75,6 @@ if __name__ == '__main__':
78
  for relation, df_p in dev1_p.groupby('relation'):
79
  if len(df_p) < 2:
80
  continue
81
- if relation in exclude:
82
- continue
83
  df_n = dev1_n[dev1_n['relation'] == relation]
84
  f.write(json.dumps({
85
  'relation_type': relation,
@@ -89,8 +84,6 @@ if __name__ == '__main__':
89
  for relation, df_p in dev2_p.groupby('relation'):
90
  if len(df_p) < 2:
91
  continue
92
- if relation in exclude:
93
- continue
94
  df_n = dev2_n[dev2_n['relation'] == relation]
95
  f.write(json.dumps({
96
  'relation_type': relation,
 
65
  for relation, df_p in train_p.groupby('relation'):
66
  if len(df_p) < 2:
67
  continue
 
 
 
68
  f.write(json.dumps({
69
  'relation_type': relation,
70
  'positives': df_p[['head', 'tail']].to_numpy().tolist(),
 
75
  for relation, df_p in dev1_p.groupby('relation'):
76
  if len(df_p) < 2:
77
  continue
 
 
78
  df_n = dev1_n[dev1_n['relation'] == relation]
79
  f.write(json.dumps({
80
  'relation_type': relation,
 
84
  for relation, df_p in dev2_p.groupby('relation'):
85
  if len(df_p) < 2:
86
  continue
 
 
87
  df_n = dev2_n[dev2_n['relation'] == relation]
88
  f.write(json.dumps({
89
  'relation_type': relation,