diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2014-08-03 21:19:55 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2014-08-03 21:19:55 -0400 |
| commit | 6283b6582960544dc02e438e739775e3239b802c (patch) | |
| tree | 70538744d32a55757e0a5c7c6d581fc404ab6878 /web/utils.py | |
| parent | 102a573a7e6fd711da874c76f74b47df37ff124e (diff) | |
| download | ocr-layer-curation-6283b6582960544dc02e438e739775e3239b802c.tar.gz | |
better 2-way highlighting, still not perfect
Diffstat (limited to 'web/utils.py')
| -rw-r--r-- | web/utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
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]) |
