From 131a5b741df0099f9e988ea03f5e1cd96db519b7 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Sun, 14 May 2017 23:40:09 -0700 Subject: [PATCH] tesseract.py: update canned HOCR template to tess 3.05 output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seems better to not claim the existence of several entities that don’t exist as the older one does --- ocrmypdf/exec/tesseract.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ocrmypdf/exec/tesseract.py b/ocrmypdf/exec/tesseract.py index 501394c2..b7a77c3a 100644 --- a/ocrmypdf/exec/tesseract.py +++ b/ocrmypdf/exec/tesseract.py @@ -21,27 +21,23 @@ OrientationConfidence = namedtuple( 'OrientationConfidence', ('angle', 'confidence')) -HOCR_TEMPLATE = ''' +HOCR_TEMPLATE = """ - - + + - - -
-
-

- - -

-
+ + +
-''' + +""" + @lru_cache(maxsize=1) def version():