Table of Contents

Class TextRecognitionResult<T>

Namespace
AiDotNet.Document
Assembly
AiDotNet.dll

Represents the result of text recognition from a cropped image.

public class TextRecognitionResult<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
TextRecognitionResult<T>
Inherited Members

Remarks

For Beginners: Text recognition reads the actual characters from an image of text. This result contains the recognized text string along with confidence scores for each character.

Properties

Alternatives

Gets alternative recognition hypotheses with their scores.

public IReadOnlyList<(string Text, double Score)> Alternatives { get; init; }

Property Value

IReadOnlyList<(string Text, double Score)>

AttentionWeights

Gets the attention weights for visualization (if available).

public Tensor<T>? AttentionWeights { get; init; }

Property Value

Tensor<T>

CharacterProbabilities

Gets the character-level probability distribution (shape: [seq_len, vocab_size]).

public Tensor<T>? CharacterProbabilities { get; init; }

Property Value

Tensor<T>

Characters

Gets the per-character confidence scores.

public IReadOnlyList<CharacterRecognition<T>> Characters { get; init; }

Property Value

IReadOnlyList<CharacterRecognition<T>>

Confidence

Gets the overall confidence score (0-1).

public T Confidence { get; init; }

Property Value

T

ConfidenceValue

Gets the confidence as a double value.

public double ConfidenceValue { get; init; }

Property Value

double

ProcessingTimeMs

Gets the processing time in milliseconds.

public double ProcessingTimeMs { get; init; }

Property Value

double

Text

Gets the recognized text string.

public string Text { get; init; }

Property Value

string