Skip to main content

REANIMATOR: VLM-Powered Document Parsing & Synthetic Relevance Assessment

PyPI version License: MIT Python Version

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).


📦 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.0.tar.gz (51.7 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.0-py3-none-any.whl (55.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reanimator_vlm-0.1.0.tar.gz
  • Upload date:
  • Size: 51.7 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.0.tar.gz
Algorithm Hash digest
SHA256 3b886547edebf1e6ecba0d3465983634dcc75cd31f503106499f182c8db82ebf
MD5 9702741d28fe6692c74112979f3dd11a
BLAKE2b-256 cbdcdde36d7ef2e6a8c23946240e34ef705866238651034b9ca815dd0df822a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reanimator_vlm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 55.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb7f13fe9ed4b7e32ea4658acb3ccb8349aef8841461b6c65fef2083824137b4
MD5 d7466cc4695f14395316e75a74bccad8
BLAKE2b-256 b4a8dda7271ded65713d6ea18d4f546135dc09cac6b9473c262941cdc73a12e3

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

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