From 91ac11885588fd1afecddd51b39329017f44f256 Mon Sep 17 00:00:00 2001 From: Kristoffer Andersson Date: Wed, 23 Oct 2024 09:02:40 +0200 Subject: [PATCH] fix: use unambigous regex replacement --- .../src/sbx_ocr_correction_viklofg_sweocr/ocr_corrector.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ocr-correction-viklofg-sweocr/src/sbx_ocr_correction_viklofg_sweocr/ocr_corrector.py b/ocr-correction-viklofg-sweocr/src/sbx_ocr_correction_viklofg_sweocr/ocr_corrector.py index acf753b..0347442 100644 --- a/ocr-correction-viklofg-sweocr/src/sbx_ocr_correction_viklofg_sweocr/ocr_corrector.py +++ b/ocr-correction-viklofg-sweocr/src/sbx_ocr_correction_viklofg_sweocr/ocr_corrector.py @@ -80,6 +80,7 @@ def align_and_diff( g: graph.Graph, *, curr_start: int ) -> Tuple[List[Tuple[Tuple[int, int], Optional[str]]], int]: corrections = [] + edge_map = graph.edge_map(g) visited_tokens = set() for s_token in g.source: