Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grobid_client/format/TEI2LossyJSON.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ def traverse_and_collect(node, current_pos=0):
# The reference text was also cleaned, so we need to find it in the final cleaned text
# We can search around the original position to find the correct occurrence
search_start = max(0, ref['offset_start'] - 10) # Look a bit before the original position
search_end = min(len(final_text), ref['offset_start'] + 10) # Look a bit after
search_end = min(len(final_text), ref['offset_end'] + 10) # Look a bit after
search_area = final_text[search_start:search_end]

# Find the reference in the search area
Expand Down
Loading