strip sentence ends when parsing
Browse files- annotations_parser.py +3 -0
- 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
|
|