Esempio n. 1
0
 public DuplicateFinder(int maxInList, int maxLists, int maxScore)
 {
     _editDist  = new LevenshteinDistance();
     _maxInList = maxInList;
     _maxLists  = maxLists;
     _maxScore  = maxScore;
 }
Esempio n. 2
0
 public static IEnumerable <string> SimilarTo(
     this string str,
     IEnumerable <string> strings,
     IEditDistance editDistance)
 {
     return(strings
            .GroupBy(_ => editDistance.FindDistance(str, _))
            .Aggregate((i1, i2) => i1.Key < i2.Key ? i1 : i2));
 }
Esempio n. 3
0
 public void OneTimeSetup()
 {
     _levDist = new LevenshteinDistance(DelCost, InsCost, SubCost);
 }