Commit ·
a3ee28b
1
Parent(s): 94d1e8b
fix: renaming annotation type
Browse files
brat.py
CHANGED
|
@@ -124,7 +124,7 @@ def example_to_document(
|
|
| 124 |
if len(events) > 0:
|
| 125 |
raise NotImplementedError("converting events is not yet implemented")
|
| 126 |
|
| 127 |
-
span_attributions: Dict[str,
|
| 128 |
attribution_ids = []
|
| 129 |
for attribution_dict in dl2ld(example["attributions"]):
|
| 130 |
target_id = attribution_dict["target"]
|
|
@@ -136,7 +136,7 @@ def example_to_document(
|
|
| 136 |
target_annotation = relations[target_id]
|
| 137 |
else:
|
| 138 |
raise Exception("only span and relation attributions are supported yet")
|
| 139 |
-
attribution =
|
| 140 |
target_annotation=target_annotation,
|
| 141 |
label=attribution_dict["type"],
|
| 142 |
value=attribution_dict["value"],
|
|
|
|
| 124 |
if len(events) > 0:
|
| 125 |
raise NotImplementedError("converting events is not yet implemented")
|
| 126 |
|
| 127 |
+
span_attributions: Dict[str, Attribute] = dict()
|
| 128 |
attribution_ids = []
|
| 129 |
for attribution_dict in dl2ld(example["attributions"]):
|
| 130 |
target_id = attribution_dict["target"]
|
|
|
|
| 136 |
target_annotation = relations[target_id]
|
| 137 |
else:
|
| 138 |
raise Exception("only span and relation attributions are supported yet")
|
| 139 |
+
attribution = Attribute(
|
| 140 |
target_annotation=target_annotation,
|
| 141 |
label=attribution_dict["type"],
|
| 142 |
value=attribution_dict["value"],
|