Update cord.py
Browse files
cord.py
CHANGED
@@ -153,9 +153,9 @@ class Cord(datasets.GeneratorBasedBuilder):
|
|
153 |
bboxes.append(box)
|
154 |
|
155 |
if item['category'] in replacing_labels:
|
156 |
-
ner_tags.append('O')
|
157 |
else:
|
158 |
-
ner_tags.append(item['category'])
|
159 |
|
160 |
yield guid, {"id": str(guid), "words": words, "bboxes": bboxes, "ner_tags": ner_tags,
|
161 |
"image_path": image_path}
|
|
|
153 |
bboxes.append(box)
|
154 |
|
155 |
if item['category'] in replacing_labels:
|
156 |
+
ner_tags.append('I-O')
|
157 |
else:
|
158 |
+
ner_tags.append('I-' + item['category'])
|
159 |
|
160 |
yield guid, {"id": str(guid), "words": words, "bboxes": bboxes, "ner_tags": ner_tags,
|
161 |
"image_path": image_path}
|