Пример #1
0
 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();
 }
Пример #2
0
 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();
 }
Пример #3
0
 /// <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;
             }
         }
     }
 }
Пример #4
0
        /// <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);
                }
            }
        }