katanaml commited on
Commit
7fa5742
·
1 Parent(s): cff778b

Update cord.py

Browse files
Files changed (1) hide show
  1. cord.py +2 -2
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}