public Matcher(double fuzzyFinalThresholdScore, double fuzzySignificantThresholdScore, double fuzzyExcellentThresholdScore, string fuzzyWordDelimiter) { FuzzyFinalThresholdScore = fuzzyFinalThresholdScore; FuzzySignificantThresholdScore = fuzzySignificantThresholdScore; FuzzyExcellentThresholdScore = fuzzyExcellentThresholdScore; FuzzyWordDelimiter = fuzzyWordDelimiter; OldRows = new List <string>(); NewRows = new List <string>(); OldMatches = new MatchingPairs(); NewMatches = new MatchingPairs(); }
public Matcher() { FuzzyFinalThresholdScore = 0.6; FuzzySignificantThresholdScore = 0.5; FuzzyExcellentThresholdScore = 0.9; FuzzyWordDelimiter = "ANY"; OldRows = new List <string>(); NewRows = new List <string>(); OldMatches = new MatchingPairs(); NewMatches = new MatchingPairs(); }
/// <summary> /// Unload fuzzy match results prior to comparison. /// </summary> public void FuzzyUnloadDir(MatchingPairs matchingPairs, ref List <DirectoryEntry> entries) { foreach (DirectoryEntry entry in entries) { if (matchingPairs.ContainsKey(entry.StdFile)) { MatchingPair matchingPair = matchingPairs[entry.StdFile]; if (matchingPair.Matched) { entry.FuzzFile = matchingPair.NewKey; } } } }
/// <summary> /// Fuzzy match. /// </summary> public void FuzzyMatch() { string oldKey = string.Empty; int oldRow = 0; OldMatches = new MatchingPairs(); NewMatches = new MatchingPairs(); for (oldRow = 0; oldRow < OldRows.Count; oldRow++) { oldKey = OldRows[oldRow]; if (oldKey.Trim() != string.Empty) { BestMatch(oldKey); } } }