changed to input ids
Browse files- ref_seg_ger.py +2 -2
ref_seg_ger.py
CHANGED
@@ -228,13 +228,13 @@ class RefSeg(datasets.GeneratorBasedBuilder):
|
|
228 |
input_ids.append(input_id)
|
229 |
labels.append('I-' + row['label'])
|
230 |
else:
|
231 |
-
if tokenized_input == '':
|
232 |
continue
|
233 |
for input_id in tokenized_input:
|
234 |
input_ids.append(input_id)
|
235 |
labels.append('O')
|
236 |
elif len(tokenized_input) == 1:
|
237 |
-
if tokenized_input == '':
|
238 |
continue
|
239 |
input_ids.append(tokenized_input[0])
|
240 |
if row['tag'] == 'O':
|
|
|
228 |
input_ids.append(input_id)
|
229 |
labels.append('I-' + row['label'])
|
230 |
else:
|
231 |
+
if tokenized_input[0] == '':
|
232 |
continue
|
233 |
for input_id in tokenized_input:
|
234 |
input_ids.append(input_id)
|
235 |
labels.append('O')
|
236 |
elif len(tokenized_input) == 1:
|
237 |
+
if tokenized_input[0] == '':
|
238 |
continue
|
239 |
input_ids.append(tokenized_input[0])
|
240 |
if row['tag'] == 'O':
|