qanastek commited on
Commit
a9a26d9
1 Parent(s): 89f5571
Files changed (1) hide show
  1. ELRC-Medical-V2.py +5 -1
ELRC-Medical-V2.py CHANGED
@@ -91,6 +91,8 @@ class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
91
 
92
  logger.info("⏳ Generating examples from = %s", filepath)
93
 
 
 
94
  with open(filepath, encoding="utf-8") as f:
95
 
96
  for id_, row in enumerate(csv.reader(f, delimiter=',')):
@@ -98,9 +100,11 @@ class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
98
  if id_ == 0:
99
  continue
100
 
101
- yield id_, {
102
  "doc_id": int(row[0]),
103
  "lang": str(row[1]),
104
  "source_text": str(row[2]),
105
  "target_text": str(row[3])
106
  }
 
 
 
91
 
92
  logger.info("⏳ Generating examples from = %s", filepath)
93
 
94
+ key_ = 0
95
+
96
  with open(filepath, encoding="utf-8") as f:
97
 
98
  for id_, row in enumerate(csv.reader(f, delimiter=',')):
 
100
  if id_ == 0:
101
  continue
102
 
103
+ yield key_, {
104
  "doc_id": int(row[0]),
105
  "lang": str(row[1]),
106
  "source_text": str(row[2]),
107
  "target_text": str(row[3])
108
  }
109
+
110
+ key_ += 1