Skip to main content

End-to-End table structure detector

Project description

Tabledetector

Tabledetector is a Python package that takes PDFs or Images as input, checks the alignment, re-aligns if required, detects the table structure, extracts data, return as pandas dataframe for further use. The current implementation focuses on bordered, semibordered and unbordered table structures.

Features

  • PDF Input: Accepts PDF/Image files as input for table detection.
  • Alignment Check: Verifies and adjusts alignment of input.
  • Table Detection: Identifies bordered, semibordered and unbordered tables in the PDF/Image File.
  • Table Extraction: Extract the tabular data in the form of dataframe.

Libraries Used

  • Python 3.x
  • OpenCV
  • NumPy
  • pdf2image
  • Pillow
  • scipy
  • jinja2
  • easyocr
  • pandas

Create and Activate Environment

conda create -n <env_name> python=3.7
conda activate <env_name>

Installation of package using pip

pip install tabledetector

Clone the repository for latest development release

git clone https://github.com/rajban94/TableDetector.git

Usage

For bordered table detection:

import tabledetector as td
result = td.detect(pdf_path="pdf_path", method="bordered")

For semibordered table detection:

import tabledetector as td
result = td.detect(pdf_path="pdf_path", method="semibordered")

For unbordered table detection:

import tabledetector as td
result = td.detect(pdf_path="pdf_path", method="unbordered")

If no method is mentioned in that case it will check for all the methods and will provide the result accordingly.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tabledetector-1.0.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tabledetector-1.0.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file tabledetector-1.0.0.tar.gz.

File metadata

  • Download URL: tabledetector-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for tabledetector-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5b42c23084831bfb80afff1a6ee3cbf50d84248deb3a35e3a7756dbe4f9df18d
MD5 7f4b2572d80fea8c24838a4072dd7a47
BLAKE2b-256 7903318e3be332cb220bcd1ab096f1e72d34dbd8c5c37255b4b9eb5a49074726

See more details on using hashes here.

File details

Details for the file tabledetector-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tabledetector-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for tabledetector-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ea079fffde2730c45ebe43354087435aefc1dcd8a465cc6a2998858ed491049
MD5 4fef01ceee229fdc1917d4a13fd30a69
BLAKE2b-256 80a198b79087a35f9a8ec7dbff80cb1ea30d84f81c2b2b3a1e84b01f533bb99f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page