Datasets:
Tasks:
Token Classification
Sub-tasks:
parsing
ArneBinder
commited on
Commit
•
92b9087
1
Parent(s):
70446e7
relaxed parsing of attributions
Browse filesThis allows to parse attribution annotations where the target annotation is separated from the value by a TAB instead of a SPACE. Note, that this is not allowed by the BRAT-Standoff-Format (https://brat.nlplab.org/standoff.html).
brat.py
CHANGED
@@ -174,8 +174,8 @@ class Brat(datasets.GeneratorBasedBuilder):
|
|
174 |
A2 Confidence E2 L1
|
175 |
"""
|
176 |
|
177 |
-
_id, remaining = annotation_line.strip().split("\t")
|
178 |
-
parts = remaining.split(
|
179 |
# if no value is present, it is implicitly "true"
|
180 |
if len(parts) == 2:
|
181 |
parts.append("true")
|
|
|
174 |
A2 Confidence E2 L1
|
175 |
"""
|
176 |
|
177 |
+
_id, remaining = annotation_line.strip().split("\t", maxsplit=1)
|
178 |
+
parts = remaining.split()
|
179 |
# if no value is present, it is implicitly "true"
|
180 |
if len(parts) == 2:
|
181 |
parts.append("true")
|