Parsr Documentation

repository·master·Indexed 27 days ago

https://github.com/axa-group/parsr

A minimal-footprint document cleaning, parsing, and extraction toolchain that converts images, PDFs, DOCX, and EML files into structured data formats including JSON, Markdown, CSV/Pandas DataFrames, and TXT. The ecosystem includes a Python client for API interaction, a GUI for visualization, and specialized utilities like parsr-fix-pdf-font for repairing broken unicode maps in PDFs using Tesseract.js. It supports various extraction backends including ABBYY FineReader Server and Amazon Textract.

Tokens
29.6K
Snippets
91
Records
240
Agent score
91%

What's inside Parsr

  1. Overview of the ML Heading Detection Module

    master

    The ML Heading Detection Module is designed to create heading elements from a collection of paragraphs. It identifies heading lines from all lines contained within paragraphs by applying Machine Learning methods.

    Key features:

    • Heading Detection: Uses properties such as font styles, text color, and word count to determine if a block of text is a heading.
    • Heading Level Calculation: For every detected heading, the module calculates its hierarchical level based on properties like font size, font weight, and color.

    Dependency: This module requires the LinesToParagraphModule to function.

  2. Overview of Parsr Output Modules

    master

    Parsr uses Output Modules to generate processed, enriched, and structured output files. Each module is responsible for a specific file type and provides a different level of data granularity.

    Available output formats include:

    • JSON: Full structured output.
    • Simple JSON: A simplified version of the JSON output.
    • Markdown: Document content converted to Markdown format.
    • Text: Plain text extraction.
    • CSV: Data exported in Comma-Separated Values format.
    • PDF: PDF-related output generation.
  3. Overview of Parsr capabilities

    master

    Parsr is a toolchain for cleaning, analyzing, and extracting data from images (.jpg, .png, .tiff, etc.) and PDFs.

    Key features include:

    • Document hierarchy regeneration
    • Detection of words, lines, paragraphs, titles, lists, and page numbers
    • Table detection and reconstruction
    • Named Entity Recognition (dates, percentages, etc.)
    • Key-value pair detection (for form extraction)
    • Header and footer detection
    • Link detection
    • Whitespace removal

    Supported output formats:

    • JSON
    • Markdown
    • Text
    • CSV (for tables) or Pandas Dataframes
    • PDF
  4. Overview of Parsr Python API capabilities in Jupyter

    master

    The Parsr Jupyter Notebook demonstrates how to interact with the Parsr API using a Python interface. The notebook covers the following workflows:

    1. Connecting to the Parsr API: Establishing a connection to the service.
    2. Document Submission: Sending a single document or an entire folder to the Parsr API.
    3. JSON Retrieval: Retrieving the complete JSON output from the API.
    4. Multi-format Retrieval: Extracting output in formats such as Markdown, text, and tables (CSV and Pandas Dataframes).
    5. Output Reconstruction: Using the parsr_output_interpreter class to reconstruct usable elements from a previously downloaded Parsr JSON file.
  5. Overview of Parsr Processing Modules

    master
    Processing modules in Parsr are responsible for cleaning and enriching extracted raw output. Each module performs a specific operation on a document representation, generates a new valid Document, and passes it to the next module in the pipeline. Modules can be configured with specific parameters to tailor their behavior.
  6. Get started with Parsr

    master

    The Parsr documentation provides a comprehensive set of guides to help you install, configure, and use the Parsr ecosystem. To begin using Parsr, follow the sequence of guides provided in the documentation index:

    1. Installation: Set up the Parsr environment.
    2. Usage: Learn how to interact with the system.
    3. Configuration: Customize Parsr settings.
    4. API Guide: Detailed technical reference for the API.
    5. JSON Output: Understand the structure of the extracted data.
    6. ABBYY FineReader: Integration details for ABBYY FineReader.
    7. Architecture: Deep dive into the system design.
    8. Dependencies: Review required software and libraries.
    9. Docker: Instructions for containerized deployment.