/** * Compute the edit distance score matrix between two sequences x (hyp) and y (ref) * using only pure Python lists. * * @param ref The reference sequence/transcript. * @param hyp The hypothesis sequence/transcript. * @param scoreFunc A function that takes two tokens (refToken, hypToken) and returns * a tuple of (deletionCost, insertionCost, diagonalCost) * @param backtrace Whether to compute the backtrace matrix. * @returns The score matrix and optionally the backtrace matrix */ declare function computeDistanceMatrix(ref: string | string[], hyp: string | string[], scoreFunc: (refToken: string, hypToken: string) => [number, number, number]): number[][]; declare function computeDistanceMatrix(ref: string | string[], hyp: string | string[], scoreFunc: (refToken: string, hypToken: string) => [number, number, number], backtrace: boolean): { scoreMatrix: number[][]; backtraceMatrix: number[][]; }; /** * Compute the Levenshtein distance matrix between two sequences. * * @param ref The reference sequence/transcript. * @param hyp The hypothesis sequence/transcript. * @param backtrace Whether to compute the backtrace matrix. * * @returns The score matrix and optionally the backtrace matrix */ declare function computeLevenshteinDistanceMatrix(ref: string | string[], hyp: string | string[]): number[][]; declare function computeLevenshteinDistanceMatrix(ref: string | string[], hyp: string | string[], backtrace: true): { scoreMatrix: number[][]; backtraceMatrix: number[][]; }; /** * Compute the error alignment distance matrix between two sequences. * * @param ref The reference sequence/transcript. * @param hyp The hypothesis sequence/transcript. * @param backtrace Whether to compute the backtrace matrix. * * @returns The score matrix and optionally the backtrace matrix. */ declare function computeErrorAlignDistanceMatrix(ref: string | string[], hyp: string | string[]): number[][]; declare function computeErrorAlignDistanceMatrix(ref: string | string[], hyp: string | string[], backtrace: true): { scoreMatrix: number[][]; backtraceMatrix: number[][]; }; export { computeDistanceMatrix, computeErrorAlignDistanceMatrix, computeLevenshteinDistanceMatrix };