cdminix commited on
Commit
44c3aea
·
1 Parent(s): 44a5db7

fix padding subword labeling

Browse files
Files changed (1) hide show
  1. iwslt2011.py +7 -7
iwslt2011.py CHANGED
@@ -144,7 +144,7 @@ class IWSLT11(datasets.GeneratorBasedBuilder):
144
  if isinstance(label_subword, str):
145
  if 'ignore' == label_subword.lower():
146
  label_subword = LabelSubword.IGNORE
147
- if 'none' == label_subword.lower():
148
  label_subword = LabelSubword.NONE
149
  kwargs['label_subword'] = label_subword
150
  super(IWSLT11, self).__init__(*args, **kwargs)
@@ -204,12 +204,12 @@ class IWSLT11(datasets.GeneratorBasedBuilder):
204
  ]
205
  else:
206
  return [
207
- # datasets.SplitGenerator(
208
- # name=datasets.Split.TRAIN,
209
- # gen_kwargs={
210
- # "filepath": files["train"]
211
- # },
212
- # ),
213
  datasets.SplitGenerator(
214
  name=datasets.Split.VALIDATION,
215
  gen_kwargs={
 
144
  if isinstance(label_subword, str):
145
  if 'ignore' == label_subword.lower():
146
  label_subword = LabelSubword.IGNORE
147
+ elif 'none' == label_subword.lower():
148
  label_subword = LabelSubword.NONE
149
  kwargs['label_subword'] = label_subword
150
  super(IWSLT11, self).__init__(*args, **kwargs)
 
204
  ]
205
  else:
206
  return [
207
+ datasets.SplitGenerator(
208
+ name=datasets.Split.TRAIN,
209
+ gen_kwargs={
210
+ "filepath": files["train"]
211
+ },
212
+ ),
213
  datasets.SplitGenerator(
214
  name=datasets.Split.VALIDATION,
215
  gen_kwargs={