Update SLR.py
Browse files
SLR.py
CHANGED
|
@@ -114,10 +114,10 @@ class SLR(datasets.GeneratorBasedBuilder):
|
|
| 114 |
for item in data['categories']:
|
| 115 |
|
| 116 |
labels=item['name']
|
| 117 |
-
words.append(
|
| 118 |
ner_tags.append(labels)
|
| 119 |
for item in data['annotations']:
|
| 120 |
bbox=item['bbox']
|
| 121 |
bboxes.append(bbox)
|
| 122 |
|
| 123 |
-
yield guid, {"id": str(guid), "words":words, "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "
|
|
|
|
| 114 |
for item in data['categories']:
|
| 115 |
|
| 116 |
labels=item['name']
|
| 117 |
+
words.append(labels)
|
| 118 |
ner_tags.append(labels)
|
| 119 |
for item in data['annotations']:
|
| 120 |
bbox=item['bbox']
|
| 121 |
bboxes.append(bbox)
|
| 122 |
|
| 123 |
+
yield guid, {"id": str(guid), "words": words, "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "image_path": image_path}
|