repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xavctn/img2table | train | 23 | f2a4588dc8c455912e9844e933d8b68aa4f34a38 | train | tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | 22 | 4 | assert | test_handle_implicit_rows_table | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_table, \
handle_implicit_rows
def ... | table.nb_rows + 2 | added | 619f9c13e81d89751ba3be43d8e9a6a2de87d14cd864485432f1c4eb3a19a9b1 | assert|test_handle_implicit_rows_table|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_tab... | null | null | null |
xavctn/img2table | train | 23 | f2a4588dc8c455912e9844e933d8b68aa4f34a38 | train | tests/tables/processing/borderless_tables/segment_image/test_segment_image.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/segment_image/test_segment_image.py | 51 | 4 | assert | test_segment_image | # coding: utf-8
import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.model import ImageSegment
from img2table.tables.processing.borderless_tables.segment_image import create_image_segments, get_segment_elements, \
segment_image
def test_create_... | {14, 4} | added | 47e6a8a3b1950210c02a56efea5d5226a198f42fd38e165fd02f69e1677b4aa7 | assert|test_segment_image|# coding: utf-8 import json import cv2 from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.model import ImageSegment from img2table.tables.processing.borderless_tables.segment_image import create_image_segments, get_segment_elements, \ segment_imag... | null | null | null |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/document/image/test_image.py | train | xavctn/img2table:tests/document/image/test_image.py | 89 | 4 | assert | test_no_ocr | # coding: utf-8
from io import BytesIO
import pytest
from openpyxl import load_workbook
from img2table.document.image import Image
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
img = Image(src=1... | None | modified | 434f048ecd26431c72fb4bc340e277563a7a155a9fae4c426c9c5e59c9c88a21 | assert|test_no_ocr|# coding: utf-8 from io import BytesIO import pytest from openpyxl import load_workbook from img2table.document.image import Image from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: img = Image(sr... | None | 89 | 4 |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/document/image/test_image.py | train | xavctn/img2table:tests/document/image/test_image.py | 106 | 8 | assert | test_image_excel | # coding: utf-8
from io import BytesIO
import pytest
from openpyxl import load_workbook
from img2table.document.image import Image
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
img = Image(src=1... | expected.worksheets[idx].title | modified | 1f5900c77e78ef2aea186aad6d3b7206995685dfbbb6ce86c1667962889a8231 | assert|test_image_excel|# coding: utf-8 from io import BytesIO import pytest from openpyxl import load_workbook from img2table.document.image import Image from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: img = Ima... | expected.worksheets[idx].title | 106 | 8 |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 63 | 8 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | BBox(x1=236, y1=249, x2=1442, y2=543) | modified | 9b27f7fe5b5459f68f1f396d4755ed9cb42d74232b9e24aa60a01e476759bd1e | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | BBox(x1=236, y1=249, x2=1442, y2=543) | 63 | 8 |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 66 | 4 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | "Example of Data Table 4" | modified | 742e5c4e25a0d26cd9a8b516274305c4747d1ee9123f528d651f4a0601110660 | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | "Example of Data Table 4" | 66 | 4 |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 22 | 4 | assert | test_table_image | # coding: utf-8
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.image import TableImage
from img2table.tables.objects.extraction import BBox
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
ocr_df = OCRDataframe(pl.read_c... | BBox(x1=35, y1=20, x2=770, y2=327) | added | d548264ef300c9b2e555c5c3a7ed79a3cf2ff9d4dd69c20180f703bcae9eb9dd | assert|test_table_image|# coding: utf-8 import cv2 import polars as pl from img2table.ocr.data import OCRDataframe from img2table.tables.image import TableImage from img2table.tables.objects.extraction import BBox def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) ocr_df = OCRDatafra... | null | null | null |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 25 | 4 | assert | test_table_image | # coding: utf-8
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.image import TableImage
from img2table.tables.objects.extraction import BBox
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
ocr_df = OCRDataframe(pl.read_c... | BBox(x1=962, y1=20, x2=1154, y2=123) | added | 7fb13360fbd687480c48b06e074a685e2f048e49e36c5adca847fcacf996c171 | assert|test_table_image|# coding: utf-8 import cv2 import polars as pl from img2table.ocr.data import OCRDataframe from img2table.tables.image import TableImage from img2table.tables.objects.extraction import BBox def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) ocr_df = OCRDatafra... | null | null | null |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/tables/image/test_metrics.py | train | xavctn/img2table:tests/tables/image/test_metrics.py | 11 | 4 | assert | test_compute_char_length | # coding: utf-8
import cv2
from img2table.tables.metrics import compute_char_length, compute_median_line_sep, compute_img_metrics
def test_compute_char_length():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
char_length, cc_array = compute_char_length(img=image)
assert round(char_length... | 8.50 | modified | e97ea37a1f661389c69591e69630de2975c89fd7ae6834db26a6686161a39da8 | assert|test_compute_char_length|# coding: utf-8 import cv2 from img2table.tables.metrics import compute_char_length, compute_median_line_sep, compute_img_metrics def test_compute_char_length(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) char_length, cc_array = compute_char_length(img=image) assert r... | 8.44 | 11 | 4 |
xavctn/img2table | train | 24 | 223fc888f5f676fdbf34004f0483e6512cbcc436 | train | tests/tables/image/test_metrics.py | train | xavctn/img2table:tests/tables/image/test_metrics.py | 15 | 4 | assert | test_compute_char_length | # coding: utf-8
import cv2
from img2table.tables.metrics import compute_char_length, compute_median_line_sep, compute_img_metrics
def test_compute_char_length():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
char_length, cc_array = compute_char_length(img=image)
assert round(char_length... | (None, None) | modified | dec7b1ebe5afe39f5064db4631bdb40bacc75df281c5b43e707d3c82cb5bec14 | assert|test_compute_char_length|# coding: utf-8 import cv2 from img2table.tables.metrics import compute_char_length, compute_median_line_sep, compute_img_metrics def test_compute_char_length(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) char_length, cc_array = compute_char_length(img=image) assert r... | (None, None) | 15 | 4 |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | 26 | 4 | assert | test_identify_borderless_tables | # coding: utf-8
import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_borderless_tables
def test_identify_borderless_tables():
img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
with open("test_data/lines.json", 'r... | (93, 45, 1233, 1060) | added | c4e68c5aa0a69f4bd6cfc84d477a12d02458c0caca58a9006ecdf27691cde6f0 | assert|test_identify_borderless_tables|# coding: utf-8 import json import cv2 from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_borderless_tables def test_identify_borderless_tables(): img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) with open(... | null | null | null |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/column_delimiters/test_column_delimiters.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_column_delimiters.py | 24 | 4 | assert | test_identify_column_groups | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables import identify_column_groups
from img2table.tables.processing.borderless_tables.model import ImageSegment
def test_identify_column_groups():
with open("test_data/image_segment.json", "r... | (53, 45, 1277, 1147) | added | 465e5e1a24fce553d5c40b6bbfa0ac41d437ffd3804c109e355dd4f216520593 | assert|test_identify_column_groups|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables import identify_column_groups from img2table.tables.processing.borderless_tables.model import ImageSegment def test_identify_column_groups(): with open("test_d... | null | null | null |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | 32 | 4 | assert | test_adjacent_whitespaces | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \
get_vertical_whitespaces, adjacent_whitespaces, identify_coherent_v_whitespaces, get_relevant_vertical_whitespaces
from img2table.tables.pro... | adjacent_whitespaces(c_1, c_3) | added | 58f03275ccec2d3f1ac000cfee8c3935d3ea94e7ac23490e8ac9d2776f9be71b | assert|test_adjacent_whitespaces|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \ get_vertical_whitespaces, adjacent_whitespaces, identify_coherent_v_whitespaces, get_relevant_vertical_whitespace... | null | null | null |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | 33 | 4 | assert | test_identify_rows | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import DelimiterGroup
from img2table.tables.processing.borderless_tables.rows.delimiter_group_rows import \
get_delimiter_group_row_separation, identify_rows, identify_delimiter_grou... | 1233 | added | 1c59f13d1b1a7904323df165de02cc05800e206b43f9f94f8a66862b4c0b8232 | assert|test_identify_rows|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.model import DelimiterGroup from img2table.tables.processing.borderless_tables.rows.delimiter_group_rows import \ get_delimiter_group_row_separation, identify_rows, ide... | null | null | null |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/segment_image/test_segment_image.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/segment_image/test_segment_image.py | 19 | 4 | assert | test_create_image_segments | # coding: utf-8
import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.model import ImageSegment
from img2table.tables.processing.borderless_tables.segment_image import create_image_segments, get_segment_elements, \
segment_image
def test_create_... | [ImageSegment(x1=53, y1=0, x2=1277, y2=1173)] | modified | 67098046af8ba3c7684fb27465307736de4690ed75327ccfb9e0048bd66f8201 | assert|test_create_image_segments|# coding: utf-8 import json import cv2 from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.model import ImageSegment from img2table.tables.processing.borderless_tables.segment_image import create_image_segments, get_segment_elements, \ segm... | {ImageSegment(x1=2, y1=0, x2=804, y2=361), ImageSegment(x1=928, y1=0, x2=1188, y2=157)} | 17 | 4 |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/table/test_headers.py | test | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_headers.py | 53 | 4 | assert | test_match_table_elements | # coding: utf-8
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.borderless_tables.table.headers import match_table_elements, \
check_header_coh... | expected | modified | 99098a244308c338f00ab3fe7d4b74cd617043162c39806c521c5db9f53b14bb | assert|test_match_table_elements|# coding: utf-8 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.borderless_tables.table.headers import match_table... | expected | 53 | 4 |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/table/test_table.py | val | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_table.py | 30 | 4 | assert | test_identify_table | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_table
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_identify_table():
w... | (93, 45, 1233, 1060) | added | 6233786f268a94f4b2dc876f5ae0b269eec67f13eb0aabcfada24b22ca430914 | assert|test_identify_table|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_table from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow def test_... | null | null | null |
xavctn/img2table | train | 25 | e8b4ce698191319444b13f85fdd9c913bd06b8bc | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_table_creation.py | 24 | 4 | assert | test_get_table | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.table.table_creation import get_table
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_get_table():
with open("test_data/delimiter_group.... | (93, 45, 1233, 1060) | added | 141d5edfb39d95f81d2b4df15844535ff73736af8f0922575d36ebbf2177e266 | assert|test_get_table|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.table.table_creation import get_table from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow def test_get_table(): with open("test_data/de... | null | null | null |
xavctn/img2table | train | 26 | c5601c7779c20c92671f5a623c0d16d6656aa43e | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 22 | 9 | pytest.raises | test_validators | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | TypeError) | added | c9e7cb1f982c22818f0f6563048952bf1769e8ceaa54475b208d5732d1eea87a | pytest.raises|test_validators|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.ra... | null | null | null |
xavctn/img2table | train | 26 | c5601c7779c20c92671f5a623c0d16d6656aa43e | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 38 | 4 | assert | test_load_pdf | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | pdf_from_bytes.bytes | added | 9b22a7a59040903ba5e0229dc31f81330b26929957d38bec3d48301963bbb687 | assert|test_load_pdf|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Type... | null | null | null |
xavctn/img2table | train | 26 | c5601c7779c20c92671f5a623c0d16d6656aa43e | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 40 | 4 | assert | test_load_pdf | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | (2200, 1700) | added | 762f8d36e8723d0cd0fe373f4321ad853400373840e3b9ffafb0a3d0ecb3bd7d | assert|test_load_pdf|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Type... | null | null | null |
xavctn/img2table | train | 26 | c5601c7779c20c92671f5a623c0d16d6656aa43e | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 64 | 4 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | "Example of Data Table 3" | added | 5e12860428ab8b6f48c664014d957edf8b80d34bd858954a70d1e0379a63b148 | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | null | null | null |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | 26 | 4 | assert | test_identify_borderless_tables | # coding: utf-8
import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_borderless_tables
def test_identify_borderless_tables():
img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
with open("test_data/lines.json", 'r... | (93, 45, 1233, 1060) | modified | 63b8a970c3e2731fb63fc1ebd67c72fae85997345d048183d93bdd597c515e8a | assert|test_identify_borderless_tables|# coding: utf-8 import json import cv2 from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_borderless_tables def test_identify_borderless_tables(): img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) with open(... | (93, 45, 1233, 1060) | 26 | 4 |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/column_delimiters/test_column_delimiters.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_column_delimiters.py | 24 | 4 | assert | test_identify_column_groups | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables import identify_column_groups
from img2table.tables.processing.borderless_tables.model import ImageSegment
def test_identify_column_groups():
with open("test_data/image_segment.json", "r... | (53, 45, 1277, 1147) | modified | a522d51f07c49ac5f9b0db7c43887a4440260c7215ae81a1780b34d83906558d | assert|test_identify_column_groups|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables import identify_column_groups from img2table.tables.processing.borderless_tables.model import ImageSegment def test_identify_column_groups(): with open("test_d... | (53, 45, 1277, 1147) | 24 | 4 |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/column_delimiters/test_column_groups.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_column_groups.py | 132 | 4 | assert | test_get_complete_group | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.column_delimiters.column_groups import \
vertically_coherent_delimiters, group_delimiters, deduplicate_groups, get_coherent_height, create_delimiter_groups, \
check_elements_vs_delimit... | DelimiterGroup(delimiters=[Cell(x1=20, x2=30, y1=0, y2=100), Cell(x1=50, x2=60, y1=0, y2=100), Cell(x1=70, x2=80, y1=0, y2=100), Cell(x1=100, x2=110, y1=0, y2=100)], elements=[Cell(x1=31, x2=38, y1=10, y2=20), Cell(x1=50, x2=60, y1=10, y2=20), Cell(x1=50, x2=60, y1=30, y2=40), Cell(x1=50, x2=60, y1=50, y2=60)]) | added | e527e613914fe50cec77e9e2939ce92431bd14d6a18701daedaf84572d0c7b27 | assert|test_get_complete_group|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.column_delimiters.column_groups import \ vertically_coherent_delimiters, group_delimiters, deduplicate_groups, get_coherent_height, create_delimiter_groups, \ chec... | null | null | null |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | 32 | 4 | assert | test_adjacent_whitespaces | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \
get_vertical_whitespaces, adjacent_whitespaces, identify_coherent_v_whitespaces, get_relevant_vertical_whitespaces, \
process_tiny_white... | adjacent_whitespaces(c_1, c_2) | modified | de195b1d0bc0418dbb34ad9a32b9c9ffc3f6fe354cd40d65c1c22aad15075ef3 | assert|test_adjacent_whitespaces|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \ get_vertical_whitespaces, adjacent_whitespaces, identify_coherent_v_whitespaces, get_relevant_vertical_whitespace... | adjacent_whitespaces(c_1, c_2) | 31 | 4 |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | 33 | 4 | assert | test_adjacent_whitespaces | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \
get_vertical_whitespaces, adjacent_whitespaces, identify_coherent_v_whitespaces, get_relevant_vertical_whitespaces, \
process_tiny_white... | adjacent_whitespaces(c_1, c_3) | modified | 2da3ef55119473d224200ceac7a366cf53dc3db31a619290b832ccff5a70ae7a | assert|test_adjacent_whitespaces|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \ get_vertical_whitespaces, adjacent_whitespaces, identify_coherent_v_whitespaces, get_relevant_vertical_whitespace... | adjacent_whitespaces(c_1, c_3) | 32 | 4 |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | 38 | 4 | assert | test_overlapping_rows | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
from img2table.tables.processing.borderless_tables.rows.delimiter_group_rows import \
get_delimiter_group_row_separation, identify_rows, identify_deli... | overlapping_rows(tb_row_1=tb_row_1, tb_row_2=tb_row_2) | added | 59f2ebdd18a08631ff05e0b36dd1dfedb579019c6ef441569041eee6bcb5ef89 | assert|test_overlapping_rows|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow from img2table.tables.processing.borderless_tables.rows.delimiter_group_rows import \ get_delimiter_group_row_separation, ident... | null | null | null |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | 86 | 4 | assert | test_identify_rows | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
from img2table.tables.processing.borderless_tables.rows.delimiter_group_rows import \
get_delimiter_group_row_separation, identify_rows, identify_deli... | 1147 | added | 1441e5ad4d409eab09ae717439b41a3f678a16c4444b95457c0787fa5558049c | assert|test_identify_rows|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow from img2table.tables.processing.borderless_tables.rows.delimiter_group_rows import \ get_delimiter_group_row_separation, identify... | null | null | null |
xavctn/img2table | train | 27 | 65d86e5f118e76f384ce01ac855ab8fa4c685158 | train | tests/tables/processing/borderless_tables/segment_image/test_segment_image.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/segment_image/test_segment_image.py | 19 | 4 | assert | test_create_image_segments | # coding: utf-8
import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.model import ImageSegment
from img2table.tables.processing.borderless_tables.segment_image import create_image_segments, get_segment_elements, \
segment_image
def test_create_... | [ImageSegment(x1=56, y1=0, x2=1273, y2=1173)] | modified | 5bc478fc290f16a1cd4e44bd8f41ce5d8012f4edaae30ec244401e5e3aa27a43 | assert|test_create_image_segments|# coding: utf-8 import json import cv2 from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.model import ImageSegment from img2table.tables.processing.borderless_tables.segment_image import create_image_segments, get_segment_elements, \ segm... | [ImageSegment(x1=53, y1=0, x2=1277, y2=1173)] | 19 | 4 |
xavctn/img2table | train | 28 | d866db14c60f9dc5eb77d9f3d267c913e09bc77d | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 21 | 4 | assert | test_table_image | # coding: utf-8
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.image import TableImage
from img2table.tables.objects.extraction import BBox
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
ocr_df = OCRDataframe(pl.read_c... | BBox(x1=35, y1=20, x2=770, y2=327) | modified | b0f47a9ae1444a424ff024289134e0103d02f0bcba8882135c8aa30ec78ed08d | assert|test_table_image|# coding: utf-8 import cv2 import polars as pl from img2table.ocr.data import OCRDataframe from img2table.tables.image import TableImage from img2table.tables.objects.extraction import BBox def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) ocr_df = OCRDatafra... | BBox(x1=35, y1=20, x2=770, y2=327) | 22 | 4 |
xavctn/img2table | train | 28 | d866db14c60f9dc5eb77d9f3d267c913e09bc77d | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 24 | 4 | assert | test_table_image | # coding: utf-8
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.image import TableImage
from img2table.tables.objects.extraction import BBox
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
ocr_df = OCRDataframe(pl.read_c... | BBox(x1=962, y1=20, x2=1154, y2=123) | modified | de0f034db06ffe60ea9cbc342a2eeb9e4eeacbaf16a695fe55b89c4e1b5d804b | assert|test_table_image|# coding: utf-8 import cv2 import polars as pl from img2table.ocr.data import OCRDataframe from img2table.tables.image import TableImage from img2table.tables.objects.extraction import BBox def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) ocr_df = OCRDatafra... | BBox(x1=962, y1=20, x2=1154, y2=123) | 25 | 4 |
xavctn/img2table | train | 29 | 54c60f757ba2470dc5c840c8725a99b4c04872ba | train | tests/ocr/google_vision/test_google_vision.py | train | xavctn/img2table:tests/ocr/google_vision/test_google_vision.py | 27 | 4 | assert | test_vision_endpoint_content | # coding: utf-8
import json
import os
import pickle
import polars as pl
import pytest
from img2table.document import Image
from img2table.ocr.data import OCRDataframe
from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR
from tests import MOCK_DIR
def test_vision_endpoint_conten... | expected[0] | modified | 6305f36c97a94db436396f9f6f6bb484b124226ca0e7a7731d0fef466948b91e | assert|test_vision_endpoint_content|# coding: utf-8 import json import os import pickle import polars as pl import pytest from img2table.document import Image from img2table.ocr.data import OCRDataframe from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR from tests import MOCK_DIR... | expected[0] | 27 | 4 |
xavctn/img2table | train | 29 | 54c60f757ba2470dc5c840c8725a99b4c04872ba | train | tests/ocr/google_vision/test_google_vision.py | train | xavctn/img2table:tests/ocr/google_vision/test_google_vision.py | 46 | 4 | assert | test_vision_api_content | # coding: utf-8
import json
import os
import pickle
import polars as pl
import pytest
from img2table.document import Image
from img2table.ocr.data import OCRDataframe
from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR
from tests import MOCK_DIR
def test_vision_endpoint_conten... | expected | modified | fd16077e069120d2f9eeae07498c377129de85ca3b1f6b854a9f6fb585699da1 | assert|test_vision_api_content|# coding: utf-8 import json import os import pickle import polars as pl import pytest from img2table.document import Image from img2table.ocr.data import OCRDataframe from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR from tests import MOCK_DIR def ... | expected | 46 | 4 |
xavctn/img2table | train | 29 | 54c60f757ba2470dc5c840c8725a99b4c04872ba | train | tests/ocr/google_vision/test_google_vision.py | train | xavctn/img2table:tests/ocr/google_vision/test_google_vision.py | 50 | 4 | assert | test_vision_api_content | # coding: utf-8
import json
import os
import pickle
import polars as pl
import pytest
from img2table.document import Image
from img2table.ocr.data import OCRDataframe
from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR
from tests import MOCK_DIR
def test_vision_endpoint_conten... | expected | modified | e7c887156a9a48f57babecc8bad1066c97b483961ad72f572c7213b97e8e1a3e | assert|test_vision_api_content|# coding: utf-8 import json import os import pickle import polars as pl import pytest from img2table.document import Image from img2table.ocr.data import OCRDataframe from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR from tests import MOCK_DIR def ... | expected | 50 | 4 |
xavctn/img2table | train | 29 | 54c60f757ba2470dc5c840c8725a99b4c04872ba | train | tests/ocr/google_vision/test_google_vision.py | train | xavctn/img2table:tests/ocr/google_vision/test_google_vision.py | 62 | 9 | pytest.raises | test_vision_ocr | # coding: utf-8
import json
import os
import pickle
import polars as pl
import pytest
from img2table.document import Image
from img2table.ocr.data import OCRDataframe
from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR
from tests import MOCK_DIR
def test_vision_endpoint_conten... | TypeError) | modified | a9e9b232d5c3051036c3ff4edda7111d69df92b9591fe164c2c5b64481dc9cac | pytest.raises|test_vision_ocr|# coding: utf-8 import json import os import pickle import polars as pl import pytest from img2table.document import Image from img2table.ocr.data import OCRDataframe from img2table.ocr.google_vision import VisionEndpointContent, VisionAPIContent, VisionOCR from tests import MOCK_DIR def t... | TypeError) | 62 | 9 |
xavctn/img2table | train | 30 | c9f65f277c2d3bca85855a1198c2ee4394f2cfb2 | train | tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | 23 | 4 | assert | test_compute_table_median_row_sep | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_table, \
handle_implicit_rows, compu... | 51.0 | added | b05994d6bd5563909eab2af9fb242ca8e3c6e82db7cb7c76912e411f78946532 | assert|test_compute_table_median_row_sep|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_t... | null | null | null |
xavctn/img2table | train | 30 | c9f65f277c2d3bca85855a1198c2ee4394f2cfb2 | train | tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | 40 | 4 | assert | test_handle_implicit_rows_table | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_table, \
handle_implicit_rows, compu... | table.nb_rows + 2 | added | d33ed3b4fc4573de16afbec43e1415e2befc858fc6fe51ef0880577187f85841 | assert|test_handle_implicit_rows_table|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_tab... | null | null | null |
xavctn/img2table | train | 30 | c9f65f277c2d3bca85855a1198c2ee4394f2cfb2 | train | tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | 57 | 4 | assert | test_handle_implicit_rows | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_table, \
handle_implicit_rows, compu... | table.nb_rows + 2 | added | e7af6b2854a64aa94636ec93607fb8c94625ee0f48a199ef553d71928d3cb4a5 | assert|test_handle_implicit_rows|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_table, \ ... | null | null | null |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/document/image/test_image.py | train | xavctn/img2table:tests/document/image/test_image.py | 90 | 4 | assert | test_no_ocr | # coding: utf-8
from io import BytesIO
import pytest
from openpyxl import load_workbook
from img2table.document.image import Image
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
img = Image(src=1... | BBox(x1=36, y1=38, x2=840, y2=530) | modified | 302f54d5ef4577664e5705c70e574d7833c571183cc31be59ccf070a39120b78 | assert|test_no_ocr|# coding: utf-8 from io import BytesIO import pytest from openpyxl import load_workbook from img2table.document.image import Image from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: img = Image(sr... | BBox(x1=36, y1=40, x2=840, y2=529) | 90 | 4 |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 56 | 8 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | BBox(x1=236, y1=249, x2=1442, y2=543) | modified | 482cc3020c62bccc878594efe9efa34241bef9a2b0d6c70737bfe2a35616b405 | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | BBox(x1=235, y1=249, x2=1442, y2=543) | 56 | 8 |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 59 | 4 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | "Example of Data Table 2" | modified | ec75a22aced898c30e177142b89d2d2613ba5f69bde001cd3f5d3a3dde642af3 | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | "Example of Data Table 2" | 59 | 4 |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 21 | 4 | assert | test_table_image | # coding: utf-8
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.image import TableImage
from img2table.tables.objects.extraction import BBox
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
ocr_df = OCRDataframe(pl.read_c... | BBox(x1=36, y1=20, x2=770, y2=326) | modified | 27f191606dc5920f0de7e54622bdede06e9a3da475ffce98336ba995334289b4 | assert|test_table_image|# coding: utf-8 import cv2 import polars as pl from img2table.ocr.data import OCRDataframe from img2table.tables.image import TableImage from img2table.tables.objects.extraction import BBox def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) ocr_df = OCRDatafra... | BBox(x1=35, y1=20, x2=770, y2=327) | 21 | 4 |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 24 | 4 | assert | test_table_image | # coding: utf-8
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.image import TableImage
from img2table.tables.objects.extraction import BBox
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
ocr_df = OCRDataframe(pl.read_c... | BBox(x1=962, y1=21, x2=1154, y2=122) | modified | 28622aa76cdb195b741dc28190e366fc9719fc617da8847831342ee7c8efeef5 | assert|test_table_image|# coding: utf-8 import cv2 import polars as pl from img2table.ocr.data import OCRDataframe from img2table.tables.image import TableImage from img2table.tables.objects.extraction import BBox def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) ocr_df = OCRDatafra... | BBox(x1=962, y1=20, x2=1154, y2=123) | 24 | 4 |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | 31 | 4 | assert | test_identify_borderless_tables | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_borderless_tables
def test_identify_borderless_tables():
img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYS... | (93, 45, 1233, 1060) | added | c6fef3804e5f056d2229a6b10b0d14ad7fabf59c08cdba8fd5064158ae414549 | assert|test_identify_borderless_tables|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_borderless_tables def test_identify_borderless_tables(): img = cv2.imread("test_d... | null | null | null |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/tables/processing/borderless_tables/image_segmentation/test_column_segmentation.py | test | xavctn/img2table:tests/tables/processing/borderless_tables/image_segmentation/test_column_segmentation.py | 56 | 4 | assert | test_get_image_columns | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.image_segmentation.column_segmentation import same_column, \
coherent_columns, intertwined_col_groups, ColumnGroup, get_image_columns, identify_remaining_segments, \
segment... | [ColumnGroup(columns=[Cell(x1=392, y1=100, x2=750, y2=960), Cell(x1=61, y1=91, x2=389, y2=961)]) ] | added | 7cd33bddf149798c662f216c6a86cfa7d08b1073dd68908a31db3bdefa8f1d8c | assert|test_get_image_columns|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.image_segmentation.column_segmentation import same_column, \ coherent_columns, intertwined_col_groups, ColumnGroup, get_image_columns, identify_remaining... | null | null | null |
xavctn/img2table | train | 31 | 2993ac13ae794f5c7cd6d6160ec67829bfd4a251 | train | tests/tables/processing/borderless_tables/image_segmentation/test_segmentation.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/image_segmentation/test_segmentation.py | 17 | 4 | assert | test_create_image_segments | # coding: utf-8
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.image_segmentation import create_image_segments
from img2table.tables.processing.borderless_tables.model import ImageSegment
def test_create_image_segments():
img = cv2.imread("test_data/t... | [ImageSegment(x1=61, y1=704, x2=390, y2=958), ImageSegment(x1=61, y1=662, x2=330, y2=689), ImageSegment(x1=61, y1=93, x2=390, y2=651)] | added | 008e961c3737bee9063586211a4f09867335ec7ff805dbf39ab172269dcdce07 | assert|test_create_image_segments|# coding: utf-8 import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.image_segmentation import create_image_segments from img2table.tables.processing.borderless_tables.model import ImageSegment def test_create_image_segments(): im... | null | null | null |
xavctn/img2table | train | 32 | 21f7316e8a3c78bcb801803281b0aea9d4163dbe | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 25 | 4 | assert | test_create_all_rectangles | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import... | [(0, 0, 1, 3), (2, 2, 3, 3)] | added | 552d1795309af47ab85830ccad2cb545b5c6948b7d778eac438613721f813313 | assert|test_create_all_rectangles|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox from img2table.tables.objects.row import Row from img2t... | null | null | null |
xavctn/img2table | train | 32 | 21f7316e8a3c78bcb801803281b0aea9d4163dbe | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 39 | 8 | assert | test_extracted_table_worksheet | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import... | table.nb_columns | added | 38b778a9b00bf20f300d04251046a89dffff2e5792ce6b85363822557659b1c4 | assert|test_extracted_table_worksheet|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox from img2table.tables.objects.row import Row from i... | null | null | null |
xavctn/img2table | train | 32 | 21f7316e8a3c78bcb801803281b0aea9d4163dbe | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 40 | 8 | assert | test_extracted_table_worksheet | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import... | table.nb_rows | added | 5b255022bb35c80cd198f21eacab57e7f06b9c2a20ca9b298376d8f2231f8d01 | assert|test_extracted_table_worksheet|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox from img2table.tables.objects.row import Row from i... | null | null | null |
xavctn/img2table | train | 32 | 21f7316e8a3c78bcb801803281b0aea9d4163dbe | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 46 | 8 | assert | test_extracted_table_worksheet | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import... | table_values | added | 837032f1cbf282a8b3c381aa38780b9daa122c269f0045c652a87468544aa190 | assert|test_extracted_table_worksheet|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox from img2table.tables.objects.row import Row from i... | null | null | null |
xavctn/img2table | train | 33 | 81213b7ed466d2c5e57b2c877de1f072163814ad | train | tests/document/base/test_rotation.py | train | xavctn/img2table:tests/document/base/test_rotation.py | 65 | 4 | assert | test_fix_rotation_image | # coding: utf-8
import cv2
import numpy as np
from sewar import ssim
from img2table.document.base.rotation import rotate_img_with_border, fix_rotation_image, get_connected_components, \
get_relevant_angles, angle_dixon_q_test
def test_get_connected_components():
img = cv2.imread("test_data/test.png", cv2.IMR... | 0.85 | modified | ecd15945ba3997b887a2e658a7159c89193160718bd2b0e54a40491dd4cd9ac9 | assert|test_fix_rotation_image|# coding: utf-8 import cv2 import numpy as np from sewar import ssim from img2table.document.base.rotation import rotate_img_with_border, fix_rotation_image, get_connected_components, \ get_relevant_angles, angle_dixon_q_test def test_get_connected_components(): img = cv2.imread("test_dat... | 0.85 | 65 | 4 |
xavctn/img2table | train | 33 | 81213b7ed466d2c5e57b2c877de1f072163814ad | train | tests/tables/processing/bordered_tables/lines/test_lines.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/lines/test_lines.py | 25 | 4 | assert | test_overlapping_filter | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \
create_lines_from_intersection
def test_overlapping_filter():
... | expected | modified | 3f997f74b2232c1b4bf65b7d62a0eb35d53a68cfc8c2eefd22de5272b2b5d4f5 | assert|test_overlapping_filter|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \ create_lines_from_intersection def test... | expected | 24 | 4 |
xavctn/img2table | train | 33 | 81213b7ed466d2c5e57b2c877de1f072163814ad | train | tests/tables/processing/bordered_tables/lines/test_lines.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/lines/test_lines.py | 47 | 4 | assert | test_create_lines_from_intersection | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \
create_lines_from_intersection
def test_overlapping_filter():
... | [Line(x1=100, x2=100, y1=16, y2=20, thickness=2), Line(x1=100, x2=100, y1=29, y2=30, thickness=2)] | added | f3ff21d2be27805bd734315b48b3ece463e4041aca630cc980741a356c3983a6 | assert|test_create_lines_from_intersection|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \ create_lines_from_intersect... | null | null | null |
xavctn/img2table | train | 33 | 81213b7ed466d2c5e57b2c877de1f072163814ad | train | tests/tables/processing/bordered_tables/lines/test_lines.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/lines/test_lines.py | 70 | 4 | assert | test_remove_word_lines | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \
create_lines_from_intersection
def test_overlapping_filter():
... | [Line(x1=10, x2=10, y1=10, y2=100), Line(x1=975, y1=40, x2=975, y2=40), Line(x1=975, y1=57, x2=975, y2=60)] | added | c3e8d22c77bc305a9907157ffc916fb587e25e93feb87d25ee9d32549aa24b55 | assert|test_remove_word_lines|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \ create_lines_from_intersection def test_... | null | null | null |
xavctn/img2table | train | 33 | 81213b7ed466d2c5e57b2c877de1f072163814ad | train | tests/tables/processing/bordered_tables/lines/test_lines.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/lines/test_lines.py | 98 | 4 | assert | test_detect_lines | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \
create_lines_from_intersection
def test_overlapping_filter():
... | (h_lines_expected, v_lines_expected) | added | 13ac5871ba6aba484412831220c28716ec7e1a05e51ed6dea885873155f3ddda | assert|test_detect_lines|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \ create_lines_from_intersection def test_overl... | null | null | null |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/document/image/test_image.py | train | xavctn/img2table:tests/document/image/test_image.py | 106 | 8 | assert | test_image_excel | # coding: utf-8
from io import BytesIO
import pytest
from openpyxl import load_workbook
from img2table.document.image import Image
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
img = Image(src=1... | expected.worksheets[idx].title | modified | 2f358a92df2ed68c048f094d5df5f636ecbadfa8d2c94afa1419cca1befc35e4 | assert|test_image_excel|# coding: utf-8 from io import BytesIO import pytest from openpyxl import load_workbook from img2table.document.image import Image from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: img = Ima... | expected.worksheets[idx].title | 106 | 8 |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 59 | 4 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | "Example of Data Table 2" | modified | 5c2e2227d10b9bea3879c8f8a5ab1347b876cac4b50cfb1c6fffddebafa11b82 | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | "Example of Data Table 2" | 59 | 4 |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/tables/processing/bordered_tables/lines/test_lines.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/lines/test_lines.py | 98 | 4 | assert | test_detect_lines | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \
create_lines_from_intersection
def test_overlapping_filter():
... | (h_lines_expected, v_lines_expected) | modified | 09c2a40de0eb6d855f13137321a6007dcbb455819448368fb505f5967975d958 | assert|test_detect_lines|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \ create_lines_from_intersection def test_overl... | (h_lines_expected, v_lines_expected) | 98 | 4 |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | 57 | 4 | assert | test_handle_implicit_rows | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_table, \
handle_implicit_rows, compu... | table.nb_rows + 2 | modified | ef9968acb98e979bd7866e43ec336371df4d0fef9c0886dddcb685bd0b5bf52e | assert|test_handle_implicit_rows|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables.implicit_rows import handle_implicit_rows_table, \ ... | table.nb_rows + 2 | 57 | 4 |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/tables/processing/bordered_tables/tables/test_table_creation.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_table_creation.py | 20 | 4 | assert | test_normalize_table_cells | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables.table_creation import normalize_table_cells, cluster_to_table, \
remove_unwanted_elements
... | expected | modified | aed61cde22221f0b9d8481ef4e2dcfd9ad70067468a30f4153e26d1a3d92097d | assert|test_normalize_table_cells|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables.table_creation import normalize_table_cells, cluster_to_table... | expected | 19 | 4 |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/tables/processing/bordered_tables/tables/test_table_creation.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_table_creation.py | 47 | 4 | assert | test_remove_unwanted_elements | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables.table_creation import normalize_table_cells, cluster_to_table, \
remove_unwanted_elements
... | expected | added | 28af34ed59bfe1a54b601761740217fbdeb897ce90e49707b36140bf0d97fe1f | assert|test_remove_unwanted_elements|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables.table_creation import normalize_table_cells, cluster_to_ta... | null | null | null |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/tables/processing/bordered_tables/tables/test_tables.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/tables/test_tables.py | 22 | 4 | assert | test_get_tables | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
from img2table.tables.processing.bordered_tables.tables import get_tables
def test_get_tables():
with open("test_data/cells.json", 'r') as f:
... | expected | added | 2dd0aa0fac4e74e55b49520ed7977f46fbbfeee626ff2f717d049bc3f8bde7d6 | assert|test_get_tables|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.row import Row from img2table.tables.objects.table import Table from img2table.tables.processing.bordered_tables.tables import get_tables def test_get_tables(): with open("test_data/cells.json... | null | null | null |
xavctn/img2table | train | 34 | 8dcc83d506aee50d44f210b9f39a8b58da5b4b98 | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | 31 | 4 | assert | test_identify_borderless_tables | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_borderless_tables
def test_identify_borderless_tables():
img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYS... | (93, 45, 1233, 1060) | modified | c1003bbe3377ac4228df2cc51d22732ad16e03dc160b5e1737706b3f4ed06800 | assert|test_identify_borderless_tables|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_borderless_tables def test_identify_borderless_tables(): img = cv2.imread("test_d... | (93, 45, 1233, 1060) | 31 | 4 |
xavctn/img2table | train | 35 | 544ec66afcdf14532e052cc450adbd4343a6fa81 | train | tests/ocr/paddle/test_paddle.py | train | xavctn/img2table:tests/ocr/paddle/test_paddle.py | 16 | 9 | pytest.raises | test_validators | # coding: utf-8
import json
import cv2
import polars as pl
import pytest
from img2table.document.image import Image
from img2table.ocr.data import OCRDataframe
def test_validators():
from img2table.ocr import PaddleOCR
with pytest.raises( | TypeError) | added | cc08340ea1168f502b69dadaa0ef9c31e962a34e0bdb73a2a23bed63a8ed32ec | pytest.raises|test_validators|# coding: utf-8 import json import cv2 import polars as pl import pytest from img2table.document.image import Image from img2table.ocr.data import OCRDataframe def test_validators(): from img2table.ocr import PaddleOCR with pytest.raises( | null | null | null |
xavctn/img2table | train | 35 | 544ec66afcdf14532e052cc450adbd4343a6fa81 | train | tests/ocr/paddle/test_paddle.py | train | xavctn/img2table:tests/ocr/paddle/test_paddle.py | 31 | 4 | assert | test_paddle_hocr | # coding: utf-8
import json
import cv2
import polars as pl
import pytest
from img2table.document.image import Image
from img2table.ocr.data import OCRDataframe
def test_validators():
from img2table.ocr import PaddleOCR
with pytest.raises(TypeError) as e_info:
ocr = PaddleOCR(lang=12)
def test_pa... | expected | added | d70e24076248774e0a95c85c712a11996ce6a92b3fb1f72720e558d9e8c197b2 | assert|test_paddle_hocr|# coding: utf-8 import json import cv2 import polars as pl import pytest from img2table.document.image import Image from img2table.ocr.data import OCRDataframe def test_validators(): from img2table.ocr import PaddleOCR with pytest.raises(TypeError) as e_info: ocr = PaddleOCR(lang=12) def test_pa... | null | null | null |
xavctn/img2table | train | 35 | 544ec66afcdf14532e052cc450adbd4343a6fa81 | train | tests/ocr/paddle/test_paddle.py | train | xavctn/img2table:tests/ocr/paddle/test_paddle.py | 45 | 4 | assert | test_paddle_content | # coding: utf-8
import json
import cv2
import polars as pl
import pytest
from img2table.document.image import Image
from img2table.ocr.data import OCRDataframe
def test_validators():
from img2table.ocr import PaddleOCR
with pytest.raises(TypeError) as e_info:
ocr = PaddleOCR(lang=12)
def test_pa... | expected | added | 720c2fc1d1a7fc91212b1fd17e4cf79f151fc7f352f947858fe352b4bd5f2d87 | assert|test_paddle_content|# coding: utf-8 import json import cv2 import polars as pl import pytest from img2table.document.image import Image from img2table.ocr.data import OCRDataframe def test_validators(): from img2table.ocr import PaddleOCR with pytest.raises(TypeError) as e_info: ocr = PaddleOCR(lang=12) def test... | null | null | null |
xavctn/img2table | train | 35 | 544ec66afcdf14532e052cc450adbd4343a6fa81 | train | tests/ocr/paddle/test_paddle.py | train | xavctn/img2table:tests/ocr/paddle/test_paddle.py | 60 | 4 | assert | test_paddle_ocr_df | # coding: utf-8
import json
import cv2
import polars as pl
import pytest
from img2table.document.image import Image
from img2table.ocr.data import OCRDataframe
def test_validators():
from img2table.ocr import PaddleOCR
with pytest.raises(TypeError) as e_info:
ocr = PaddleOCR(lang=12)
def test_pa... | expected | added | 454046c636c9d7a4fb9d4cef503beeacbe45f3ceaed9d2a4d7449eeb58ab9b39 | assert|test_paddle_ocr_df|# coding: utf-8 import json import cv2 import polars as pl import pytest from img2table.document.image import Image from img2table.ocr.data import OCRDataframe def test_validators(): from img2table.ocr import PaddleOCR with pytest.raises(TypeError) as e_info: ocr = PaddleOCR(lang=12) def test_... | null | null | null |
xavctn/img2table | train | 36 | d2f3b98a961147b263a19e161fce1f0e38b5494d | train | tests/ocr/doctr/test_doctr.py | train | xavctn/img2table:tests/ocr/doctr/test_doctr.py | 37 | 4 | assert | test_doctr_content | # coding: utf-8
import pickle
import doctr
import polars as pl
from img2table.document.image import Image
from img2table.ocr import DocTR
from img2table.ocr.data import OCRDataframe
def format_content(content: doctr.io.elements.Document):
output = {
id_page: {id_line: [{"value": word.value,
... | format_content(expected) | added | dbc7424f3e457e47e818bcee0aa2f0756e594b0b6ea124fa7a3ae7198ef26c8a | assert|test_doctr_content|# coding: utf-8 import pickle import doctr import polars as pl from img2table.document.image import Image from img2table.ocr import DocTR from img2table.ocr.data import OCRDataframe def format_content(content: doctr.io.elements.Document): output = { id_page: {id_line: [{"value": word.value, "c... | null | null | null |
xavctn/img2table | train | 36 | d2f3b98a961147b263a19e161fce1f0e38b5494d | train | tests/ocr/doctr/test_doctr.py | train | xavctn/img2table:tests/ocr/doctr/test_doctr.py | 50 | 4 | assert | test_doctr_ocr_df | # coding: utf-8
import pickle
import doctr
import polars as pl
from img2table.document.image import Image
from img2table.ocr import DocTR
from img2table.ocr.data import OCRDataframe
def format_content(content: doctr.io.elements.Document):
output = {
id_page: {id_line: [{"value": word.value,
... | expected | added | bddc61050f112f2ae288c79dc864501aafecca63c16b302b695c84b703a51fce | assert|test_doctr_ocr_df|# coding: utf-8 import pickle import doctr import polars as pl from img2table.document.image import Image from img2table.ocr import DocTR from img2table.ocr.data import OCRDataframe def format_content(content: doctr.io.elements.Document): output = { id_page: {id_line: [{"value": word.value, "co... | null | null | null |
xavctn/img2table | train | 36 | d2f3b98a961147b263a19e161fce1f0e38b5494d | train | tests/ocr/doctr/test_doctr.py | train | xavctn/img2table:tests/ocr/doctr/test_doctr.py | 61 | 4 | assert | test_easyocr_document | # coding: utf-8
import pickle
import doctr
import polars as pl
from img2table.document.image import Image
from img2table.ocr import DocTR
from img2table.ocr.data import OCRDataframe
def format_content(content: doctr.io.elements.Document):
output = {
id_page: {id_line: [{"value": word.value,
... | result.df.collect().frame_equal(expected.df.collect()) | added | b98c93fea834315e4582afa485a9319f6255538f831dc2488a86a82c239273c9 | assert|test_easyocr_document|# coding: utf-8 import pickle import doctr import polars as pl from img2table.document.image import Image from img2table.ocr import DocTR from img2table.ocr.data import OCRDataframe def format_content(content: doctr.io.elements.Document): output = { id_page: {id_line: [{"value": word.value,... | null | null | null |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | 31 | 4 | assert | test_identify_borderless_tables | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_borderless_tables
def test_identify_borderless_tables():
img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYS... | (133, 45, 1156, 1060) | modified | 433527a2f6d382f66757ea44b49ffa808c6cd896b68c93a84d97ec5a4018c5f2 | assert|test_identify_borderless_tables|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_borderless_tables def test_identify_borderless_tables(): img = cv2.imread("test_d... | (93, 45, 1233, 1060) | 31 | 4 |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | 101 | 4 | assert | test_get_column_whitespaces | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.column_delimiters.columns import get_coherent_ws_height, \
corresponding_whitespaces, identify_missing_vertical_whitespaces, distance_to_elements, \
get_coherent_whitespace_position, ge... | expected | added | 13d1624a432d400cd12e5da7fe6d74df4810b2e7ab2b569232681d6691509d8d | assert|test_get_column_whitespaces|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.column_delimiters.columns import get_coherent_ws_height, \ corresponding_whitespaces, identify_missing_vertical_whitespaces, distance_to_elements, \ get_cohere... | null | null | null |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | 24 | 4 | assert | test_deduplicate_whitespaces | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \
get_vertical_whitespaces, VertWS, deduplicate_whitespaces
from img2table.tables.processing.borderless_tables.model import ImageSegment, Tabl... | expected | added | 700817e2a8f711f5e898b0ebf2c2c4b7de07955ec600fb9d6cead4b252d6df96 | assert|test_deduplicate_whitespaces|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.column_delimiters.vertical_whitespaces import \ get_vertical_whitespaces, VertWS, deduplicate_whitespaces from img2table.tables.processing.borderless_tables.m... | null | null | null |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/layout/test_column_segmentation.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/layout/test_column_segmentation.py | 31 | 4 | assert | test_coherent_columns | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.layout.column_segmentation import same_column, \
coherent_columns, intertwined_col_groups, ColumnGroup, get_image_columns, identify_remaining_segments, \
segment_image_colum... | not coherent_columns(col_1=col_1, col_2=col_4) | modified | a5411d847d94f4284ea87c2073bd11c8bdb185e7acb14cd184106afedd6841c2 | assert|test_coherent_columns|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.layout.column_segmentation import same_column, \ coherent_columns, intertwined_col_groups, ColumnGroup, get_image_columns, identify_remaining_segments, \ ... | not coherent_columns(col_1=col_1, col_2=col_4) | 30 | 4 |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/layout/test_table_segments.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/layout/test_table_segments.py | 68 | 4 | assert | test_get_table_areas | # coding: utf-8
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.layout.table_segments import get_table_areas, coherent_table_areas, \
table_segment_from_group, get_table_segments
from img2table.tables.processing.borderless_tables.model import ImageSegment, TableSeg... | expected | added | 98b98b95c17fab88eab7d7b3702c2a583d95179121ade15775dc4d953af7672e | assert|test_get_table_areas|# coding: utf-8 from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.layout.table_segments import get_table_areas, coherent_table_areas, \ table_segment_from_group, get_table_segments from img2table.tables.processing.borderless_tables.model import... | null | null | null |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/rows/test_rows.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/rows/test_rows.py | 21 | 4 | assert | test_detect_delimiter_group_rows | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables import detect_delimiter_group_rows
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_detect_delimiter_group_rows():
with open("test_data/d... | set(expected) | modified | 35a9de41280998fa44e644323753c51ccf697d4341495e0d5e279c199a1ec986 | assert|test_detect_delimiter_group_rows|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables import detect_delimiter_group_rows from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow def test_detect_delimiter_grou... | set(expected) | 21 | 4 |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/table/test_table.py | val | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_table.py | 34 | 4 | assert | test_identify_table | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_table
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_identify_table():
w... | (93, 45, 1233, 1060) | added | 5ee668949cd24d313432a3f9f04bb7792cd8b05b78d0139bfbe49488cd735155 | assert|test_identify_table|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_table from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow def test_... | null | null | null |
xavctn/img2table | train | 37 | 5a49ceaa2f5c9c2c99ac69e503dbf065d3bd4872 | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_table_creation.py | 28 | 4 | assert | test_get_table | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
from img2table.tables.processing.borderless_tables.table.table_creation import get_table
def test_get_table():
with open("test_data/delimiter_group.... | (93, 45, 1233, 1060) | added | be0ff571e9ac8266c25e30619692e6b74e768075013838502655c5ed6635c36c | assert|test_get_table|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow from img2table.tables.processing.borderless_tables.table.table_creation import get_table def test_get_table(): with open("test_data/de... | null | null | null |
xavctn/img2table | train | 38 | fcbc3fab051cf085897f57e3d351239659651a55 | train | tests/tables/processing/borderless_tables/layout/test_column_segments.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/layout/test_column_segments.py | 26 | 4 | assert | test_identify_remaining_segments | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \
get_vertical_ws, is_column_section, identify_column_groups, get_column... | expected | added | 0edb3877267cf2e9ecf52cc40470f4d3fc2248e4c67f5eb7cf49f82b768a3c9e | assert|test_identify_remaining_segments|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \ get_vertical_ws, is_column_section,... | null | null | null |
xavctn/img2table | train | 38 | fcbc3fab051cf085897f57e3d351239659651a55 | train | tests/tables/processing/borderless_tables/layout/test_column_segments.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/layout/test_column_segments.py | 57 | 4 | assert | test_is_column_section | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \
get_vertical_ws, is_column_section, identify_column_groups, get_column... | not is_column_section(ws_group=ws_gp_1 + ws_gp_1) | added | eef14f0ba9b48c055dc9423c07ff8465e0111ef83d63282a4d1c78018173f93a | assert|test_is_column_section|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \ get_vertical_ws, is_column_section, identify_... | null | null | null |
xavctn/img2table | train | 38 | fcbc3fab051cf085897f57e3d351239659651a55 | train | tests/tables/processing/borderless_tables/layout/test_column_segments.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/layout/test_column_segments.py | 85 | 4 | assert | test_identify_column_groups | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \
get_vertical_ws, is_column_section, identify_column_groups, get_column... | expected | added | 5f2b5e6f3b217aaa11da6975067b49754ab669477fda47bde66de4a24d6af8f3 | assert|test_identify_column_groups|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \ get_vertical_ws, is_column_section, iden... | null | null | null |
xavctn/img2table | train | 38 | fcbc3fab051cf085897f57e3d351239659651a55 | train | tests/tables/processing/borderless_tables/layout/test_column_segments.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/layout/test_column_segments.py | 128 | 4 | assert | test_get_segments_from_columns | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \
get_vertical_ws, is_column_section, identify_column_groups, get_column... | expected | added | 5ee1d7040a9578ce5177cbb0bbd42aec57096d1c738e5926cceb71af64adb606 | assert|test_get_segments_from_columns|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.layout.column_segments import Rectangle, identify_remaining_segments, \ get_vertical_ws, is_column_section, i... | null | null | null |
xavctn/img2table | train | 38 | fcbc3fab051cf085897f57e3d351239659651a55 | train | tests/tables/processing/borderless_tables/layout/test_image_elements.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/layout/test_image_elements.py | 27 | 4 | assert | test_get_image_elements | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables.layout import get_image_elements
def test_get_image_elements():
img = cv2.imread("test_data/test.bmp", cv2.IMREAD_GRAYSCALE)
... | expected | added | 8de9bcd429dd78af17090c8809d3cfd64de5cd9b0dcb4af83e07fc3b7df2804e | assert|test_get_image_elements|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables.layout import get_image_elements def test_get_image_elements(): img = cv2.imread("test_data/test.bmp", cv... | null | null | null |
xavctn/img2table | train | 38 | fcbc3fab051cf085897f57e3d351239659651a55 | train | tests/tables/processing/borderless_tables/table/test_table.py | val | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_table.py | 36 | 4 | assert | test_identify_table | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import identify_table
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_identify_table():
w... | (93, 45, 1233, 1060) | modified | 0a352f0005d8ba6398281e18f286a1d2d95b2138912046d50b7448a7e54453bb | assert|test_identify_table|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.borderless_tables import identify_table from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow def test_... | (93, 45, 1233, 1060) | 34 | 4 |
xavctn/img2table | train | 39 | 2d35923fc044d65db19c22a984183cc369c97429 | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_table_creation.py | 27 | 4 | assert | test_get_coherent_columns_dimensions | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
from img2table.tables.processing.borderless_tables.table.table_creation import get_table, \
get_coherent_columns_dimensions
def test_get_coherent_co... | expected | added | f129508874fd3e5b410be913dbb497a8145b04039aae2bfc539577d687b983fe | assert|test_get_coherent_columns_dimensions|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow from img2table.tables.processing.borderless_tables.table.table_creation import get_table, \ get_coherent_columns... | null | null | null |
xavctn/img2table | train | 39 | 2d35923fc044d65db19c22a984183cc369c97429 | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | train | xavctn/img2table:tests/tables/processing/borderless_tables/table/test_table_creation.py | 48 | 4 | assert | test_get_table | # coding: utf-8
import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
from img2table.tables.processing.borderless_tables.table.table_creation import get_table, \
get_coherent_columns_dimensions
def test_get_coherent_co... | (93, 45, 1233, 1060) | added | 23a291f4b25ec7e039250c7a6b4075b403c40fa68d807e09aa4f4e828f72fbc3 | assert|test_get_table|# coding: utf-8 import json from img2table.tables.objects.cell import Cell from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow from img2table.tables.processing.borderless_tables.table.table_creation import get_table, \ get_coherent_columns_dimensions def test_g... | null | null | null |
xavctn/img2table | train | 40 | bc5aae62142f459771fc6d244c4a2b096125354c | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 16 | 4 | assert | test_table_image | # coding: utf-8
import cv2
from img2table.tables.image import TableImage
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
tb_image = TableImage(img=image,
min_confidence=50)
result = tb_image.extract_tables(implicit_rows=True)
assert... | (36, 20, 770, 326) | added | 0edda2c6530f4c8e6020c45c8cefa29cbd768068b66d2a4e2d10a07d7aeac94e | assert|test_table_image|# coding: utf-8 import cv2 from img2table.tables.image import TableImage def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) tb_image = TableImage(img=image, min_confidence=50) result = tb_image.extract_tables(implicit_rows=True) assert (result[0].x1, result[0]... | null | null | null |
xavctn/img2table | train | 40 | bc5aae62142f459771fc6d244c4a2b096125354c | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 19 | 4 | assert | test_table_image | # coding: utf-8
import cv2
from img2table.tables.image import TableImage
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
tb_image = TableImage(img=image,
min_confidence=50)
result = tb_image.extract_tables(implicit_rows=True)
assert... | (962, 21, 1154, 122) | added | 90fd658d77ab860028f51f47f12f2fd5940c1ab48ef05ef7a6640419a687db93 | assert|test_table_image|# coding: utf-8 import cv2 from img2table.tables.image import TableImage def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) tb_image = TableImage(img=image, min_confidence=50) result = tb_image.extract_tables(implicit_rows=True) assert (result[0].x1, result[0]... | null | null | null |
xavctn/img2table | train | 41 | d783e47f281379bfa56c7d92ba00af8c00570d75 | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 25 | 4 | assert | test_create_all_rectangles | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan
from img2table.tables.objects.row import Row
from img2table.tables.objects.ta... | [CellSpan(top_row=0, bottom_row=3, col_left=0, col_right=1, value='Test'), CellSpan(top_row=2, bottom_row=3, col_left=2, col_right=3, value='Test')] | modified | f757983188ce6cf70a665066cbb6bc02fee25e90b31b96ffe38af04040a9ca4e | assert|test_create_all_rectangles|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan from img2table.tables.objects.row import Row ... | [(0, 0, 1, 3), (2, 2, 3, 3)] | 25 | 4 |
xavctn/img2table | train | 41 | d783e47f281379bfa56c7d92ba00af8c00570d75 | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 37 | 4 | assert | test_table_html | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan
from img2table.tables.objects.row import Row
from img2table.tables.objects.ta... | expected | added | 0dd6424205d484cd70c6b3435b34f061a1cd07ac52e4df945b471f6e2e4e349b | assert|test_table_html|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan from img2table.tables.objects.row import Row from img2ta... | null | null | null |
xavctn/img2table | train | 41 | d783e47f281379bfa56c7d92ba00af8c00570d75 | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 51 | 8 | assert | test_extracted_table_worksheet | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan
from img2table.tables.objects.row import Row
from img2table.tables.objects.ta... | table.nb_columns | added | e3250bd6c4effb98c9207f0fdbe296f565aa2e216d3c680d661038ec36459a5b | assert|test_extracted_table_worksheet|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan from img2table.tables.objects.row import ... | null | null | null |
xavctn/img2table | train | 41 | d783e47f281379bfa56c7d92ba00af8c00570d75 | train | tests/tables/objects/test_extraction.py | train | xavctn/img2table:tests/tables/objects/test_extraction.py | 52 | 8 | assert | test_extracted_table_worksheet | # coding: utf-8
import json
from io import BytesIO
from xlsxwriter import Workbook
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan
from img2table.tables.objects.row import Row
from img2table.tables.objects.ta... | table.nb_rows | added | 386d39fe94662ffffbb37bd5335b16f1f2fd6aa8f8495b0c3dd50431921f72cc | assert|test_extracted_table_worksheet|# coding: utf-8 import json from io import BytesIO from xlsxwriter import Workbook from img2table.tables.objects.cell import Cell from img2table.tables.objects.extraction import create_all_rectangles, CellPosition, TableCell, BBox, CellSpan from img2table.tables.objects.row import ... | null | null | null |
xavctn/img2table | train | 42 | d132ba66e237dee7a5d67dc638eedeb7af0289b7 | train | tests/tables/processing/bordered_tables/lines/test_lines.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/lines/test_lines.py | 71 | 4 | assert | test_remove_word_lines | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \
create_lines_from_intersection
def test_overlapping_filter():
... | [Line(x1=10, x2=10, y1=10, y2=100, thickness=1), Line(x1=975, y1=40, x2=975, y2=40, thickness=1), Line(x1=975, y1=56, x2=975, y2=60, thickness=1)] | modified | 9ea74d05515a9a64ea425578e4e2bbcf179affcab4303a40308742da5de1567d | assert|test_remove_word_lines|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \ create_lines_from_intersection def test_... | [Line(x1=10, x2=10, y1=10, y2=100), Line(x1=975, y1=40, x2=975, y2=40), Line(x1=975, y1=56, x2=975, y2=60)] | 70 | 4 |
xavctn/img2table | train | 42 | d132ba66e237dee7a5d67dc638eedeb7af0289b7 | train | tests/tables/processing/bordered_tables/lines/test_lines.py | train | xavctn/img2table:tests/tables/processing/bordered_tables/lines/test_lines.py | 99 | 4 | assert | test_detect_lines | # coding: utf-8
import json
import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \
create_lines_from_intersection
def test_overlapping_filter():
... | (h_lines_expected, v_lines_expected) | modified | 3c869bba9600c3961d1de4984c93154df327ae0ecfd04807d463ae3bf4170445 | assert|test_detect_lines|# coding: utf-8 import json import cv2 from img2table.tables.objects.cell import Cell from img2table.tables.objects.line import Line from img2table.tables.processing.bordered_tables.lines import overlapping_filter, detect_lines, remove_word_lines, \ create_lines_from_intersection def test_overl... | (h_lines_expected, v_lines_expected) | 98 | 4 |
xavctn/img2table | train | 43 | 75910d957eb0a941db9e3daee6ad8c30abd442ad | train | tests/document/image/test_image.py | train | xavctn/img2table:tests/document/image/test_image.py | 90 | 4 | assert | test_no_ocr | # coding: utf-8
from io import BytesIO
import pytest
from openpyxl import load_workbook
from img2table.document.image import Image
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
img = Image(src=1... | BBox(x1=46, y1=39, x2=830, y2=529) | modified | 819db3d4d1b0b0c9d3f2a9f4dfc37209ebe8820679ec885dde6d36c743a3ec64 | assert|test_no_ocr|# coding: utf-8 from io import BytesIO import pytest from openpyxl import load_workbook from img2table.document.image import Image from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: img = Image(sr... | BBox(x1=46, y1=38, x2=830, y2=530) | 90 | 4 |
xavctn/img2table | train | 43 | 75910d957eb0a941db9e3daee6ad8c30abd442ad | train | tests/document/image/test_image.py | train | xavctn/img2table:tests/document/image/test_image.py | 107 | 8 | assert | test_image_excel | # coding: utf-8
from io import BytesIO
import pytest
from openpyxl import load_workbook
from img2table.document.image import Image
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
img = Image(src=1... | list(expected.worksheets[idx].values) | modified | 7625bdaab664042585fd2e516bcf2bfb1daae39365b8546fc5476c122c150d27 | assert|test_image_excel|# coding: utf-8 from io import BytesIO import pytest from openpyxl import load_workbook from img2table.document.image import Image from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: img = Ima... | list(expected.worksheets[idx].values) | 107 | 8 |
xavctn/img2table | train | 43 | 75910d957eb0a941db9e3daee6ad8c30abd442ad | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 61 | 8 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | BBox(x1=236, y1=671, x2=1451, y2=971) | modified | 19fa5f7a863cd77eca5e1e9f8ce75a98f070c820ebf71a38ba9006f5d35bf44c | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | BBox(x1=236, y1=672, x2=1451, y2=971) | 61 | 8 |
xavctn/img2table | train | 43 | 75910d957eb0a941db9e3daee6ad8c30abd442ad | train | tests/document/pdf/test_pdf.py | train | xavctn/img2table:tests/document/pdf/test_pdf.py | 69 | 4 | assert | test_pdf_tables | # coding: utf-8
import sys
from io import BytesIO
import pytest
from img2table.document.pdf import PDF
from img2table.ocr import TesseractOCR
from img2table.tables.objects.extraction import BBox
def test_validators():
with pytest.raises(TypeError) as e_info:
pdf = PDF(src=1)
with pytest.raises(Type... | "Example of Data Table 4" | modified | a9debb980f55ad61ff1e917253a02f7d2a6745a6e88a4a792fcd04334d2454bc | assert|test_pdf_tables|# coding: utf-8 import sys from io import BytesIO import pytest from img2table.document.pdf import PDF from img2table.ocr import TesseractOCR from img2table.tables.objects.extraction import BBox def test_validators(): with pytest.raises(TypeError) as e_info: pdf = PDF(src=1) with pytest.raises(Ty... | "Example of Data Table 4" | 69 | 4 |
xavctn/img2table | train | 43 | 75910d957eb0a941db9e3daee6ad8c30abd442ad | train | tests/tables/image/test_image.py | train | xavctn/img2table:tests/tables/image/test_image.py | 19 | 4 | assert | test_table_image | # coding: utf-8
import cv2
from img2table.tables.image import TableImage
def test_table_image():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
tb_image = TableImage(img=image,
min_confidence=50)
result = tb_image.extract_tables(implicit_rows=True)
assert... | (962, 21, 1154, 123) | modified | 69f78a092b14a161e5690ba49df8eb95918acd7296e8aa29bd0fc9037019de25 | assert|test_table_image|# coding: utf-8 import cv2 from img2table.tables.image import TableImage def test_table_image(): image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE) tb_image = TableImage(img=image, min_confidence=50) result = tb_image.extract_tables(implicit_rows=True) assert (result[0].x1, result[0]... | (962, 21, 1154, 122) | 19 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.