Fixes #2491 - additional rules for basic text correction
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 20 Mar 2013 10:00:34 +0000 (11:00 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 20 Mar 2013 10:00:34 +0000 (11:00 +0100)
Handling some cases of "l"s and "o"s OCR'ed as ones and zeros.

apps/toolbar/fixtures/initial_toolbar.yaml

index c2fb84d..522a1f0 100644 (file)
             "<akap_dialog>--- "]]}], ["lineregexp", {"exprs": [["^\\s+|\\s+$", ""],
             ["\\s+", " "], ["(,,)\\s+", "$1"], ["\\s+(\")", "$1"], ["([^\\.])(\\s*)</p",
             "$1.$2</p"], ["([\\.:;!\\?])([^\\s\\\\])", "$1 $2"], ["([^\\s])\\s+([\\.:;!\\?])",
-            "$1$2"], ["\\s+,([^,])", ",$1"], ["([^,]),([^\\s\\\\,])", "$1, $2"]]}]]'
+            "$1$2"], ["\\s+,([^,])", ",$1"], ["([^,]),([^\\s\\\\,])", "$1, $2"],
+            ["([A-Za-z])0", "$1o"], ["(\\. )0([A-Za-z])", "$1O$2"], [" 0([A-Za-z])", " o$1"],
+            ["([A-Za-z])1", "$1l"], ["(\\. )1([A-Za-z])", "$1L$2"], [" 1([A-Za-z])", " l$1"]]}]]'
         scriptlet: macro
         slug: basic_correction
         tooltip: "Wykonuj\u0119 podstawow\u0105 korekt\u0119 tekstu."