{
"cells": [
{
"cell_type": "markdown",
"id": "216c9250",
"metadata": {},
"source": [
"### Import dependencies"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "6b0fae90",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"time: 437 ms (started: 2026-05-10 20:26:28 +02:00)\n"
]
}
],
"source": [
"%load_ext autotime\n",
"\n",
"import os\n",
"from IPython.display import display_html, display\n",
"from PIL import Image as PILImage\n",
"from utils import display_borderless_tables\n",
"\n",
"from img2table.document import Image\n",
"from img2table.ocr import TesseractOCR"
]
},
{
"cell_type": "markdown",
"id": "7030a68c",
"metadata": {},
"source": [
"### Borderless table extraction\n",
"\n",
"An algorithm for identification and extraction of borderless tables (i.e not fully bordered). However, the detection might not be as reliable as the one for bordered tables, especially for tables with multi-line cells."
]
},
{
"cell_type": "markdown",
"id": "d13d2df0",
"metadata": {},
"source": [
"#### Image used\n",
"
"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "25459e6c",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
| \n", " | 0 | \n", "1 | \n", "2 | \n", "3 | \n", "
|---|---|---|---|---|
| 0 | \n", "Standard | \n", "Disclosure | \n", "Description | \n", "Location of information | \n", "
| 1 | \n", "Organization Profile | \n", "102-1 | \n", "Name of the organization | \n", "Cognizant | \n", "
| 2 | \n", "NaN | \n", "102-2 | \n", "Activities, brands, products, and\\nservices | \n", "2020 10-K | \n", "
| 3 | \n", "NaN | \n", "102-3 | \n", "Location of headquarters | \n", "Teaneck, New Jersey (U.S) | \n", "
| 4 | \n", "NaN | \n", "102-4 | \n", "Location of operations | \n", "2020 Annual Report | \n", "
| 5 | \n", "NaN | \n", "102-5 | \n", "Ownership and legal form | \n", "Cognizant Technology Solutions Corp is listed ... | \n", "
| 6 | \n", "NaN | \n", "102-6 | \n", "Markets served | \n", "2020 10-K | \n", "
| 7 | \n", "NaN | \n", "102-7 | \n", "Scale of the organization | \n", "2020 10-K | \n", "
| 8 | \n", "NaN | \n", "102-8 | \n", "Information on employees and\\nother workers | \n", "2020 ESG Report: Our global business (p.7) | \n", "
| 9 | \n", "NaN | \n", "102-9 | \n", "Supply chain | \n", "2020 Annual Report\\n2020 ESG Report: Supply ch... | \n", "
| 10 | \n", "NaN | \n", "102-10 | \n", "Significant changes to the\\norganization and i... | \n", "2020 Annual Report\\n2020 ESG Report: Supply ch... | \n", "
| 11 | \n", "NaN | \n", "102-11 | \n", "Precautionary principle or\\napproach | \n", "2020 Annual Report | \n", "
| 12 | \n", "Strategy | \n", "102-14 | \n", "Statement from senior\\ndecision-maker | \n", "2020 ESG Report: Message from our Chief Execut... | \n", "
| 13 | \n", "Ethics and Integrity | \n", "102-16 | \n", "Values, principles, standards, and\\nnorms of b... | \n", "2020 ESG Report: Ethics and compliance (p.35-36) | \n", "
| 14 | \n", "Governance | \n", "102-18 | \n", "Governance structure | \n", "2020 Annual Report\\n2020 ESG Report: Our ESG o... | \n", "