asahi417 commited on
Commit
15e7e2d
1 Parent(s): 7c61c20
Files changed (3) hide show
  1. data/train.jsonl +2 -2
  2. data/valid.jsonl +2 -2
  3. process.py +1 -0
data/train.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:82446ec2cb00f4d66ad37b699a404b5980d366488e49b23a9f55e3dcc3f604af
3
- size 32277
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88c4c441d96ac0a6065fded94f59a153403a84125b5b17adfa1f3041167063fe
3
+ size 32356
data/valid.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7093b17813ae66c8206d9dcf1a6757376db8811956ee350ea1669a4b2313725b
3
- size 11205
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bcf4fe7d80519ace7c49aa558eac0f775413656f3c0fbb5ae01a085db34c6a3
3
+ size 11284
process.py CHANGED
@@ -63,6 +63,7 @@ def get_data(n_sample: int = 10, v_rate: float = 0.2, n_sample_max: int = 10):
63
  all_negative_t = {}
64
  for i in files_scale:
65
  relation_id = i.split('-')[-1].replace('.txt', '')
 
66
  with open(f'{path_answer}/{i}', 'r') as f:
67
  lines_answer = [l.replace('"', '').split('\t') for l in f.read().split('\n') if not l.startswith('#') and len(l)]
68
  relation_type = list(set(list(zip(*lines_answer))[-1]))
 
63
  all_negative_t = {}
64
  for i in files_scale:
65
  relation_id = i.split('-')[-1].replace('.txt', '')
66
+ relation_id = f"{relation_id[:-1]}/{relation_id[-1]}"
67
  with open(f'{path_answer}/{i}', 'r') as f:
68
  lines_answer = [l.replace('"', '').split('\t') for l in f.read().split('\n') if not l.startswith('#') and len(l)]
69
  relation_type = list(set(list(zip(*lines_answer))[-1]))