changed to input ids
Browse files- ref_seg_ger.py +2 -0
ref_seg_ger.py
CHANGED
@@ -232,6 +232,8 @@ class RefSeg(datasets.GeneratorBasedBuilder):
|
|
232 |
input_ids.append(input_id)
|
233 |
labels.append('O')
|
234 |
elif len(tokenized_input) == 1:
|
|
|
|
|
235 |
input_ids.append(tokenized_input[0])
|
236 |
if row['tag'] == 'O':
|
237 |
labels.append(row['tag'])
|
|
|
232 |
input_ids.append(input_id)
|
233 |
labels.append('O')
|
234 |
elif len(tokenized_input) == 1:
|
235 |
+
if tokenized_input == '':
|
236 |
+
continue
|
237 |
input_ids.append(tokenized_input[0])
|
238 |
if row['tag'] == 'O':
|
239 |
labels.append(row['tag'])
|