Package org.apache.tika.parser.enricher


package org.apache.tika.parser.enricher
Engines a container parser invokes on bytes it has already parsed: text recognizers (OCR, transcription) and annotators. Experimental in 4.1 and 4.2: the contract is one image per call, written into the caller's body as it runs; 4.3 batches recognition per document. The intent is additive: an engine that takes one image at a time keeps working unchanged, and one whose service batches opts in by declaring a batch size and implementing the list call 4.3 adds. Until then these interfaces may change in a minor release without a deprecation cycle. The "engines" and "text-recognizers" configuration that names an engine is stable.
  • Class
    Description
    Media-type-keyed registry of content enrichers: ordinary Parsers that a container parser invokes on bytes it has already parsed (OCR text for an image or a rendered PDF page), rather than being dispatched to by the composite parser.
    A Parser a container parser invokes on bytes it has already parsed (OCR on an image, an embedding of a rendered page) rather than one the composite dispatches to; its supported types are the types it can enrich.
    Resolves the content enricher for a media type.
    A parser that invokes content enrichers (OCR on its images or rendered pages).
    A text recognizer behind a chain of ImageChecks, in order.
    A test an image passes before a text recognizer is asked to read it: big enough, not blank.
    Whether the image goes to the engine; a refusal carries a short, stable reason.
    What the checks of one image share: its bytes, read once and left in the stream for the engine, the dimensions its parser recorded, and anything a check chooses to memoize, so two checks that need the decoded pixels decode them once.
    A computation that may fail to read.
    Writes TikaCoreProperties.OCR_WARNINGS: each code once per document, and for an inline image also on the parent document, whose content receives the image's text.
    The _min-width/_min-height of a "text-recognizers" entry as a check: an image whose recorded dimensions fall short in either is refused; one of unknown size is admitted.
    Deprecated.
    since 4.2: the loader puts an entry's minimum in a GatedEnricher as a RecordedSizeCheck.
    A content enricher whose output is the document's text: what the image, audio, or video says, written into the caller's body as content the caller may treat as its own.
    The per-request switch for the "text-recognizers" list: {"parse-context": {"text-recognizers": {"enabled": false}}} runs no recognizer or annotator from the list for this parse, in every container.