How AstraClaw AI Reads Inside Your Files: OCR and Semantic Recognition

March 28, 2026

KeepCloud AI Team · AstraClaw AI Research · ROXLI · KeepCloud

11 min read

Hero illustration for How AstraClaw AI Reads Inside Your Files: OCR and Semantic Recognition
AstraClaw AI · KeepCloud by ROXLI
Inside AstraClaw AI's text extraction and semantic layer: 5-stage adaptive OCR preprocessing, PyMuPDF and Office parsing, SigLIP 2 multimodal embeddings, timestamp-keyed caching, and 15 recognized document categories.

Quick Answer & Key Takeaways

AstraClaw AI extracts searchable meaning from unlabelled files by pairing six format-specific text pipelines (including 5-stage adaptive image OCR) with 15-category semantic classification, named entity extraction, and SigLIP 2 multimodal vision.

  • Multi-variant OCR: Images run through original grayscale, 2x contrast, sharpened, adaptive binary threshold, and inverted passes; the cleanest alphanumeric output wins.
  • 15 built-in categories: Covers train/flight/bus tickets, cab & food receipts, hotel bookings, invoices, bank statements, IDs, prescriptions, resumes, marksheets, insurance, contracts, and certificates.
  • Modification-time caching: Extracted text is cached per user and file timestamp so unchanged files are never re-OCR'd redundantly.

Searching inside files across multiple clouds requires two tightly paired capabilities: extracting accurate raw text from wildly different file formats, and turning that text into structured semantic signals.

Six extraction pipelines for every file format

Table 1 — Format-specific text and visual extraction pipelines in AstraClaw AI
FormatExtraction StrategyKey Detail
Digital PDFsDirect text layer extraction via PyMuPDFFast parsing of invoices, e-tickets, and statements
Scanned PDFsHigh-resolution page render → 5-stage OCRFallback triggered automatically when embedded text is sparse
Images (JPG/PNG/WEBP/TIFF)5-stage preprocessing + OCR + SigLIP 2Selects variant with highest readable alphanumeric ratio
Word (.docx)python-docx paragraph & table parserCaptures both body text and structured table cells
PowerPoint (.pptx) & Excel (.xlsx)Slide shape text frames & non-empty worksheet cellsIndexes decks and spreadsheets without opening desktop suites
Google Workspace (Docs/Sheets/Slides)Google full-text search & export integrationZero redundant download of native Drive docs
For a phone scan like IMG_0042.jpg, AstraClaw evaluates grayscale, 2x contrast, sharpened, adaptive threshold, and inverted variants — keeping the highest-quality text read.

15 semantic document categories and entity extraction

Once extracted, AstraClaw's semantic engine classifies documents across 15 structured categories: Train Tickets, Flight Boarding Passes, Bus Tickets, Cab Receipts, Hotel Bookings, Invoices/Bills/Receipts, Bank Statements, ID Cards (Aadhaar, PAN, Passport, Voter ID, Driving License), Medical Prescriptions, Resumes/CVs, Marksheets, Insurance Policies, Legal Contracts, Certificates, and Food Order Receipts.

Entity extraction pulls dates, monetary amounts, ID number patterns, and 70+ Indian Railway station abbreviations, storing them in isolated per-user caches keyed by modification time. See how this works across all connected drives in our cross-cloud AI search guide, check KeepCloud Docs, or download KeepCloud to try it.

AstraClaw AI 15 document categories and OCR extraction pipeline
Figure 1 — AstraClaw classifies 15 document types and extracts entities for high-recall semantic search.

Frequently Asked Questions

Can AstraClaw AI read text inside JPG/PNG photos and scanned PDFs?

Yes. Scanned PDFs with minimal text layers are rendered to high-resolution images and passed alongside photos through a 5-stage preprocessing pipeline (grayscale, contrast boost, sharpen, adaptive binary threshold, and invert) before OCR selection.

What 15 document types does AstraClaw AI recognize?

AstraClaw classifies Train Tickets, Flight Tickets, Bus Tickets, Cab Receipts, Hotel Bookings, Invoices/Receipts, Bank Statements, ID Cards, Medical Prescriptions, Resumes, Marksheets, Insurance Policies, Legal Contracts, Certificates, and Food Order Receipts.

Is OCR re-run on every single search?

No. Extracted OCR text is cached per user and per file keyed by the file's last modification timestamp. Unchanged files reuse cached text immediately, and OCR only re-runs if a file is modified.