From 18e1a799a1e037c8f7b17d66f82c01d09b8ae2e1 Mon Sep 17 00:00:00 2001 From: Vinayak Mehta Date: Fri, 21 Apr 2017 13:22:37 +0530 Subject: [PATCH] Remove remove_empty --- camelot/lattice.py | 3 +-- camelot/ocr.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/camelot/lattice.py b/camelot/lattice.py index 7ccd49a..17b1170 100644 --- a/camelot/lattice.py +++ b/camelot/lattice.py @@ -12,7 +12,7 @@ from .imgproc import (adaptive_threshold, find_lines, find_table_contours, from .table import Table from .utils import (scale_to_pdf, scale_to_image, segments_bbox, text_in_bbox, merge_close_values, get_table_index, get_score, count_empty, - encode_list, get_text_objects, get_page_layout, remove_empty) + encode_list, get_text_objects, get_page_layout) __all__ = ['Lattice'] @@ -369,7 +369,6 @@ class Lattice: if self.fill is not None: table = _fill_spanning(table, fill=self.fill[table_no]) ar = table.get_list() - ar = remove_empty(ar) ar = encode_list(ar) table_data['data'] = ar empty_p, r_nempty_cells, c_nempty_cells = count_empty(ar) diff --git a/camelot/ocr.py b/camelot/ocr.py index dd862fe..4be2bb5 100644 --- a/camelot/ocr.py +++ b/camelot/ocr.py @@ -8,7 +8,7 @@ from PIL import Image from .table import Table from .imgproc import (adaptive_threshold, find_lines, find_table_contours, find_table_joints, find_cuts) -from .utils import merge_close_values, encode_list, remove_empty +from .utils import merge_close_values, encode_list class OCRLattice: @@ -159,7 +159,6 @@ class OCRLattice: ar = table.get_list() ar.reverse() ar = encode_list(ar) - ar = remove_empty(ar) table_data['data'] = ar tables['table-{0}'.format(table_no + 1)] = table_data table_no += 1 @@ -300,7 +299,6 @@ class OCRStream: ar = table.get_list() ar.reverse() ar = encode_list(ar) - ar = remove_empty(ar) table_data['data'] = ar tables['table-{0}'.format(table_no + 1)] = table_data table_no += 1