ocr_media
Extract text from archival document images by type and language: print via existing sources or Tesseract, handwriting via Transkribus or vision, tables via FamilySearch, volumes via full-text search.
Instructions
Read a document image with the reader that suits it; doc_type and lang choose. print: text the media or its sources already carry, else Tesseract. hand: an English hand returns the image for you to transcribe as the result instructs; German goes to Transkribus only, never a vision read; Norwegian and others to Transkribus, with the image to check. table: FamilySearch's index (get_records_on_image). volume: full-text search first.
Transkribus costs credits: within the monthly budget, or with spend_credits. The transcript is never the evidence; the citation stays on the image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | The document's language, as a Tesseract code: 'eng', 'deu', 'nor', 'swe', 'dan', 'lat'; 'eng+deu' for several. Chooses the handwriting route and Tesseract's model. | eng |
| page | No | Page of a PDF, from 1. | |
| media | Yes | Media handle or gramps_id. | |
| store | No | Keep a machine reading on the media object as a Transcript note headed with its engine, model and date, plus Transkribus' PAGE XML. A vision read is yours to store, with add_note. | |
| engine | No | 'auto' routes by doc_type and lang. Or one reader: 'existing' (text the media or its sources already carry), 'tesseract', 'vision' (the image, for you to read; refused for German handwriting), 'transkribus'. | auto |
| region | No | Return only [x1, y1, x2, y2] of the page, in percent of width and height, at full detail: to read small or faint writing. [0, 50, 100, 100] is the bottom half. | |
| doc_type | No | What the document is. 'print': typeset or typed. 'hand': one handwritten document -- will, deed, letter, register entry. 'table': a census page or other ruled form. 'volume': a page of a register or deed book you mean to search whole. | |
| spend_credits | No | Consent to Transkribus credits (about 0.5, EUR 0.12, a page) for this call, past the configured monthly page budget. Only when the user agreed. | |
| second_witness | No | With a vision read, also run Transkribus and compare -- for a document that will carry a proof argument. Costs credits. |