repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_image.py | test_table_image | assert | collection | 15 | 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)
result = sorted(result, k... | (36, 20, 770, 326) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_image.py | test_table_image | assert | collection | 18 | 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)
result = sorted(result, k... | (962, 21, 1154, 123) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_metrics.py | test_compute_char_length | assert | numeric_literal | 11 | 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, 2) == 8.85
... | 98 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_metrics.py | test_compute_median_line_sep | assert | numeric_literal | 12 | import cv2
from img2table.tables.metrics import compute_char_length, compute_median_line_sep, compute_img_metrics
def test_compute_median_line_sep():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
char_length, cc_array = compute_char_length(img=image)
median_line_sep, contours = compute_m... | 51 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_metrics.py | test_compute_median_line_sep | assert | numeric_literal | 13 | import cv2
from img2table.tables.metrics import compute_char_length, compute_median_line_sep, compute_img_metrics
def test_compute_median_line_sep():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
char_length, cc_array = compute_char_length(img=image)
median_line_sep, contours = compute_m... | 48 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_metrics.py | test_compute_char_length | assert | numeric_literal | 10 | 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, 2) == | 8.85 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_metrics.py | test_compute_char_length | assert | collection | 14 | 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, 2) == 8.85
... | (None, None) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/image/test_metrics.py | test_compute_img_metrics | assert | collection | 15 | import cv2
from img2table.tables.metrics import compute_char_length, compute_median_line_sep, compute_img_metrics
def test_compute_img_metrics():
image = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
char_length, median_line_sep, contours = compute_img_metrics(img=image)
assert round(char_length... | (None, None, None) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_extraction.py | test_table_html | assert | variable | 20 | 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.table import Table... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_extraction.py | test_extracted_table_worksheet | assert | variable | 30 | 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.table import Table... | table_values | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_extraction.py | test_extracted_table_worksheet | assert | complex_expr | 24 | 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.table import Table... | table.nb_rows | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_extraction.py | test_extracted_table_worksheet | assert | complex_expr | 23 | 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.table import Table... | table.nb_columns | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_extraction.py | test_create_all_rectangles | assert | collection | 24 | 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.table import Table... | [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')] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_line.py | test_line | assert | numeric_literal | 7 | from img2table.tables.objects.line import Line
def test_line():
line = Line(x1=0, y1=20, x2=46, y2=73)
assert round(line.angle) == | 49 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_line.py | test_line | assert | numeric_literal | 8 | from img2table.tables.objects.line import Line
def test_line():
line = Line(x1=0, y1=20, x2=46, y2=73)
assert round(line.angle) == 49
assert line.width == | 46 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_line.py | test_line | assert | numeric_literal | 9 | from img2table.tables.objects.line import Line
def test_line():
line = Line(x1=0, y1=20, x2=46, y2=73)
assert round(line.angle) == 49
assert line.width == 46
assert line.height == | 53 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_line.py | test_line | assert | numeric_literal | 10 | from img2table.tables.objects.line import Line
def test_line():
line = Line(x1=0, y1=20, x2=46, y2=73)
assert round(line.angle) == 49
assert line.width == 46
assert line.height == 53
assert round(line.length) == | 70 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_line.py | test_reprocess_line | assert | func_call | 8 | from img2table.tables.objects.line import Line
def test_reprocess_line():
line = Line(x1=20, y1=73, x2=19, y2=20, thickness=18)
reprocessed_line = line.reprocess()
assert reprocessed_line == | Line(x1=20, x2=20, y1=20, y2=73, thickness=18) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_row.py | test_row | assert | numeric_literal | 8 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
def test_row():
row = Row(cells=[Cell(x1=0, x2=20, y1=0, y2=20), Cell(x1=20, x2=40, y1=0, y2=20)])
assert row.x1 == | 0 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_row.py | test_row | assert | numeric_literal | 12 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
def test_row():
row = Row(cells=[Cell(x1=0, x2=20, y1=0, y2=20), Cell(x1=20, x2=40, y1=0, y2=20)])
assert row.x1 == 0
assert row.y1 == 0
assert row.x2 == 40
assert row.y2 == 20
assert row.nb_columns ==... | 2 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_row.py | test_add_cells | assert | numeric_literal | 10 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
def test_add_cells():
row = Row(cells=[Cell(x1=0, x2=20, y1=0, y2=20), Cell(x1=20, x2=40, y1=0, y2=20)])
row.add_cells(cells=Cell(x1=40, x2=60, y1=0, y2=20))
assert row.nb_columns == | 3 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_row.py | test_row | assert | numeric_literal | 10 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
def test_row():
row = Row(cells=[Cell(x1=0, x2=20, y1=0, y2=20), Cell(x1=20, x2=40, y1=0, y2=20)])
assert row.x1 == 0
assert row.y1 == 0
assert row.x2 == | 40 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_row.py | test_row | assert | numeric_literal | 11 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
def test_row():
row = Row(cells=[Cell(x1=0, x2=20, y1=0, y2=20), Cell(x1=20, x2=40, y1=0, y2=20)])
assert row.x1 == 0
assert row.y1 == 0
assert row.x2 == 40
assert row.y2 == | 20 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_row.py | test_add_cells | assert | numeric_literal | 11 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
def test_add_cells():
row = Row(cells=[Cell(x1=0, x2=20, y1=0, y2=20), Cell(x1=20, x2=40, y1=0, y2=20)])
row.add_cells(cells=Cell(x1=40, x2=60, y1=0, y2=20))
assert row.nb_columns == 3
assert row.x2 == | 60 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_row.py | test_split_in_rows | assert | variable | 15 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
def test_split_in_rows():
row = Row(cells=[Cell(x1=0, x2=20, y1=0, y2=20), Cell(x1=20, x2=40, y1=0, y2=20)])
rows_splitted = row.split_in_rows(vertical_delimiters=[10, 15])
expected = [Row(cells=[Cell(x1=0, x2=20,... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_table.py | test_table | assert | numeric_literal | 16 | import json
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
def test_table():
with open("test_data/tables.json", "r") as f:
tables = [Table(rows=[Ro... | 3 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_table.py | test_table | assert | numeric_literal | 17 | import json
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
def test_table():
with open("test_data/tables.json", "r") as f:
tables = [Table(rows=[Ro... | 6 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_table.py | test_table | assert | numeric_literal | 20 | import json
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
def test_table():
with open("test_data/tables.json", "r") as f:
tables = [Table(rows=[Ro... | 2 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_table.py | test_remove_rows | assert | variable | 20 | import json
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
def test_remove_rows():
table = Table(rows=[Row(cells=[Cell(x1=0, x2=100, y1=0, y2=10)]),
... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/objects/test_table.py | test_table | assert | collection | 18 | import json
import polars as pl
from img2table.ocr.data import OCRDataframe
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.row import Row
from img2table.tables.objects.table import Table
def test_table():
with open("test_data/tables.json", "r") as f:
tables = [Table(rows=[Ro... | (35, 20, 770, 326) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/cells/test_cells.py | test_get_cells | assert | variable | 23 | import json
import polars as pl
from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.cells import get_cells
def test_get_cells():
with open("test_data/lines.json", 'r') as f:
data = json.load(f)
h_lines = [Line(... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/lines/test_lines.py | test_create_lines_from_intersection | assert | collection | 42 | 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_create_lines_from_intersection():
l... | [] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/lines/test_lines.py | test_overlapping_filter | assert | variable | 24 | 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():
# Create rows... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/lines/test_lines.py | test_detect_lines | assert | collection | 34 | 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_detect_lines():
thresh = cv2.imread... | (h_lines_expected, v_lines_expected) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/lines/test_lines.py | test_create_lines_from_intersection | assert | collection | 19 | 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_create_lines_from_intersection():
l... | [Line(x1=100, x2=100, y1=10, y2=30, thickness=2)] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/lines/test_lines.py | test_create_lines_from_intersection | assert | collection | 30 | 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_create_lines_from_intersection():
l... | [Line(x1=100, x2=100, y1=16, y2=20, thickness=2), Line(x1=100, x2=100, y1=29, y2=30, thickness=2)] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/lines/test_lines.py | test_remove_word_lines | assert | collection | 20 | 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_remove_word_lines():
with open("tes... | [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)] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | test_compute_table_median_row_sep | assert | numeric_literal | 22 | 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, compute_table_median_... | 55.5 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/tables/test_implicit_rows.py | test_handle_implicit_rows_table | assert | complex_expr | 26 | 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, compute_table_median_... | table.nb_rows + 2 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/tables/test_semi_bordered.py | test_add_semi_bordered_cells | assert | func_call | 24 | from img2table.tables.objects.cell import Cell
from img2table.tables.objects.line import Line
from img2table.tables.processing.bordered_tables.tables import add_semi_bordered_cells
def test_add_semi_bordered_cells():
cluster = [Cell(x1=100, x2=200, y1=100, y2=200)]
lines = [Line(x1=50, x2=205, y1=100, y2=100),... | sorted(expected, key=lambda c: c.bbox()) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/tables/test_table_creation.py | test_normalize_table_cells | assert | variable | 19 | 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
def test_normal... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/bordered_tables/tables/test_tables.py | test_get_tables | assert | variable | 25 | import json
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.bordered_tables.tables import get_tables
def test_get_tables():
with open("test_d... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | test_identify_borderless_tables | assert | numeric_literal | 27 | 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():
thresh = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
wit... | 1 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | test_identify_borderless_tables | assert | numeric_literal | 29 | 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():
thresh = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
wit... | 9 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | test_identify_borderless_tables | assert | numeric_literal | 28 | 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():
thresh = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
wit... | 16 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/borderless_tables/test_borderless_tables.py | test_identify_borderless_tables | assert | collection | 30 | 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():
thresh = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
wit... | (134, 45, 1155, 1060) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/borderless_tables/test_whitespaces.py | test_get_whitespaces | assert | numeric_literal | 20 | import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import ImageSegment
from img2table.tables.processing.borderless_tables.whitespaces import get_whitespaces, adjacent_whitespaces, \
identify_coherent_v_whitespaces, get_relevant_vertical_whitespaces
... | 38 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/borderless_tables/test_whitespaces.py | test_get_relevant_vertical_whitespaces | assert | numeric_literal | 21 | import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import ImageSegment
from img2table.tables.processing.borderless_tables.whitespaces import get_whitespaces, adjacent_whitespaces, \
identify_coherent_v_whitespaces, get_relevant_vertical_whitespaces
... | 18 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/borderless_tables/test_whitespaces.py | test_identify_coherent_v_whitespaces | assert | func_call | 27 | import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables.model import ImageSegment
from img2table.tables.processing.borderless_tables.whitespaces import get_whitespaces, adjacent_whitespaces, \
identify_coherent_v_whitespaces, get_relevant_vertical_whitespaces
... | set(expected) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_column_delimiters.py | test_identify_column_groups | assert | variable | 29 | 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, TableSegment, DelimiterGroup
def test_identify_column_groups():
with open("test_data/table_segme... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_distance_to_elements | assert | collection | 13 | 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, get_column_whitesp... | (1, 7) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_distance_to_elements | assert | collection | 14 | 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, get_column_whitesp... | (2, 7) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_identify_missing_vertical_whitespaces | assert | variable | 22 | 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, get_column_whitesp... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_get_coherent_whitespace_position | assert | func_call | 14 | 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, get_column_whitesp... | Cell(x1=23, x2=23, y1=0, y2=100) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_get_coherent_whitespace_position | assert | func_call | 17 | 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, get_column_whitesp... | Cell(x1=78, x2=78, y1=0, y2=100) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_get_coherent_whitespace_position | assert | func_call | 20 | 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, get_column_whitesp... | Cell(x1=46, x2=46, y1=0, y2=100) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_get_coherent_whitespace_position | assert | func_call | 23 | 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, get_column_whitesp... | Cell(x1=37, x2=37, y1=0, y2=100) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_get_coherent_ws_height | assert | collection | 20 | 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, get_column_whitesp... | [Cell(x1=50, x2=60, y1=18, y2=64)] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_columns.py | test_get_coherent_ws_height | assert | collection | 19 | 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, get_column_whitesp... | [Cell(x1=0, x2=100, y1=18, y2=82), Cell(x1=200, x2=300, y1=18, y2=82)] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | test_get_vertical_whitespaces | assert | numeric_literal | 23 | 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, TableSegment
def tes... | 4 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | test_get_vertical_whitespaces | assert | numeric_literal | 24 | 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, TableSegment
def tes... | 0 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/column_delimiters/test_vertical_whitespaces.py | test_deduplicate_whitespaces | assert | variable | 22 | 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, TableSegment
def tes... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_column_segments.py | test_segment_image_columns | assert | numeric_literal | 26 | 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_group_segments,... | 3 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_column_segments.py | test_identify_remaining_segments | assert | variable | 25 | 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_group_segments,... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_image_elements.py | test_get_image_elements | assert | variable | 25 | 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():
thresh = cv2.imread("test_data/test.bmp", cv2.IMREAD_GRAYSCALE)
with open("t... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_layout.py | test_segment_image | assert | numeric_literal | 21 | import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import segment_image
def test_segment_image():
thresh = cv2.imread("test_data/test.bmp", 0)
with open("test_data/lines.json", 'r') as f:
data = json.load(f)
lines = [Line(**el... | 4 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_layout.py | test_segment_image | assert | numeric_literal | 24 | import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import segment_image
def test_segment_image():
thresh = cv2.imread("test_data/test.bmp", 0)
with open("test_data/lines.json", 'r') as f:
data = json.load(f)
lines = [Line(**el... | 1 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_layout.py | test_segment_image | assert | numeric_literal | 25 | import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import segment_image
def test_segment_image():
thresh = cv2.imread("test_data/test.bmp", 0)
with open("test_data/lines.json", 'r') as f:
data = json.load(f)
lines = [Line(**el... | 5 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_layout.py | test_segment_image | assert | numeric_literal | 29 | import json
import cv2
from img2table.tables.objects.line import Line
from img2table.tables.processing.borderless_tables import segment_image
def test_segment_image():
thresh = cv2.imread("test_data/test.bmp", 0)
with open("test_data/lines.json", 'r') as f:
data = json.load(f)
lines = [Line(**el... | 6 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/layout/test_table_segments.py | test_get_table_areas | assert | variable | 66 | 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, TableSegment
def test_ge... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_get_delimiter_group_row_separation | assert | numeric_literal | 18 | 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_delimiter_group_rows,... | 66 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_identify_rows | assert | numeric_literal | 17 | 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_delimiter_group_rows,... | 17 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_identify_rows | assert | numeric_literal | 18 | 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_delimiter_group_rows,... | 45 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_identify_rows | assert | numeric_literal | 20 | 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_delimiter_group_rows,... | 93 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_score_row_group | assert | numeric_literal | 20 | 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_delimiter_group_rows,... | 0.27 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_identify_rows | assert | numeric_literal | 19 | 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_delimiter_group_rows,... | 1147 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_identify_rows | assert | numeric_literal | 21 | 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_delimiter_group_rows,... | 1233 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_delimiter_group_rows.py | test_get_rows_from_overlapping_cluster | assert | collection | 17 | 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_delimiter_group_rows,... | [TableRow(cells=[Cell(x1=20, x2=100, y1=0, y2=8)]), TableRow(cells=[Cell(x1=20, x2=100, y1=11, y2=20), Cell(x1=20, x2=100, y1=11, y2=20)])] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/rows/test_rows.py | test_detect_delimiter_group_rows | assert | func_call | 19 | 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/delimiter_group.jso... | set(expected) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/table/test_table.py | test_identify_table | assert | numeric_literal | 27 | import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables import identify_table
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_identify_table():
with open("test_data/delimiter_group.json", "r") as f:
dat... | 8 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/table/test_table.py | test_identify_table | assert | numeric_literal | 26 | import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables import identify_table
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_identify_table():
with open("test_data/delimiter_group.json", "r") as f:
dat... | 16 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/table/test_table.py | test_identify_table | assert | collection | 28 | import json
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.borderless_tables import identify_table
from img2table.tables.processing.borderless_tables.model import DelimiterGroup, TableRow
def test_identify_table():
with open("test_data/delimiter_group.json", "r") as f:
dat... | (93, 45, 1233, 1060) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | test_get_table | assert | numeric_literal | 26 | 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_table():
with open("test_... | 8 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | test_get_table | assert | numeric_literal | 25 | 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_table():
with open("test_... | 16 | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | test_get_coherent_columns_dimensions | assert | variable | 25 | 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_columns_dimensions()... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/borderless_tables/table/test_table_creation.py | test_get_table | assert | collection | 27 | 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_table():
with open("test_... | (93, 45, 1233, 1060) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/common/test_common.py | test_get_contours_cell | assert | variable | 22 | import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.common import is_contained_cell, merge_contours, get_contours_cell
def test_get_contours_cell():
img = cv2.imread("test_data/test.jpg", cv2.IMREAD_GRAYSCALE)
cell = Cell(x1=0, x2=img.shape[1], y1=0, y2=img.shape[0])
... | expected | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/common/test_common.py | test_merge_contours | assert | func_call | 17 | import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.common import is_contained_cell, merge_contours, get_contours_cell
def test_merge_contours():
contours = [Cell(x1=0, x2=20, y1=0, y2=20),
Cell(x1=0, x2=20, y1=10, y2=20),
Cell(x1=60, x2=80, y... | set(expected) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/common/test_common.py | test_merge_contours | assert | variable | 21 | import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.common import is_contained_cell, merge_contours, get_contours_cell
def test_merge_contours():
contours = [Cell(x1=0, x2=20, y1=0, y2=20),
Cell(x1=0, x2=20, y1=10, y2=20),
Cell(x1=60, x2=80, y... | expected_vertical | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/common/test_common.py | test_merge_contours | assert | variable | 25 | import cv2
from img2table.tables.objects.cell import Cell
from img2table.tables.processing.common import is_contained_cell, merge_contours, get_contours_cell
def test_merge_contours():
contours = [Cell(x1=0, x2=20, y1=0, y2=20),
Cell(x1=0, x2=20, y1=10, y2=20),
Cell(x1=60, x2=80, y... | expected_horizontal | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/prepare_image/test_prepare_image.py | test_prepare_image | assert | func_call | 13 | import cv2
import numpy as np
from img2table.tables.processing.prepare_image import prepare_image
def test_prepare_image():
img = cv2.imread("test_data/test.png", cv2.IMREAD_GRAYSCALE)
result = prepare_image(img=img)
# Check that the average value of a pixel is darker in original image
assert np.me... | np.mean(result) | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/text/test_titles.py | test_get_title_tables | assert | collection | 22 | import json
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
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.text.titles import get_title_tables
def test_get_title_t... | [] | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xavctn/img2table | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | train | train | tests/tables/processing/text/test_titles.py | test_get_title_tables | assert | string_literal | 21 | import json
import cv2
import polars as pl
from img2table.ocr.data import OCRDataframe
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.text.titles import get_title_tables
def test_get_title_t... | "10 most populous countries" | 427e7c93b88784af865786890db9917fa3a0dc98 | 47 | v2_extractor_at_anchor |
xaviml/controllerx | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | train | train | tests/integ_tests/integ_test.py | test_integ_configs | assert_* | variable | 94 | import asyncio
import glob
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
import pytest
import yaml
from appdaemon.plugins.hass.hassapi import Hass
from cx_core.type_controller import TypeController
from pytest_mock.plugin import MockerFixture
from tests.test_utils import get_controller
... | calls) | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | v2_extractor_at_anchor |
xaviml/controllerx | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | train | train | tests/integ_tests/integ_test.py | test_integ_configs | assert | variable | 89 | import asyncio
import glob
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
import pytest
import yaml
from appdaemon.plugins.hass.hassapi import Hass
from cx_core.type_controller import TypeController
from pytest_mock.plugin import MockerFixture
from tests.test_utils import get_controller
... | expected_calls_count | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | v2_extractor_at_anchor |
xaviml/controllerx | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | train | train | tests/test_utils.py | wrap_execution | pytest.raises | variable | 57 | import importlib
import os
import pkgutil
from contextlib import contextmanager
from typing import TYPE_CHECKING, Callable, Generator, Optional
import pytest
from _pytest._code.code import ExceptionInfo
from mock import MagicMock
from pytest_mock.plugin import MockerFixture
def fake_fn(to_return=None, async_: bool = ... | exception) | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | v2_extractor_at_anchor |
xaviml/controllerx | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | train | train | tests/unit_tests/cx_core/action-types/predefined_action_type_test.py | test_get_arguments_general | assert | variable | 83 | from typing import Any, Dict, Optional, Tuple
import pytest
from cx_const import ActionFunctionWithParams, ActionParams, TypeAction
from cx_core.action_type.predefined_action_type import _get_action, _get_arguments
from cx_core.integration import EventData
from tests.test_utils import fake_fn, wrap_execution
@pytest... | output | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | v2_extractor_at_anchor |
xaviml/controllerx | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | train | train | tests/unit_tests/cx_core/action-types/predefined_action_type_test.py | test_get_action | assert | variable | 24 | from typing import Any, Dict, Optional, Tuple
import pytest
from cx_const import ActionFunctionWithParams, ActionParams, TypeAction
from cx_core.action_type.predefined_action_type import _get_action, _get_arguments
from cx_core.integration import EventData
from tests.test_utils import fake_fn, wrap_execution
@pytest... | expected | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | v2_extractor_at_anchor |
xaviml/controllerx | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | train | train | tests/unit_tests/cx_core/controller_test.py | test_call_action | assert_* | variable | 72 | from collections import defaultdict
from typing import Any, Dict, List, Optional, Set, Union
import appdaemon.plugins.hass.hassapi as hass
import pytest
from cx_const import ActionEvent
from cx_core import integration as integration_module
from cx_core.action_type import ActionsMapping
from cx_core.action_type.base im... | delay) | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | v2_extractor_at_anchor |
xaviml/controllerx | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | train | train | tests/unit_tests/cx_core/controller_test.py | test_call_action | assert_* | variable | 70 | from collections import defaultdict
from typing import Any, Dict, List, Optional, Set, Union
import appdaemon.plugins.hass.hassapi as hass
import pytest
from cx_const import ActionEvent
from cx_core import integration as integration_module
from cx_core.action_type import ActionsMapping
from cx_core.action_type.base im... | handle) | 3f13f042b6a877af6fad950fc6a4001461fc86cf | 73 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.