Show / Hide Table of Contents

Class OneOcrConfig

Typed configuration for OneOcrService. Converts to the dictionary format expected by CreateSessionAsync.

Inheritance
object
OneOcrConfig
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Zaya.OCR.Impl.OneOcr.Models
Assembly: Zaya.OCR.Impl.OneOcr.dll
Syntax
public class OneOcrConfig
Remarks

Maps to the same keys as Settings: source, directoryPath, downloadUrl, cacheDirectory, minConfidence.

Properties

| Edit this page View Source

CacheDirectory

Gets or sets the cache directory for extracted engine files. Default is %TEMP%\Zaya\OneOcr.

Declaration
public string? CacheDirectory { get; set; }
Property Value
Type Description
string
| Edit this page View Source

DirectoryPath

Gets or sets the local directory path containing the engine files. Required when Source is Directory.

Declaration
public string? DirectoryPath { get; set; }
Property Value
Type Description
string
| Edit this page View Source

DownloadUrl

Gets or sets the URL to download the engine from. Required when Source is Url; also used as fallback when Source is Auto.

Declaration
public string? DownloadUrl { get; set; }
Property Value
Type Description
string
| Edit this page View Source

MinConfidence

Gets or sets the minimum word confidence as a percentage (0–100). Default is 70 to match Settings.

Declaration
public int MinConfidence { get; set; }
Property Value
Type Description
int
| Edit this page View Source

Source

Gets or sets the engine source. Default is Auto.

Declaration
public OneOcrSource Source { get; set; }
Property Value
Type Description
OneOcrSource

Methods

| Edit this page View Source

ToDictionary()

Converts the typed configuration to the dictionary format accepted by CreateSessionAsync(IReadOnlyDictionary<string, object>, CancellationToken).

Declaration
public Dictionary<string, object?> ToDictionary()
Returns
Type Description
Dictionary<string, object>

A dictionary with string keys and object values.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX