OcrSettings

public final class OcrSettings

Settings for Ocr. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document's settings, otherwise the SDK globally when set on SdkSettings.

Functions

Link copied to clipboard
public final boolean getBypassEffortGpuRestriction()
Lets and read on the CPU when the machine has no GPU, or when the acceleration settings place Vision on the CPU, instead of failing.
Link copied to clipboard
public final String getDefaultLanguages()
OCR languages, as language codes joined with '+' (for example "eng+deu").
Link copied to clipboard
public final boolean getDetectLanguageFavorAccuracy()
Indicates whether the automatic language-detection pass favors recognition accuracy over speed.
Indicates whether, when is enabled, a page whose automatic language detection finds no language (a blank, image-only or unreadable page) leaves the document's language to the next page instead of deciding it.
Link copied to clipboard
public final boolean getDetectLanguageFromDigitalText()
Controls whether the language of born-digital text (pages whose text comes from the document itself, so no OCR runs) is identified offline even when names a language.
Link copied to clipboard
public final boolean getDetectLanguageOncePerDocument()
Indicates whether automatic language detection (the "auto" OCR language) runs once for the whole document instead of once per page.
Link copied to clipboard
public final double getDetectLanguagePageFraction()
The share of a page (0.0 to 1.0) the automatic language-detection pass reads text from.
Link copied to clipboard
public final boolean getDetectLanguagePairWithEnglish()
Indicates whether automatic language detection reads a page written in a Latin-script language with English as well, for example Spanish as "spa+eng".
Link copied to clipboard
public final boolean getDetectLanguageScriptCheck()
Indicates whether automatic language detection checks each non-Latin script against the Latin one.
Link copied to clipboard
public final double getDetectLanguageScriptCheckMargin()
How much higher, from 0.0 to 1.0, the Latin read's mean word confidence must be for the script check to replace a script with Latin.
Link copied to clipboard
public final double getDetectLanguageTopGuessFloor()
The probability, from 0.0 to 1.0, from which automatic language detection keeps the language identifier's best guess when it identifies no language reliably.
Link copied to clipboard
public final boolean getDictionaryTieBreak()
Indicates whether OCR evidence reconciliation settles a dispute between the two engines with a dictionary when exactly one of the two readings is a dictionary word of the page's language.
Link copied to clipboard
public final OcrEffort getEffort()
How much work OCR spends on a page: reads with the small recognizer model and runs on any machine; and read with the medium one, which needs a GPU.
Link copied to clipboard
public final boolean getEnableMrzReading()
Reads the machine readable zones of passports, identity cards and visas a second time with a dedicated reader.
Link copied to clipboard
public final boolean getEnableOrientationDetection()
Indicates whether the OCR engine detects and compensates page orientation (90°/180°/270°) during recognition.
Link copied to clipboard
public final boolean getEnablePreprocessing()
Indicates whether to enable image preprocessing before OCR.
Link copied to clipboard
public final boolean getEnableSkewDetection()
Indicates whether to enable automatic skew detection and correction.
Link copied to clipboard
public final boolean getEnableTableDetection()
Indicates whether to detect and extract tables from OCR output.
Link copied to clipboard
public final OcrEngine getEngine()
Which OCR engine reads a page.
Link copied to clipboard
Path to the experimental character-grader causal text corpus used to train the in-process character predictor.
Path to the experimental character-grader dictionary (one character per line, an empty line for space) matching the visual model's class order.
Link copied to clipboard
Path to the experimental character-grader visual model used by OCR evidence reconciliation.
Link copied to clipboard
Research probe: seeded deterministic corruption of digit-bearing OCR evidence words.
Link copied to clipboard
Cross-engine agreement feature weight of the experimental OCR evidence reconciliation policy.
Link copied to clipboard
Confidence feature weight of the experimental OCR evidence reconciliation policy.
Minimum candidate score for the experimental OCR evidence reconciliation to confirm a canonical reading instead of disputing the group.
Link copied to clipboard
public final boolean getExperimentalFusionDigitGrouping()
Rewrites the thousands marks of an amount that carries the page's decimal mark twice ("5.262.000" on a page that writes "10,418.76"), when the page groups thousands with the other mark elsewhere.
Link copied to clipboard
Folds fullwidth Latin forms in reconciled canonical text to ASCII.
Link copied to clipboard
public final boolean getExperimentalFusionJudge()
Indicates whether a CTC text recognizer judges words two readings disagree on: a word two OCR engines read differently when their evidence leaves the choice open, and a word the VLM reads differently from OCR in the situations where such a judge was measured to beat the VLM (letters two OCR engines agree on, and digits a single engine read).
Link copied to clipboard
Path to the line-delimited character dictionary of : one character per line, in the model's class order after the CTC blank.
Link copied to clipboard
Path to a CTC text-recognition model (ONNX) that replaces the published fusion-judge model.
Link copied to clipboard
Minimum score margin between the best and second-best candidate for the experimental OCR evidence reconciliation to confirm a canonical reading.
Link copied to clipboard
Runs the full-Paddle detection-plus-recognition branch as a third evidence source in the experimental OCR evidence pipeline.
Research knob: when evidence fusion runs, the FAST + Paddle branch reads the page image BEFORE preprocessing (the deskewed original) instead of the same preprocessed image Tesseract reads.
Wall-time budget for the secondary evidence branches as a multiple of the primary branch's wall time.
Lower bound of the secondary evidence budget in seconds, when enables the budget.
Minimum mean confidence for a single-engine evidence group to be confirmed as page text.
Maximum fraction of low-confidence primary words for the staged safe gate.
Minimum primary mean word confidence for the staged safe gate.
Link copied to clipboard
Minimum primary word count for the staged safe gate.
Link copied to clipboard
Cancels the secondary (Paddle) evidence branches when the primary (tesseract) read passes the safe gate (enough words, high mean confidence, tiny low-confidence tail).
Link copied to clipboard
Valid-field-shape feature weight of the experimental OCR evidence reconciliation policy.
Link copied to clipboard
public final boolean getExperimentalPaddleOnCpu()
Benchmarking aid: lets the FAST and Paddle recognition stages run on the CPU where they otherwise require a GPU execution provider, so a machine without a GPU follows the OCR routing of a GPU deployment (automatic engine selection picks Paddle, and OCR evidence fusion collects the FAST + Paddle reading).
Link copied to clipboard
public final int getExperimentalRenderDpi()
Research knob: DPI at which document pages are rendered for the vision pipeline.
Link copied to clipboard
public final boolean getExperimentalUnanimityAuditActive()
Acts on the unanimity audit: a confirmed legal-field decision whose accepted reading loses the forced-alignment contest against a confusion rival is repaired to the rival the grader selects confidently, and otherwise demoted to low confidence.
Link copied to clipboard
public final boolean getExperimentalUnanimityAuditProbe()
Research probe: forced-alignment audit of CONFIRMED legal-field decisions.
Link copied to clipboard
public final boolean getFavorAccuracy()
Indicates whether to favor accuracy over speed in OCR processing.
Link copied to clipboard
public final boolean getImageTableZoneRead()
Reads a table that holds no words at all, such as a table pasted as an image on a born-digital page, through the evidence path a scanned page takes: every available engine reads the table, the readings are reconciled and disputed words graded.
Link copied to clipboard
public final int getMaxLanguages()
Maximum number of languages to report from offline language detection.
Link copied to clipboard
public final int getMaxScripts()
Maximum number of writing scripts to recognize on a page during offline language detection (and the "auto" OCR path).
Link copied to clipboard
public final int getMaxThreads()
The maximum number of pages processed concurrently when a document-level OCR operation (such as making a document searchable) runs over multiple pages.
Link copied to clipboard
public final double getMinLanguageVoteFraction()
Consensus control for multi-language detection (only applies when is greater than 1).
Link copied to clipboard
public final int getMinLanguageVotes()
Consensus control for multi-language detection (only applies when is greater than 1).
Link copied to clipboard
public final double getMinScriptRatio()
Minimum share of a page (0.0 to 1.0) a secondary writing script must occupy before the page is also read with that script's model (only applies when is greater than 1).
Link copied to clipboard
public final int getMrzReaderCallsPerLead()
The reader calls (locator searches, reads and rescans) the machine readable zone reading may make for one lead: a row that looks like a zone OCR garbled, which the reader locates, reads and rescans.
Link copied to clipboard
public final int getMrzReaderCallsPerPage()
The reader calls the machine readable zone reading may make for all the leads of a page together, in reading order (see ): a lead stopped before a call changes nothing, and the page's later leads are not read.
Link copied to clipboard
public final float getPaperRelativeInkCut()
Fraction of the local paper level at and below which ink maps to black during normalization; levels between the cut and the paper keep a linear ramp.
Link copied to clipboard
public final float getPaperRelativeInkDepthThreshold()
Median ink depth, as a fraction of the local paper level, below which normalizes a page.
Link copied to clipboard
Multiple of the paper's own variation (the spread between a tile's paper level and its median brightness) below which a pixel still counts as paper during normalization.
Link copied to clipboard
public final PaperNormalizationMode getPaperRelativeNormalization()
Whether the page image handed to OCR is first expressed relative to its local paper level.
Link copied to clipboard
Whether the Paddle branches of OCR evidence fusion also read the paper-relative view of a normalized page.
Link copied to clipboard
Percentile of a tile's brightness taken as that tile's paper level.
Link copied to clipboard
public final int getPaperRelativeTileSize()
Side of the square tiles, in pixels, the paper level is sampled in.
Link copied to clipboard
public final boolean getSaveCharacterEvidence()
Keeps the secondary engine's reading of every character, its span on the page, its peak probability and its three most probable readings, as one evidence node per OCR run in the document graph.
Link copied to clipboard
public final boolean getSplitDecimalRepair()
In a table column of decimal numbers, restores the decimal point OCR read as a gap ("0 682" for 0.682) when the column's other numbers share the decimal format the repair produces.
Link copied to clipboard
public final void setBypassEffortGpuRestriction(boolean value)
Lets and read on the CPU when the machine has no GPU, or when the acceleration settings place Vision on the CPU, instead of failing.
Link copied to clipboard
public final void setDefaultLanguages(String value)
OCR languages, as language codes joined with '+' (for example "eng+deu").
Link copied to clipboard
public final void setDetectLanguageFavorAccuracy(boolean value)
Indicates whether the automatic language-detection pass favors recognition accuracy over speed.
public final void setDetectLanguageFirstIdentifiedPageDecides(boolean value)
Indicates whether, when is enabled, a page whose automatic language detection finds no language (a blank, image-only or unreadable page) leaves the document's language to the next page instead of deciding it.
Link copied to clipboard
public final void setDetectLanguageFromDigitalText(boolean value)
Controls whether the language of born-digital text (pages whose text comes from the document itself, so no OCR runs) is identified offline even when names a language.
Link copied to clipboard
public final void setDetectLanguageOncePerDocument(boolean value)
Indicates whether automatic language detection (the "auto" OCR language) runs once for the whole document instead of once per page.
Link copied to clipboard
public final void setDetectLanguagePageFraction(double value)
The share of a page (0.0 to 1.0) the automatic language-detection pass reads text from.
Link copied to clipboard
public final void setDetectLanguagePairWithEnglish(boolean value)
Indicates whether automatic language detection reads a page written in a Latin-script language with English as well, for example Spanish as "spa+eng".
Link copied to clipboard
public final void setDetectLanguageScriptCheck(boolean value)
Indicates whether automatic language detection checks each non-Latin script against the Latin one.
Link copied to clipboard
public final void setDetectLanguageScriptCheckMargin(double value)
How much higher, from 0.0 to 1.0, the Latin read's mean word confidence must be for the script check to replace a script with Latin.
Link copied to clipboard
public final void setDetectLanguageTopGuessFloor(double value)
The probability, from 0.0 to 1.0, from which automatic language detection keeps the language identifier's best guess when it identifies no language reliably.
Link copied to clipboard
public final void setDictionaryTieBreak(boolean value)
Indicates whether OCR evidence reconciliation settles a dispute between the two engines with a dictionary when exactly one of the two readings is a dictionary word of the page's language.
Link copied to clipboard
public final void setEffort(OcrEffort value)
How much work OCR spends on a page: reads with the small recognizer model and runs on any machine; and read with the medium one, which needs a GPU.
Link copied to clipboard
public final void setEnableMrzReading(boolean value)
Reads the machine readable zones of passports, identity cards and visas a second time with a dedicated reader.
Link copied to clipboard
public final void setEnableOrientationDetection(boolean value)
Indicates whether the OCR engine detects and compensates page orientation (90°/180°/270°) during recognition.
Link copied to clipboard
public final void setEnablePreprocessing(boolean value)
Indicates whether to enable image preprocessing before OCR.
Link copied to clipboard
public final void setEnableSkewDetection(boolean value)
Indicates whether to enable automatic skew detection and correction.
Link copied to clipboard
public final void setEnableTableDetection(boolean value)
Indicates whether to detect and extract tables from OCR output.
Link copied to clipboard
public final void setEngine(OcrEngine value)
Which OCR engine reads a page.
Link copied to clipboard
Path to the experimental character-grader causal text corpus used to train the in-process character predictor.
Path to the experimental character-grader dictionary (one character per line, an empty line for space) matching the visual model's class order.
Link copied to clipboard
Path to the experimental character-grader visual model used by OCR evidence reconciliation.
Link copied to clipboard
public final void setExperimentalEvidenceCorruptionSeed(int value)
Research probe: seeded deterministic corruption of digit-bearing OCR evidence words.
Link copied to clipboard
public final void setExperimentalFusionAgreementWeight(double value)
Cross-engine agreement feature weight of the experimental OCR evidence reconciliation policy.
Link copied to clipboard
public final void setExperimentalFusionConfidenceWeight(double value)
Confidence feature weight of the experimental OCR evidence reconciliation policy.
public final void setExperimentalFusionConfirmationThreshold(double value)
Minimum candidate score for the experimental OCR evidence reconciliation to confirm a canonical reading instead of disputing the group.
Link copied to clipboard
public final void setExperimentalFusionDigitGrouping(boolean value)
Rewrites the thousands marks of an amount that carries the page's decimal mark twice ("5.262.000" on a page that writes "10,418.76"), when the page groups thousands with the other mark elsewhere.
Link copied to clipboard
public final void setExperimentalFusionFoldFullwidthLatin(boolean value)
Folds fullwidth Latin forms in reconciled canonical text to ASCII.
Link copied to clipboard
public final void setExperimentalFusionJudge(boolean value)
Indicates whether a CTC text recognizer judges words two readings disagree on: a word two OCR engines read differently when their evidence leaves the choice open, and a word the VLM reads differently from OCR in the situations where such a judge was measured to beat the VLM (letters two OCR engines agree on, and digits a single engine read).
Link copied to clipboard
Path to the line-delimited character dictionary of : one character per line, in the model's class order after the CTC blank.
Link copied to clipboard
public final void setExperimentalFusionJudgeModelPath(String value)
Path to a CTC text-recognition model (ONNX) that replaces the published fusion-judge model.
Link copied to clipboard
public final void setExperimentalFusionMinimumWinnerMargin(double value)
Minimum score margin between the best and second-best candidate for the experimental OCR evidence reconciliation to confirm a canonical reading.
Link copied to clipboard
public final void setExperimentalFusionPaddleFullBranch(boolean value)
Runs the full-Paddle detection-plus-recognition branch as a third evidence source in the experimental OCR evidence pipeline.
public final void setExperimentalFusionPaddleOnOriginalImage(boolean value)
Research knob: when evidence fusion runs, the FAST + Paddle branch reads the page image BEFORE preprocessing (the deskewed original) instead of the same preprocessed image Tesseract reads.
public final void setExperimentalFusionSecondaryBudgetFactor(double value)
Wall-time budget for the secondary evidence branches as a multiple of the primary branch's wall time.
public final void setExperimentalFusionSecondaryBudgetFloorSeconds(double value)
Lower bound of the secondary evidence budget in seconds, when enables the budget.
public final void setExperimentalFusionSingleSourceConfidenceFloor(double value)
Minimum mean confidence for a single-engine evidence group to be confirmed as page text.
public final void setExperimentalFusionStagedMaxLowConfidenceRatio(double value)
Maximum fraction of low-confidence primary words for the staged safe gate.
public final void setExperimentalFusionStagedMinMeanConfidence(double value)
Minimum primary mean word confidence for the staged safe gate.
Link copied to clipboard
public final void setExperimentalFusionStagedMinWordCount(int value)
Minimum primary word count for the staged safe gate.
Link copied to clipboard
public final void setExperimentalFusionStagedSecondEngine(boolean value)
Cancels the secondary (Paddle) evidence branches when the primary (tesseract) read passes the safe gate (enough words, high mean confidence, tiny low-confidence tail).
Link copied to clipboard
public final void setExperimentalFusionValidShapeWeight(double value)
Valid-field-shape feature weight of the experimental OCR evidence reconciliation policy.
Link copied to clipboard
public final void setExperimentalPaddleOnCpu(boolean value)
Benchmarking aid: lets the FAST and Paddle recognition stages run on the CPU where they otherwise require a GPU execution provider, so a machine without a GPU follows the OCR routing of a GPU deployment (automatic engine selection picks Paddle, and OCR evidence fusion collects the FAST + Paddle reading).
Link copied to clipboard
public final void setExperimentalRenderDpi(int value)
Research knob: DPI at which document pages are rendered for the vision pipeline.
Link copied to clipboard
public final void setExperimentalUnanimityAuditActive(boolean value)
Acts on the unanimity audit: a confirmed legal-field decision whose accepted reading loses the forced-alignment contest against a confusion rival is repaired to the rival the grader selects confidently, and otherwise demoted to low confidence.
Link copied to clipboard
public final void setExperimentalUnanimityAuditProbe(boolean value)
Research probe: forced-alignment audit of CONFIRMED legal-field decisions.
Link copied to clipboard
public final void setFavorAccuracy(boolean value)
Indicates whether to favor accuracy over speed in OCR processing.
Link copied to clipboard
public final void setImageTableZoneRead(boolean value)
Reads a table that holds no words at all, such as a table pasted as an image on a born-digital page, through the evidence path a scanned page takes: every available engine reads the table, the readings are reconciled and disputed words graded.
Link copied to clipboard
public final void setMaxLanguages(int value)
Maximum number of languages to report from offline language detection.
Link copied to clipboard
public final void setMaxScripts(int value)
Maximum number of writing scripts to recognize on a page during offline language detection (and the "auto" OCR path).
Link copied to clipboard
public final void setMaxThreads(int value)
The maximum number of pages processed concurrently when a document-level OCR operation (such as making a document searchable) runs over multiple pages.
Link copied to clipboard
public final void setMinLanguageVoteFraction(double value)
Consensus control for multi-language detection (only applies when is greater than 1).
Link copied to clipboard
public final void setMinLanguageVotes(int value)
Consensus control for multi-language detection (only applies when is greater than 1).
Link copied to clipboard
public final void setMinScriptRatio(double value)
Minimum share of a page (0.0 to 1.0) a secondary writing script must occupy before the page is also read with that script's model (only applies when is greater than 1).
Link copied to clipboard
public final void setMrzReaderCallsPerLead(int value)
The reader calls (locator searches, reads and rescans) the machine readable zone reading may make for one lead: a row that looks like a zone OCR garbled, which the reader locates, reads and rescans.
Link copied to clipboard
public final void setMrzReaderCallsPerPage(int value)
The reader calls the machine readable zone reading may make for all the leads of a page together, in reading order (see ): a lead stopped before a call changes nothing, and the page's later leads are not read.
Link copied to clipboard
public final void setPaperRelativeInkCut(float value)
Fraction of the local paper level at and below which ink maps to black during normalization; levels between the cut and the paper keep a linear ramp.
Link copied to clipboard
public final void setPaperRelativeInkDepthThreshold(float value)
Median ink depth, as a fraction of the local paper level, below which normalizes a page.
Link copied to clipboard
public final void setPaperRelativeNoiseWhitePointFactor(float value)
Multiple of the paper's own variation (the spread between a tile's paper level and its median brightness) below which a pixel still counts as paper during normalization.
Link copied to clipboard
public final void setPaperRelativeNormalization(PaperNormalizationMode value)
Whether the page image handed to OCR is first expressed relative to its local paper level.
Link copied to clipboard
public final void setPaperRelativeNormalizationForPaddle(boolean value)
Whether the Paddle branches of OCR evidence fusion also read the paper-relative view of a normalized page.
Link copied to clipboard
public final void setPaperRelativePaperPercentile(int value)
Percentile of a tile's brightness taken as that tile's paper level.
Link copied to clipboard
public final void setPaperRelativeTileSize(int value)
Side of the square tiles, in pixels, the paper level is sampled in.
Link copied to clipboard
public final void setSaveCharacterEvidence(boolean value)
Keeps the secondary engine's reading of every character, its span on the page, its peak probability and its three most probable readings, as one evidence node per OCR run in the document graph.
Link copied to clipboard
public final void setSplitDecimalRepair(boolean value)
In a table column of decimal numbers, restores the decimal point OCR read as a gap ("0 682" for 0.682) when the column's other numbers share the decimal format the repair produces.