ArneBinder commited on
Commit
147f6f9
·
1 Parent(s): 10aa19c
Files changed (1) hide show
  1. brat.py +1 -1
brat.py CHANGED
@@ -89,7 +89,7 @@ def example_to_document(
89
  if len(starts) > 1:
90
  # check if the text in between the fragments holds only space
91
  merged_content_texts = [doc.text[start:end] for start, end in zip(ends[:-1],starts[1:])]
92
- merged_content_texts_not_empty = [text.trim() for text in merged_content_texts if text.trim() != ""]
93
  if len(merged_content_texts_not_empty) > 0:
94
  logger.warning(
95
  f"document '{doc.id}' contains a non-contiguous span with text content in between (will be merged into a single span): "
 
89
  if len(starts) > 1:
90
  # check if the text in between the fragments holds only space
91
  merged_content_texts = [doc.text[start:end] for start, end in zip(ends[:-1],starts[1:])]
92
+ merged_content_texts_not_empty = [text.strip() for text in merged_content_texts if text.strip() != ""]
93
  if len(merged_content_texts_not_empty) > 0:
94
  logger.warning(
95
  f"document '{doc.id}' contains a non-contiguous span with text content in between (will be merged into a single span): "