gsarti commited on
Commit
559c814
1 Parent(s): 354abb4

Strip ending and fix ref path

Browse files
Files changed (1) hide show
  1. wmt_vat.py +3 -3
wmt_vat.py CHANGED
@@ -144,10 +144,10 @@ class WmtVat(datasets.GeneratorBasedBuilder):
144
  with open(meta_path, encoding="utf-8") as meta:
145
  ids = json.load(meta)[pair]
146
  with open(src_path, encoding="utf-8") as src:
147
- with open(src_path, encoding="utf-8") as ref:
148
  for id_, (src_ex, ref_ex, orig_idx) in enumerate(zip(src, ref, ids)):
149
  yield id_, {
150
  "orig_id": orig_idx,
151
- "source": src_ex,
152
- "reference": ref_ex,
153
  }
 
144
  with open(meta_path, encoding="utf-8") as meta:
145
  ids = json.load(meta)[pair]
146
  with open(src_path, encoding="utf-8") as src:
147
+ with open(ref_path, encoding="utf-8") as ref:
148
  for id_, (src_ex, ref_ex, orig_idx) in enumerate(zip(src, ref, ids)):
149
  yield id_, {
150
  "orig_id": orig_idx,
151
+ "source": src_ex.strip(),
152
+ "reference": ref_ex.strip(),
153
  }