From 6283b6582960544dc02e438e739775e3239b802c Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sun, 3 Aug 2014 21:19:55 -0400 Subject: better 2-way highlighting, still not perfect --- web/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'web/utils.py') diff --git a/web/utils.py b/web/utils.py index 71a5048..7e20858 100644 --- a/web/utils.py +++ b/web/utils.py @@ -12,10 +12,9 @@ def gen_html(book, page_number): if d: orig_words, orig_coords = zip(*d) C = su.align(corrected_words, list(orig_words), list(orig_coords)) - r = su.alignment_to_coord(corrected_text.split(), C[1]) - corr_words, corr_coords_index = zip(*r) + corr_words = corrected_text.split() orig_coords_html = du.convert_to_htmlcoord(orig_coords, page.size[1]) - return orig_coords_html, orig_words, corr_coords_index, corr_words + return orig_coords_html, orig_words, corr_words, C[1] if __name__ == "__main__": gen_html(*sys.argv[1:3]) -- cgit v1.2.3-70-g09d2