# API Reference This section provides comprehensive class, method, and function documentation for all modules in REANIMATOR-VLM. --- ## Data Models (`reanimator.models`) | Class | Description | | :--- | :--- | | [`Document`](models.md#document) | Top-level container representing a processed document. | | [`Table`](models.md#table) | Extracted table with DataFrame content, caption, and position. | | [`Figure`](models.md#figure) | Extracted figure with caption, image path, and position. | | [`Formula`](models.md#formula) | Extracted math formula or equation. | | [`Topic`](models.md#topic) | Retrieval query topic object. | | [`Judgement`](models.md#judgement) | Synthetic 4-level relevance judgment object. | --- ## Document Pipeline (`reanimator.pipeline`) | Class | Description | | :--- | :--- | | [`ReanimatorVLM`](pipeline.md#reanimatorvlm) | Main document processing pipeline entry point. | | [`PDFLocalizer`](pipeline.md#pdflocalizer) | Bounding box normalization & figure image cropper. | --- ## Project Collection Workspace (`reanimator.collection`) | Class / Method | Description | | :--- | :--- | | [`ProjectCollection`](collection.md#projectcollection) | Workspace directory manager. | | [`ProjectCollection.process`](collection.md#projectcollectionprocess) | Stream and save parsed documents directly to disk. | | [`ProjectCollection.iter_documents`](collection.md#projectcollectioniter_documents) | Yield document instances lazily from disk. | | [`ProjectCollection.run_relevance_assessment`](collection.md#projectcollectionrun_relevance_assessment) | Evaluate synthetic relevance and export TREC qrels. | --- ## Synthetic Relevance Assessment (`reanimator.relevance`) | Class / Function | Description | | :--- | :--- | | [`RelevanceEvaluator`](relevance.md#relevanceevaluator) | Core UMBRELA-style relevance judging engine. | | [`ModalityExtractor`](relevance.md#modalityextractor) | Extract target modalities (`full_document`, `text_only`, `tables`, `figures`, `formulas`, `chunks`). | | [`TopicAdapter`](relevance.md#topicadapter) | Normalize query strings, lists, or TREC topic dicts. | | [`export_qrels`](relevance.md#export_qrels) | Export judgments in standard TREC qrels format. | --- ## VLM Backends (`reanimator.backends`) | Class | Description | | :--- | :--- | | [`OpenAIVisionBackend`](backends.md#openaivisionbackend) | OpenAI API & remote `dots.mocr` vLLM backend. | | [`GeminiBackend`](backends.md#geminibackend) | Google Gemini 2.0 Flash / Pro vision backend. | | [`CachedBackend`](backends.md#cachedbackend) | Disk-backed response caching wrapper. | --- ## Visualization (`reanimator.visualization`) | Function | Description | | :--- | :--- | | [`draw_bounding_boxes`](visualization.md#draw_bounding_boxes) | Render color-coded bounding boxes and centered label pills onto page images. |