API Reference#

This section provides comprehensive class, method, and function documentation for all modules in REANIMATOR-VLM.


Data Models (reanimator.models)#

Class

Description

Document

Top-level container representing a processed document.

Table

Extracted table with DataFrame content, caption, and position.

Figure

Extracted figure with caption, image path, and position.

Formula

Extracted math formula or equation.

Topic

Retrieval query topic object.

Judgement

Synthetic 4-level relevance judgment object.


Document Pipeline (reanimator.pipeline)#

Class

Description

ReanimatorVLM

Main document processing pipeline entry point.

PDFLocalizer

Bounding box normalization & figure image cropper.


Project Collection Workspace (reanimator.collection)#

Class / Method

Description

ProjectCollection

Workspace directory manager.

ProjectCollection.process

Stream and save parsed documents directly to disk.

ProjectCollection.iter_documents

Yield document instances lazily from disk.

ProjectCollection.run_relevance_assessment

Evaluate synthetic relevance and export TREC qrels.


Synthetic Relevance Assessment (reanimator.relevance)#

Class / Function

Description

RelevanceEvaluator

Core UMBRELA-style relevance judging engine.

ModalityExtractor

Extract target modalities (full_document, text_only, tables, figures, formulas, chunks).

TopicAdapter

Normalize query strings, lists, or TREC topic dicts.

export_qrels

Export judgments in standard TREC qrels format.


VLM Backends (reanimator.backends)#

Class

Description

OpenAIVisionBackend

OpenAI API & remote dots.mocr vLLM backend.

GeminiBackend

Google Gemini 2.0 Flash / Pro vision backend.

CachedBackend

Disk-backed response caching wrapper.


Visualization (reanimator.visualization)#

Function

Description

draw_bounding_boxes

Render color-coded bounding boxes and centered label pills onto page images.