qanastek commited on
Commit
7b9250e
1 Parent(s): f1f0a39
Files changed (1) hide show
  1. ELRC-Medical-V2.py +4 -5
ELRC-Medical-V2.py CHANGED
@@ -91,15 +91,11 @@ class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
91
  }
92
  ),
93
  ]
94
-
95
 
96
  def _generate_examples(self, filepath, split):
97
 
98
  logger.info("⏳ Generating examples from = %s", filepath)
99
 
100
- src, target = str(row[1]).split("-")
101
- pair = (src, target)
102
-
103
  key_ = 0
104
 
105
  with open(filepath, encoding="utf-8") as f:
@@ -109,11 +105,14 @@ class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
109
  if id_ == 0:
110
  continue
111
 
 
 
 
112
  yield key_, {
113
  "translation": {
114
  src: str(row[2]).strip(),
115
  target: str(row[3]).strip(),
116
- }
117
  }
118
 
119
  # yield key_, {
 
91
  }
92
  ),
93
  ]
 
94
 
95
  def _generate_examples(self, filepath, split):
96
 
97
  logger.info("⏳ Generating examples from = %s", filepath)
98
 
 
 
 
99
  key_ = 0
100
 
101
  with open(filepath, encoding="utf-8") as f:
 
105
  if id_ == 0:
106
  continue
107
 
108
+ # Get langue pair
109
+ src, target = str(row[1]).split("-")
110
+
111
  yield key_, {
112
  "translation": {
113
  src: str(row[2]).strip(),
114
  target: str(row[3]).strip(),
115
+ },
116
  }
117
 
118
  # yield key_, {