gsarti commited on
Commit
e977d95
1 Parent(s): 5fa2041

Fix yielding

Browse files
Files changed (1) hide show
  1. itacola.py +4 -5
itacola.py CHANGED
@@ -139,8 +139,7 @@ class ItaCola(datasets.GeneratorBasedBuilder):
139
  fields = row.strip().split("\t")
140
  if len(fields) > 5:
141
  fields, ex_split = fields[:-1], fields[-1]
142
- if ex_split.strip() != split:
143
- continue
144
- yield id_, {
145
- k:v.strip() for k,v in zip(features, fields)
146
- }
 
139
  fields = row.strip().split("\t")
140
  if len(fields) > 5:
141
  fields, ex_split = fields[:-1], fields[-1]
142
+ if ex_split is None or ex_split.strip() == split:
143
+ yield id_, {
144
+ k:v.strip() for k,v in zip(features, fields)
145
+ }