Skip to content

Commit

Permalink
Revert "Move global flags to the start of regular expressions (fix fo…
Browse files Browse the repository at this point in the history
…r issue Calamari-OCR#348)"

This reverts commit 13b544b.
  • Loading branch information
mikegerber committed Oct 23, 2023
1 parent 9c8fb00 commit 3df6832
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 = "(?u)" + old[:-4] if regex and old.endswith("(?u)") else old
r.old = old
r.new = new
r.regex = regex

Expand Down

0 comments on commit 3df6832

Please sign in to comment.