A review comment that says “Methods, line 43” is hard to check once the team has moved to another revision. A small handoff script can keep the reviewer note paired with the revision and anchor that the author supplied. If the target file or locator is unavailable, keep the note open instead of silently pointing it to the nearest paragraph.
Input
This constructed example has one source row for revision v2 and a locator map with two entries for v3. The duplicate v3 locator is deliberate. Treat a locator as an identifier assigned by the author or a trusted upstream step. The script does not find PDF coordinates or infer paragraph identity.
from collections import defaultdict source = [ ("v2", "M43", "Outcome was recorded at follow-up."), ("v3", "M43", "Follow-up assessments took place at six weeks."), ("v3", "M43", "The outcome scale ranged from 0 to 20."), ] notes = [ ("R1", "v2", "M43"), ("R2", "v3", "M43"), ("R3", "v2", "T99"), ] by_location = defaultdict(list) for revision, locator, sentence in source: by_location[(revision, locator)].append(sentence) for note_id, revision, locator in notes: matches = by_location[(revision, locator)] if len(matches) == 1: print(note_id, "linked", matches[0]) elif matches: print(note_id, "author check: ambiguous locator") else: print(note_id, "author check: missing locator") Output
R1 linked Outcome was recorded at follow-up. R2 author check: ambiguous locator R3 author check: missing locator A linked result says only that the supplied revision and locator resolved to one supplied sentence. It cannot tell you whether the sentence answers the reviewer. Keep that judgment in a separate field beside the verbatim note and linked sentence. To migrate a note to another revision, record an explicit crosswalk with the author-reviewed old and new locators.
This example uses self-written text and local Python. No real study, patient data, model output or customer case is involved. The indexed-list behavior uses the standard library collections.defaultdict.
We are the RigorMed team. For an existing English editing task, use authorized materials and ask for a reviewable candidate and reason. Model use follows the displayed credits. RigorMed
