import { compareSimilarity } from "https://deno.land/std@0.222.1/text/compare_similarity.ts";
Sort based on word similarity
Examples
Example 1
Example 1
import { compareSimilarity } from "https://deno.land/std@0.222.1/text/compare_similarity.ts";
const words = ["hi", "hello", "help"];
// words most-similar to "hep" will be at the front
words.sort(compareSimilarity("hep"));