From 55d3791d10e405e5a05785e3b4f46b97c7ae6932 Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Tue, 7 Nov 2023 20:12:03 +0100 Subject: [PATCH] fix document_to_example() --- dataset_builders/pie/brat/brat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataset_builders/pie/brat/brat.py b/dataset_builders/pie/brat/brat.py index ba40adf8..aa70cca1 100644 --- a/dataset_builders/pie/brat/brat.py +++ b/dataset_builders/pie/brat/brat.py @@ -247,7 +247,7 @@ def document_to_example( for target_layer, attribute_ids in attribute_ids_per_target.items(): attribute_annotations = all_attribute_annotations[target_layer] assert len(attribute_ids) == len(attribute_annotations) - for i, attribute_annotation in enumerate(document.span_attributes): + for i, attribute_annotation in enumerate(attribute_annotations): target_id = annotation_dicts[target_layer][attribute_annotation.annotation]["id"] attribute_dict = { "id": attribute_ids_per_target[target_layer][i],