changed to input ids
Browse files- ref_seg_ger.py +2 -0
ref_seg_ger.py
CHANGED
@@ -218,6 +218,8 @@ class RefSeg(datasets.GeneratorBasedBuilder):
|
|
218 |
#print(tokenized_input)
|
219 |
if len(tokenized_input) > 1:
|
220 |
if row['tag'] == 'B':
|
|
|
|
|
221 |
input_ids.append(tokenized_input[0])
|
222 |
labels.append(row['tag'] + '-' + row['label'])
|
223 |
for input_id in tokenized_input[1:]:
|
|
|
218 |
#print(tokenized_input)
|
219 |
if len(tokenized_input) > 1:
|
220 |
if row['tag'] == 'B':
|
221 |
+
if tokenized_input[0] == '':
|
222 |
+
continue
|
223 |
input_ids.append(tokenized_input[0])
|
224 |
labels.append(row['tag'] + '-' + row['label'])
|
225 |
for input_id in tokenized_input[1:]:
|