|
StringSimilarity
Delphi package to hold string similarity routines
stringsimilarity, fuzzysearch, fuzzystring, Featured, phonetic, phoneticsearch, stringcomparison IntroductionThis package was designed as a place where TUO stores "all" the different string similarity routines around. To see how these routines work internally you are invited to read the code ;-) or look up at wikipedia :-D DetailsBy now there are two different methods of string similarity routines in the package. Each unit contains one or the other ;-) simples Phonetic comparisonThese routines compare the string similarity by the "sound" of the word.
As there is no way of telling that a word sounds 20 or 80 per cent alike the function returns only a boolean value: function SoundsSimilar(const AStr1, AStr2: String): Boolean; Similarity ratioThe other way of string comparison is to calculate how similar two strings are in per cent. uNeedlemanWunch in '..\..\uNeedlemanWunch.pas',
The appropriate routine returns a double value between 0 and 1: function StringSimilarityRatio(const Str1, Str2: String; IgnoreCase: Boolean): Double; |