sobir-hf commited on
Commit
f17f737
1 Parent(s): 7659125

strip sentence ends when parsing

Browse files
Files changed (2) hide show
  1. annotations_parser.py +3 -0
  2. data.jsonl +0 -0
annotations_parser.py CHANGED
@@ -38,6 +38,9 @@ def parse_annotated_text(text):
38
 
39
  # Append the text before the annotation to the buffer
40
  buffer.append(text[last_end:start])
 
 
 
41
  buffer.append(entity)
42
 
43
  # Calculate the start and end spans in the original text
 
38
 
39
  # Append the text before the annotation to the buffer
40
  buffer.append(text[last_end:start])
41
+
42
+ # Remove trailing spaces after entity
43
+ entity = entity.rstrip()
44
  buffer.append(entity)
45
 
46
  # Calculate the start and end spans in the original text
data.jsonl CHANGED
The diff for this file is too large to render. See raw diff