Skip to content

Commit

Permalink
Move global flags to the start of regular expressions (fix for issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
andbue committed Oct 23, 2023
1 parent 40103de commit 13b544b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion calamari_ocr/ocr/text_processing/text_regularizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def default_text_regularizer_params(params=TextProcessorParams(), groups=["simpl

def replacement(old, new, regex=False):
r = params.replacements.add()
r.old = old
r.old = "(?u)" + old[:-4] if regex and old.endswith("(?u)") else old
r.new = new
r.regex = regex

Expand Down

0 comments on commit 13b544b

Please sign in to comment.