ispras/dedoc

Dedoc is a library (service) for automate documents parsing and bringing to a uniform format. It automatically extracts content, logical structure, tables, and meta information from textual electronic documents. (Parse document; Document content extraction; Logical structure extraction; PDF parser; Scanned document parser; DOCX parser; HTML parser

What it solves

Dedoc is a universal system for converting various document formats into a unified output format. It solves the problem of extracting logical structure (like headings and lists) and content (tables, text formatting, and metadata) from a wide range of semi-structured and unstructured data, including Office documents, PDFs, images, and HTML.

How it works

Dedoc uses a combination of specialized libraries and machine learning techniques to process different file types:

  • Office and Web formats: Uses libraries like python-docx and BeautifulSoup to analyze inner representations of DOCX, XLSX, and HTML.
  • PDFs: Employs pdfminer-six for copyable PDFs and a custom interpreter for graphics printing to extract formatting.
  • Scanned Documents: Uses Tesseract OCR and OpenCV for image preprocessing, along with machine learning models to detect document orientation, column layout, and bold text.
  • Structure Extraction: Automatically determines the document's hierarchical tree structure regardless of the input format.

Who it’s for

It is designed for developers building automatic document analysis pipelines, information analytic systems, and natural language processing (NLP) systems that require structured data as a first step before further analysis.

Highlights

  • Universal Format Support: Handles DOC/DOCX, ODT, XLS/XLSX, CSV, TXT, JSON, PDF, HTML, and images (PNG, JPG).
  • Logical Structure Extraction: Converts documents into a tree storing headings and lists of any level.
  • Advanced PDF Handling: Automatically verifies the correctness of the textual layer in PDFs.
  • Table Recognition: Extracts table data from multiple formats, including complex multipage tables with explicit borders using contour analysis.
  • Extensible Architecture: Allows for easy addition of new document formats and flexible output data formats.

Related

  • Project
  • Project
  • Project
  • Project
  • Project