keenasr-web - v2.1.2
    Preparing search index...

    Class AlignmentResult

    Immutable snapshot of an alignment result.

    This class copies all data from the native AlignmentResult and then deletes the native object, ensuring proper memory management.

    Index

    Properties

    trace: AlignmentItem[]

    The alignment trace showing each operation.

    matches: number

    Number of matching tokens.

    substitutions: number

    Number of substitutions.

    insertions: number

    Number of insertions (tokens in recognized but not in reference).

    deletions: number

    Number of deletions (tokens in reference but not in recognized).

    refLength: number

    Length of the reference text in tokens.

    recLength: number

    Length of the recognized text in tokens.

    wordErrorRate: number

    Word error rate (WER).

    matchedRefMask: boolean[]

    Boolean mask indicating which reference tokens were matched.

    matchedRefIndices: number[]

    Indices of reference tokens that were matched.

    skippedRefIndices: number[]

    Indices of reference tokens that were skipped (deleted).

    furthestMatchedIndex: number

    Index of the furthest matched reference token (useful for tracking reading progress).

    repetitionRefIndices: number[]

    Indices of reference tokens detected as repetitions.

    Methods

    • Convert the alignment result to a JSON string.

      Returns string