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.

Metadata

Release files for reanimator-vlm 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reanimator-vlm 0.1.2
File Size Uploaded Provenance Actions
reanimator_vlm-0.1.2.tar.gz 52.1 kB Without provenance Details for reanimator_vlm-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reanimator-vlm 0.1.2
File Interpreter ABI Platform Actions
reanimator_vlm-0.1.2-py3-none-any.whl Python 3 none any Details for reanimator_vlm-0.1.2-py3-none-any.whl

Total release size: 108.0 kB

Release files / reanimator_vlm-0.1.2.tar.gz

Download URL reanimator_vlm-0.1.2.tar.gz
Size 52.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9427f0198411e1e771b04d00b0e4ed7940cc0fa0fb4dc0a481718020af709dca
BLAKE2b-256 checksum
How to use checksums
e64f21116d9100079481f7e9b5f6289fb255add6b8891753f14eb99d6e0d253d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4

Release files / reanimator_vlm-0.1.2-py3-none-any.whl

Download URL reanimator_vlm-0.1.2-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a37596e4792ee8df33fc5481e3c044a4b29564e616f1caa48457a9afbff9979
BLAKE2b-256 checksum
How to use checksums
bad68b966d577253d96aca5942436792c57a016cfb3fe4706f9a4fe8bdaa16da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4

Security for reanimator-vlm 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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