From f633ea807ef9a83f84f41767e71fad71656a4439 Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sat, 17 Aug 2013 18:25:04 +0200 Subject: Take line jumps into accounts when grouping words --- compare.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compare.py') diff --git a/compare.py b/compare.py index a458924..7305517 100644 --- a/compare.py +++ b/compare.py @@ -7,10 +7,10 @@ import string_utils as su # wikibook = "Bloy - Le Sang du pauvre, Stock, 1932.djvu".replace(" ", "_") wikibook = "Villiers de L'Isle-Adam - Tribulat Bonhomet, 1908.djvu".replace(" ", "_") -n = 79 +n = 88 ocrpage = parse_page_sexp(wikibook, n) -l1 = ocrpage['words'] +l1, c1 = ocrpage['words'], ocrpage["coords"] l2 = get_page(wikibook, n) l3 = su.simplify(l2) -C = su.align(l2.split(), l1) -su.print_alignment(l3.split(), l1, C[1]) +C = su.align(l3.split(), l1, c1) +su.print_alignment(l2.split(), l1, c1, C[1]) -- cgit v1.2.3-70-g09d2