KeenASR Framework v2.2 (c662ac9)
Keen Research
Loading...
Searching...
No Matches
KIOSAlignmentConfig Class Reference

Per-call configuration for a text-alignment operation. More...

#include <KIOSTextAligner.h>

Properties

float insertCost
 Cost of inserting a recognized token (one not present in the reference).
float deleteCost
 Cost of deleting a reference token (one not present in the recognized text).
float substituteCost
 Cost of substituting one token for another.
BOOL detectRepetitions
 When YES, the result populates repetitionRefIndices for words the reader appears to have stuttered or repeated.
BOOL filterNoiseTokens
 When YES, recognized tokens whose text begins with '<' (e.g. <SPOKEN_NOISE>, <UNK>) are dropped before alignment.

Detailed Description

Per-call configuration for a text-alignment operation.

Defaults reproduce classic Levenshtein word edit distance with unit costs and noise-token filtering enabled. For most oral-reading and WER use cases the defaults are appropriate.

Property Documentation

◆ deleteCost

- (float) deleteCost
readwritenonatomicassign

Cost of deleting a reference token (one not present in the recognized text).

Default: 1.0.

◆ detectRepetitions

- (BOOL) detectRepetitions
readwritenonatomicassign

When YES, the result populates repetitionRefIndices for words the reader appears to have stuttered or repeated.

A repetition is reported when two adjacent recognized tokens are identical but only one of the pair was matched against the reference. Default: NO.

◆ filterNoiseTokens

- (BOOL) filterNoiseTokens
readwritenonatomicassign

When YES, recognized tokens whose text begins with '<' (e.g. <SPOKEN_NOISE>, <UNK>) are dropped before alignment.

Leave on when the recognized text comes from an ASR result; turn off when aligning plain reference vs. plain hypothesis. Default: YES.

◆ insertCost

- (float) insertCost
readwritenonatomicassign

Cost of inserting a recognized token (one not present in the reference).

Default: 1.0.

◆ substituteCost

- (float) substituteCost
readwritenonatomicassign

Cost of substituting one token for another.

When substituteCost > insertCost + deleteCost the aligner degenerates to LCS-style behavior (no substitutions emitted). Default: 1.0.


The documentation for this class was generated from the following file: