Show / Hide Table of Contents

Interface ITextLayoutService

Merges individually recognized words from an IOCRResult into structured text blocks (paragraphs and lines) using configurable layout rules.

Inherited Members
IDisposable.Dispose()
Namespace: Zaya.OCR.Services
Assembly: Zaya.OCR.dll
Syntax
public interface ITextLayoutService : IDisposable

Properties

| Edit this page View Source

Description

Gets the UI description for this layout engine (localized).

Declaration
LocalizedString Description { get; }
Property Value
Type Description
LocalizedString
| Edit this page View Source

DisplayName

Gets the UI display name for this layout engine (localized).

Declaration
LocalizedString DisplayName { get; }
Property Value
Type Description
LocalizedString
| Edit this page View Source

EngineId

Gets a unique identifier for this layout engine (e.g., "simple", "advanced"). Used for profile serialization and engine lookup.

Declaration
string EngineId { get; }
Property Value
Type Description
string
| Edit this page View Source

IsAvailable

Gets whether this text layout engine is available on the current system.

Declaration
bool IsAvailable { get; }
Property Value
Type Description
bool
| Edit this page View Source

Settings

Gets the list of engine-specific settings that can be configured via UI.

Declaration
IReadOnlyList<SettingDescriptor> Settings { get; }
Property Value
Type Description
IReadOnlyList<SettingDescriptor>

Methods

| Edit this page View Source

CreateSessionAsync(IReadOnlyDictionary<string, object>, CancellationToken)

Creates a new text layout session with the specified engine settings.

Declaration
Task<ITextLayoutSession> CreateSessionAsync(IReadOnlyDictionary<string, object> engineSettings, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IReadOnlyDictionary<string, object> engineSettings

Engine-specific settings dictionary, or null for defaults.

CancellationToken cancellationToken

Token to cancel session creation.

Returns
Type Description
Task<ITextLayoutSession>

An active text layout session ready to process text.

| Edit this page View Source

CreateSessionAsync(CancellationToken)

Creates a new text layout session with the default engine settings.

Declaration
Task<ITextLayoutSession> CreateSessionAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

Token to cancel session creation.

Returns
Type Description
Task<ITextLayoutSession>

An active text layout session ready to process text.

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