Datasets:

[DONT MERGE] relaxed parsing of attributions

#3
by ArneBinder - opened
Files changed (1) hide show
  1. brat.py +2 -2
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")