1
0
mirror of https://github.com/robonen/tools.git synced 2026-03-20 02:44:45 +00:00

refactor(packages/stdlib): remove slow types from levenstein distance

This commit is contained in:
2024-04-12 00:42:12 +07:00
parent f3a2ae53f4
commit 7182706595

View File

@@ -27,7 +27,7 @@ export function trigramProfile(text: string): Trigrams {
* @param {Trigrams} right Second text trigram profile * @param {Trigrams} right Second text trigram profile
* @returns {number} The trigram distance between the two strings * @returns {number} The trigram distance between the two strings
*/ */
export function trigramDistance(left: Trigrams, right: Trigrams) { export function trigramDistance(left: Trigrams, right: Trigrams): number {
let distance = -4; let distance = -4;
let total = -4; let total = -4;