UNPKG

string-metric

Version:

Get string similarity in JavaScript or TypeScript

12 lines (11 loc) 568 B
import { CharacterInsDelInterface } from './CharacterInsDelInterface'; import { CharacterSubstitutionInterface } from './CharacterSubstitutionInterface'; import { StringDistance } from './interfaces/StringDistance'; export declare class WeightedLevenshtein implements StringDistance { private charsub; private charchange?; constructor(charsub: CharacterSubstitutionInterface, charchange?: CharacterInsDelInterface | undefined); distance(s1: string, s2: string, limit?: number): number; private insertionCost; private deletionCost; }