MrPotato commited on
Commit
199d391
·
1 Parent(s): 9d5caef

changed to input ids

Browse files
Files changed (1) hide show
  1. ref_seg_ger.py +2 -0
ref_seg_ger.py CHANGED
@@ -221,6 +221,8 @@ class RefSeg(datasets.GeneratorBasedBuilder):
221
  input_ids.append(tokenized_input[0])
222
  labels.append(row['tag'] + '-' + row['label'])
223
  for input_id in tokenized_input[1:]:
 
 
224
  input_ids.append(input_id)
225
  labels.append('I-' + row['label'])
226
  elif row['tag'] == 'I':
 
221
  input_ids.append(tokenized_input[0])
222
  labels.append(row['tag'] + '-' + row['label'])
223
  for input_id in tokenized_input[1:]:
224
+ if input_id == '':
225
+ continue
226
  input_ids.append(input_id)
227
  labels.append('I-' + row['label'])
228
  elif row['tag'] == 'I':