Skip to main content

REANIMATOR: VLM-Powered Document Parsing & Synthetic Relevance Assessment

PyPI version License: MIT Python Version Documentation

REANIMATOR is a Python toolkit for document collection processing, structured multi-modal element parsing (tables, figures, formulas, text), and domain-independent synthetic relevance assessment using Vision-Language Models (VLMs) and LLMs (UMBRELA framework).

📖 HTML & Technical Documentation: Full API reference and guide hosted in docs/ and compiled PyData HTML docs in docs/_build/html/index.html.


📦 Quick Installation

Install directly via pip:

pip install reanimator-vlm

Or install all optional dependencies (local VLM inference, retrieval models):

pip install "reanimator-vlm[all]"

🚀 Quickstart Example

You can import directly using either from reanimator import * or from reanimator_vlm import *:

from reanimator import (
    ReanimatorVLM,
    ProjectCollection,
    OpenAIVisionBackend,
    CachedBackend,
    RelevanceEvaluator,
)

# 1. Initialize VLM Backend & Processing Pipeline
api_backend = OpenAIVisionBackend(
    model="rednote-hilab/dots.mocr",
    base_url="http://localhost:6543/v1",
    api_key="not-needed",
    use_structured_layout=True,
)
backend = CachedBackend(api_backend, cache_dir="./.md_cache")
pipeline = ReanimatorVLM(backend=backend)

# 2. Define Disk-Backed Project Workspace Collection
project = ProjectCollection(
    project_dir="./my_project_data",
    name="COVID-19 Research Collection",
    arxiv_ids=["2504.07584"],
    dois=["10.18653/v1/2024.findings-acl.712"],
    topics=[
        {
            "topic_id": "101",
            "title": "Table parsing performance",
            "description": "Evaluation of table parsing quality in scientific literature."
        }
    ]
)

# 3. Batch Process Documents (Streams & Saves Directly to Disk)
processed_ids = project.process(pipeline, verbose=True)

# 4. Lazy Document Inspection (No RAM Bloat)
for doc in project.iter_documents():
    print(f"Doc: {doc.doc_id} | Tables: {len(doc.tables)} | Figures: {len(doc.figures)}")

# 5. Domain-Independent Synthetic Relevance Assessment (UMBRELA Framework)
evaluator = RelevanceEvaluator(
    backend=backend,
    model_name="synthetic-dots.mocr",
    domain_instruction="general information retrieval and document intelligence",
)

# Evaluate target modality ('tables', 'figures', 'formulas', 'text_only', 'full_document', 'chunks')
judgements = project.run_relevance_assessment(evaluator, modality="tables", verbose=True)

# Export standard TREC qrels format
# Saved to ./my_project_data/relevance/qrels_tables.txt

📑 Core Features

  • Multi-Modal Document Parsing: High-accuracy table extraction, figure grounding, formula recognition, and bounding box normalization using dots.mocr or Gemini.
  • ProjectCollection Workspace: Disk-backed document workspace managing PDFs, parsed JSONs, VLM cache, figure crops, and relevance judgments without keeping large collections in RAM.
  • Synthetic Relevance Engine (reanimator.relevance): Generates 4-level UMBRELA relevance judgments across flexible modalities (full_document, text_only, tables, figures, formulas, chunks).
  • Standard TREC Qrels Export: Output relevance judgments directly into standard TREC qrels file format for IR evaluation.

📄 License

Distributed under the MIT License.

Download files

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

Source Distribution

reanimator_vlm-0.1.2.tar.gz (52.1 kB view details)

Uploaded Source

Built Distribution

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

reanimator_vlm-0.1.2-py3-none-any.whl (55.9 kB view details)

Uploaded Python 3

File details

Details for the file reanimator_vlm-0.1.2.tar.gz.

File metadata

  • Download URL: reanimator_vlm-0.1.2.tar.gz
  • Upload date:
  • Size: 52.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for reanimator_vlm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9427f0198411e1e771b04d00b0e4ed7940cc0fa0fb4dc0a481718020af709dca
MD5 0776ec93a773c0f88123aa5538295cb8
BLAKE2b-256 e64f21116d9100079481f7e9b5f6289fb255add6b8891753f14eb99d6e0d253d

See more details on using hashes here.

File details

Details for the file reanimator_vlm-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: reanimator_vlm-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 55.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for reanimator_vlm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5a37596e4792ee8df33fc5481e3c044a4b29564e616f1caa48457a9afbff9979
MD5 d0b7b9ea63223f5f4f9849bb02f03763
BLAKE2b-256 bad68b966d577253d96aca5942436792c57a016cfb3fe4706f9a4fe8bdaa16da

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page